Today, when using a MAVEN compilation to package a Web application, you encounter a problem:
The project was developed with the introduction of a dependency jar package, placed in the Web-inf/lib directory, and the Web Libariary imported through BuildPath.
There is no problem with developing in eclipse, but using MAVEN to compile plug-ins is always a good time to find the classes in the jar package web-inf/lib.
Obviously when compiling the Web-inf/lib is not configured in the Maven-complier-plugin plugin src directory to go,
Then add this directory, or not. Rogue, first install this jar package in the local library and add dependency.
Later, Google found that Maven provided the scope for system dependency, the original document is as follows:
System
This "is" similar to provided except, which has to provide the JAR which contains it explicitly.
The artifact are always available and are 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 your local library.
The specific configuration recorded:
XML code
<dependency>
<groupId>org.apache</groupId>
<artifactId>test</artifactId>
<version>1.0</version>
<scope>system</scope>
<systemPath>${basedir}/src/main/webapp/WEB-INF/lib/paypal_base.jar</systemPath>
</dependency>
The above GroupID and artifactid these can be filled in just fine.
MAVEN relies on the jar package "go" in the local non-repository