Unable to load class from installed jar in maven
I installed by jar file inside of my maven local repository (~/.m2/repository/) by following the tutorial of the 3rd party JARs installation with the groupID, artifactId, version and packaging like this:
mvn install:install-file -Dfile=CAENRFIDLibrary.jar -DgroupId=com.caen -DartifactId=RFIDLibrary -Dversion=4.7.0-SNAPSHOT -Dpackaging=jar.
After updating maven project dependency inside eclipse, the error that appears in my pom.xml disappears. But in my program, I'm not able to load class from jar file. (NB: The package is imported in the program)
Did someone know how to solve this problem?
Thanks in advance for your help.
在pom文件中更新如下所示的依赖关系。
<dependency>
<groupId>com.caen</groupId>
<artifactId>CAENRFIDLibrary</artifactId>
<version>4.7.0</version>
</dependency>
I did by using the right way but it persists always. I am asking myself if the problem is not coming from the jar because it is generate with Ant 1.9.4? May be it is coming from the groupId as the package where all the classes are located is "com.caen.RFIDLibrary"
The problem is solved, the problem is due to the rxtxcomm jar's file. By trying to load both, CAENRFIDLibrary.jar and rxtxcomm.jar, step-by-step as external lib of the project I found the solution.
Thanks your helps.
链接地址: http://www.djcxy.com/p/29668.html上一篇: 存储库并使用mvn部署到本地JBoss
下一篇: 无法从maven中的已安装jar加载类