Maven skipping dependency files?
I am using maven for my project. I have 5 local jar files as dependent files which i have specified in pom.xml as follows:
<dependency>
<groupId>EWSAPI</groupId>
<artifactId>EWSAPI</artifactId>
<version>1.1</version>
<scope>system</scope>
<systemPath>${basedir}/EWSAPI1.1.jar</systemPath>
</dependency>
<dependency>
<groupId>jcifs</groupId>
<artifactId>jcifs</artifactId>
<version>1.3.15</version>
<scope>system</scope>
<systemPath>${basedir}/jcifs-1.3.15.jar</systemPath>
</dependency>
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
<version>1.4</version>
<scope>system</scope>
<systemPath>${basedir}/commons-codec-1.4.jar</systemPath>
</dependency>
<dependency>
<groupId>commons-httpclient</groupId>
<artifactId>commons-httpclie开发者_如何转开发nt</artifactId>
<version>3.1</version>
<scope>system</scope>
<systemPath>${basedir}/commons-httpclient-3.1.jar</systemPath>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.1.1</version>
<scope>system</scope>
<systemPath>${basedir}/commons-logging-1.1.1.jar</systemPath>
</dependency>
Now, when i try mvn install in command prompt to install the dependencies. I get the following message
The following files where skipped:
EWSAPI:EWSAPI:java-source:sources:1.1
commons-codec:commons-codec:java-source:sources:1.4
commons-httpclient:commons-httpclient:java-source:sources:3.1
commons-logging:commons-logging:java-source:sources:1.1.1
and also one file jfis was skipped(the same that was mentioned above as a dependency)
I do not understand why maven is doing so? I appreciate your help on this. Thanks
Try something like this:
<repositories>
<repository>
<id>my-internal-site</id>
<url>file:///${basedir}</url>
</repository>
</repositories>
Then remove the system path argument.
Also, are you sure the scope should be system?
From the question, it is not clear what you are trying to do.
On one hand you mention I have 5 local jar files as dependent files
and you have specified them with <system>
scope in pom.xml
. On the other hand you mention running mvn install
to install the dependencies
.
You should avoid <system>
scope unless there is a compelling reason, especially for third-party dependencies (like commons-codec
).
mvn install
builds the specified project and installs the same in the local repository. It does not install dependencies
.
You can use mvn install:install-file <params>
to install
the dependencies to the local repository after downloading them separately. They do not get installed
in ${basedir}
.
Do update your question suitably if the above does not help.
精彩评论