I just needed to use a 3rd party JAR in my project and deployed the JAR in my local maven repo. I followed these steps while doing this:
->Runned the belowed statement:
mvn install:install-file -Dfile=c:\DEVEL\gsa-japi-src-1.3.jar -DgroupId=net.sf.gsaapi
-DartifactId=gsaapi -Dversion=1.3 -Dpackaging=jar
->I saw "BUILD SUCCESSFUL" message, checked local repo files and it seemed the deployment was succesfull.
->After installed and deployed, i just added following statements in pom.xml file.
<dependency>
<groupId>net.sf.gsaapi</groupId>
<artifactId>gsaapi</artifactId>
<version>1.3</version>
</dependency>
But I still can not reach the library's methods. Am I missing something?
Correct dependency is:
<dependency>
<groupId>net.sf.gsaapi</groupId>
<artifactId>gsa-japi-src</artifactId>
<version>1.3</version>
</dependency>
gsa-japi-src-1.3.jar contains only source files (.java) and apidocs. You need a jar with .class files
You have installed JAR use net.sf.gsaapi:gsaapi
artifact identifier but in dependency you are using com.google.code:kaptcha
. So, you should use the same artifact identifier in dependencies.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.