Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

External Jar not being referenced in the pom.xml

 
Ankit V Agrawal
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Ankit V Agrawal
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Post the full mvn build output.
 
Ankit V Agrawal
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, installing such third-party artifacts in a central repository, such as Nexus, is always preferred to installing them in a local repository.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic