Author
External Jar not being referenced in the pom.xml
Ankit V Agrawal
Greenhorn
Joined: Jan 27, 2012
Posts: 9
Hello Ranchers,
I have added 2 external jar files along with hibernate files in my pom.xml.
Here is my pom.xml
After this I have also installed the jtds and super csv external jars by running following commands
Now I'm getting the following error when I'm running mvn install
Any help would be greatly appreciated. I'm only into my second day with Maven so I'm also learning and researching about this meanwhile.
- Ank
SCJP 5.0, SCWCD 5.0
Peter Johnson
author
Bartender
Joined: May 14, 2008
Posts: 4875
posted Jan 31, 2012 10:02:08
1
The groupIds in the install:install-file command don't match the groupIds used in the dependency entries in your POM. Ditto for the version on the jdts artifact.
JBoss In Action
Ankit V Agrawal
Greenhorn
Joined: Jan 27, 2012
Posts: 9
Thanks peter, yes that was a mistake. But I now wonder how it got successful in the first place
Anyways I have corrected what you have mentioned and have these 2 commands running now
mvn install:install-file -DgroupId=org.supercsv -DartifactId=SuperCSV -Dversion=1.52 -Dpackaging=jar -Dfile=mySuperCSVLocation
mvn install:install-file -DgroupId=net.sourceforge -DartifactId=jtds -Dversion=1.2.5 -Dpackaging=jar -Dfile=mySuperCSVLocation
But still the problem persists
Peter Johnson
author
Bartender
Joined: May 14, 2008
Posts: 4875
posted Feb 01, 2012 09:50:29
1
Post the full mvn build output.
Ankit V Agrawal
Greenhorn
Joined: Jan 27, 2012
Posts: 9
We have a sonatype nexus maven repository, these two jars were not added there, after adding them in that repository the problem got resolved. Thanks you.
Peter Johnson
author
Bartender
Joined: May 14, 2008
Posts: 4875
posted Feb 02, 2012 13:12:31
0
Yes, installing such third-party artifacts in a central repository, such as Nexus, is always preferred to installing them in a local repository.
subject: External Jar not being referenced in the pom.xml