wood burning stoves 2.0*
The moose likes Ant, Maven and Other Build Tools and the fly likes External Jar not being referenced in the pom.xml Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "External Jar not being referenced in the pom.xml" Watch "External Jar not being referenced in the pom.xml" New topic
Author

External Jar not being referenced in the pom.xml

Ankit V Agrawal
Greenhorn

Joined: Jan 27, 2012
Posts: 12
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: 5812
    
    7

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: 12
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: 5812
    
    7

Post the full mvn build output.
Ankit V Agrawal
Greenhorn

Joined: Jan 27, 2012
Posts: 12
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: 5812
    
    7

Yes, installing such third-party artifacts in a central repository, such as Nexus, is always preferred to installing them in a local repository.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: External Jar not being referenced in the pom.xml
 
Similar Threads
maven wsdl2java problem
problem with mvn deploy
Could not resolve dependencies for maven project
Incorrect hibernate version or maven ignore and didn't download hibernate jar file.
how to make the plugin jar to take the specified version from the pom.