I want to install a jar file to the local repository using maven 3.0.4.
I used:
./mvn install:install-file -Dfile=~/Downloads/daozero-0.5.jar -DgroupId=daozero-DartifactId=daozero -Dversion=0.5 -Dpackaging=jar
It reported successful.
But in my project, there's still an error with daozero dependency.
I checked the file location /Users/someuser/.m2/repository/daozero/daozero/0.5/
and found that there was no file: daozero-0.5.jar
<dependency>
<groupId>daozero</groupId>
<artifactId>daozero</artifactId>
<version>0.5</version>
<scope>compile</scope>
</dependency>
Can anyone help me to understand what's going on? It worked before in maven 2.x.
I had a similar issue where the files were not being copied from a relative path.
Try using the fully qualified path of the jar file instead of ~.
eg:
./mvn install:install-file -Dfile=/home/user1942964/Downloads/daozero-0.5.jar -DgroupId=daozero -DartifactId=daozero -Dversion=0.5 -Dpackaging=jar
I know this is an old problem, just sharing my experience for other people,
I had the same issues, then I realized that I put a wrong name to the jar I am referring to.
Maven didn't complain and finished with success message, but didn't copy the jar :)
Regards Lyju
Don't know if this is the issue, but you forgot a space between one of your commandline parameters:
./mvn install:install-file -Dfile=~/Downloads/daozero-0.5.jar -DgroupId=daozero -DartifactId=daozero -Dversion=0.5 -Dpackaging=jar
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With