how to download and install jar in my local repo Maven
I am trying to download a jar for an internal repo with i have under tomcat and then install it to my local maven repo.
the jar file can be found under the path:http://10.11.250.14/strepo/ext/JSErrorCollector-0.2.jar
i edit my pom.xml providing the link of the internal repo and also add a dependency in the pom but the maven cannot downloaded thre jar.
<repositories>
<repository>
<id>internal.repo</id>
<url>http://10.11.250.14/strepo/ext/</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>org.JS</groupId>
<artifactId>JSErrorCollector</artifactId>
<version>0.2</version>
</dependency>
Could you please anyone help me?
It's not just the jar only to make a Maven repository, there are a bunch of other stuffs required to be regarded as Maven repository. From the URL I think it is not a standard Maven repository layout.
So you have at least 2 options:
For option 2, just download the file, and then run the Maven mvn command as follow (assuming the file is at your current directory):
mvn install:install-file -Dfile=JSErrorCollector-0.2.jar -DgroupId=strepo.ext -DartifactId=JSErrorCollector -Dversion=0.2 -Dpackaging=jar
After that you can refer to that using:
<dependency>
<groupId>strepo.ext</groupId>
<artifactId>JSErrorCollector</artifactId>
<version>0.2</version>
</dependency>
链接地址: http://www.djcxy.com/p/29662.html