In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
MAVEN
Today, when packaging a web application using maven compilation, I encountered a problem:
The project introduced the dependency jar package in the development, placed it in the WEB-INF/lib directory, and imported the web libariary through buildpath.
There's no problem with developing in eclipse, but it's cheap to start with maven compiling plug-ins and you can't always find the classes in the jar package WEB-INF/lib.
Obviously, WEB-INF/lib is not configured in the maven-complier-plugin plug-in src directory at compile time.
So add this directory, it still doesn't work. Scoundrel, first install this jar package into the local library, and then add dependency.
Later, google found that maven provides a dependency on scope for system. The original text of the document is as follows:
System
This scope is similar to provided except that you have to provide the JAR which contains it explicitly.
The artifact is always available and is not looked up in a repository.
This allows you to add dependency without having to install the jar package in the WEB-INF/lib directory into the local library.
Record the specific configuration:
Xml code
Org.apache
Test
1.0
System
${basedir} / src/main/webapp/WEB-INF/lib/paypal_base.jar
! A better way is to configure the compilation parameters and add extdirs to add the relative path of the jar package to the configuration, as follows:
Maven-compiler-plugin
1.6
1.6
UTF-8
Src\ main\ webapp\ WEB-INF\ lib
Get [download address]
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.