This week's book giveaway is in the Java in General forum.
We're giving away four copies of Beginning Java 17 Fundamentals: Object-Oriented Programming in Java 17 and have ishori Sharan & Adam L Davis on-line!
See this thread for details.
Win a copy of Beginning Java 17 Fundamentals: Object-Oriented Programming in Java 17 this week in the Java in General forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

Help with (trivial?) Maven problem

 
Ranch Hand
Posts: 77
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 199
1
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 77
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 199
1
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 77
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think that did it. I tweeked some other stuff at the same time, but it's good now. Many thanks!
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic