This week's book giveaway is in the Performance forum.
We're giving away four copies of The Java Performance Companion and have Charlie Hunt, Monica Beckwith, Poonam Parhar, & Bengt Rutisson on-line!
See this thread for details.
Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Missing artifact org.hibernate

 
pramod talekar
Ranch Hand
Posts: 328
Eclipse IDE Java Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ,

I am getting missing artifact 'org.hibernate:hibernate-annotations:jar:3.3.0.GA'



I installed it through command line :-

D:\J2EE\ragnarok-spring-hibernate>mvn install:install-file -Dfile=hibernate-commons-annotations-3.3.0.GA.jar -DgroupId=org.hibernate -DartifactId=hibernate-commons-annotations -Dversion=3.3.0.GA -Dpackaging=jar
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Stub Project (No POM) 1
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-install-plugin:2.3.1:install-file (default-cli) @ standalone-pom ---
[INFO] Installing D:J2EE\ragnarok-spring-hibernate>mvn install:install-file -Dfile=hibernate-commons-annotations-3.3.0.GA.jar to C:\Documents and Settings\ptalek\.m2\repository\org\hibernate\hibernate-commons-annotations\3.3.0.GA\hibernate-commons-annotations-3.3.0.GA.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.375s
[INFO] Finished at: Tue Jan 24 16:40:36 IST 2012
[INFO] Final Memory: 2M/15M
[INFO] ------------------------------------------------------------------------

and restarted Eclipse , but POM shows the same error.
Also, this project has Spring project nature.

I changed the version from 3.3.0 to 3.2.1 in POM and it worked , so don't know why previous version is not working.

Please advise.
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18218
53
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You shouldn't have to manually locally install that jar unless you're blocked from direct Internet access. Normally, Maven will check your local repository and install it from the remote Maven repo, if it isn't in the locale cache repo.

However, it appears that you have a mismatch on IDs. Your POM is asking for hibernate-annotations, but your install was instructed to file it under hibernate-commons-annotations.
 
pramod talekar
Ranch Hand
Posts: 328
Eclipse IDE Java Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey Tim,

I recreated my pom file & gave the below dependency. But I'm still getting the same error.



with this installation(though not necessary)

D:\J2EE\ragnarok-spring-hibernate>mvn install:install-file -Dfile=hibernate-commons-annotations-3.3.0.GA.jar -DgroupId=org.hibernate -DartifactId=hibernate-commons-annotations -Dversion=3.3.0.GA -Dpackaging=jar
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building ragnarok-spring-hibernate 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-install-plugin:2.3.1:install-file (default-cli) @ ragnarok-spring-hibernate ---
[INFO] Installing D:\J2EE\ragnarok-spring-hibernate\hibernate-commons-annotations-3.3.0.GA.jar to C:\Documents and Settings\ptalek\.m2\repository\org\hibernate\hibernate-commons-annotations\3.3.0.GA\hibernate-commons-annotations-3.3.0.GA.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.889s
[INFO] Finished at: Tue Jan 24 19:27:03 IST 2012
[INFO] Final Memory: 2M/15M
[INFO] ------------------------------------------------------------------------

What could be the possible reason now.
My pom has got over 20 dependencies but I'm facing problem with only 2 including this one.
Please advise.


 
Tim Holloway
Saloon Keeper
Pie
Posts: 18218
53
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think I found it.



Note the version. Some genius cataloged it with "ga" in lower case.
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moral of this story: always check what is really stored in Maven Central (or whichever repo contains the artifact). A quick check at http://repo1.maven.org/maven2/org/hibernate/hibernate-annotations/ would have shown what versions are available.
 
pramod talekar
Ranch Hand
Posts: 328
Eclipse IDE Java Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am back from the office now but I guess I had noticed the difference & tried out both ga & GA.
I also checked the dependencies for this particular artifact and had them inserted in my pom which worked fine.
Anyway, will let you know tomorrow.

Thanks a lot.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic