aspose file tools*
The moose likes Ant, Maven and Other Build Tools and the fly likes Help with (trivial?) Maven problem 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 "Help with (trivial?) Maven problem" Watch "Help with (trivial?) Maven problem" New topic
Author

Help with (trivial?) Maven problem

Toby Eggitt
Ranch Hand

Joined: Dec 08, 2004
Posts: 41
Hi gang,

So, first, I'm not a maven user, and don't really want to be. However, I'm trying to use Jersey 2.0, and it seems (perhaps I'm wrong, please advise if you know that's true!) that they have removed any means of obtaining the distributions for this new release except for Maven.

Can you tell me if I can issue a maven command (I have some XML that I understand is a POM) that will fetch the libraries and stick them somewhere so that I can then get on and do my own thing with them? I'm using NetBeans, and I have, or can get, a command line maven too, whichever is simpler will be fine. I just need the darn jars

TIA
Toby
Carles Gasques
Ranch Hand

Joined: Apr 19, 2013
Posts: 199
    
    1
Hi,

This works for me.
1) Add the below profile to your pom.xml
2) Execute this maven command mvn validate -P libs



Best regards,
Toby Eggitt
Ranch Hand

Joined: Dec 08, 2004
Posts: 41
Thanks for this. It seems there's a now (bigger??) problem, which is nothing (I believe) to do with maven and its commands. I now get the error:

[ERROR] Failed to execute goal on project my-app: Could not resolve dependencies for project com.mycompany.app:my-app:jar:1.0-SNAPSHOT: Failure to find javax.annotation:javax.annotation-api:jar:1.2 in http://repo1.maven.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced -> [Help 1]

Is this something I did wrong, or is something broken in the "maven-verse" out there that I have no control over?

TIA
Toby
Carles Gasques
Ranch Hand

Joined: Apr 19, 2013
Posts: 199
    
    1
Hi,

Try to change the dependency for javax.annotation in the pom.xml to



You can check the maven central repository web site for current avalaible artifacts, for example javax.annotation
maven central

Best regards,

Toby Eggitt
Ranch Hand

Joined: Dec 08, 2004
Posts: 41
I think that did it. I tweeked some other stuff at the same time, but it's good now. Many thanks!
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Help with (trivial?) Maven problem