• Post Reply Bookmark Topic Watch Topic
  • New Topic

download Jersey by maven

 
zb cong
Ranch Hand
Posts: 416
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

i am new to maven, in this page

http://jersey.java.net/download.html

it said that i can download Jersey by maven, i have installed maven by set bin in the path. but it does not provide steps how to use the maven to download Jersey, who can help to list the steps here, thanks a lot.
 
Amir Keibi
Ranch Hand
Posts: 49
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is a Maven question. It would've gotten better visibility if posted to their mailing list.

However,

Create Jersey's folder structure (org/glassfish/jersey/) in your maven's local repository (~/.m2/repository/) and download everything (or pieces that you need) from central repository to that folder. So if you need version "2.0-m13" of "jax-rs-ri" you'll need to download "jax-rs-ri-2.0-m13.jar" from "http://repo1.maven.org/maven2/org/glassfish/jersey/jax-rs-ri/2.0-m13/" to "~/.m2/repository/org/glassfish/jersey/jax-rs-ri/2.0-m13/". As it can be seen, your local repository's root maps to the central repository's root.
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm guessing that the Maven folks would banish you from their list if you asked how to add a specific dependency on their mailing list :-)
 
Amir Keibi
Ranch Hand
Posts: 49
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Or as Ulf pointed out, you can add a dependency tag for that particular component to your POM file and build your application with maven. Maven will then download and install the component in your local repository.

That's what you were saying Ulf, right?
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes indeed.
 
Amir Keibi
Ranch Hand
Posts: 49
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, the page in the original message talks about using Jersey as an archetype. I guess including an explicit dependency (even with "Provided" scope) in the project's POM may not be ideal. He may want to keep the POM clean and only include direct dependencies. Hence, I suggested the manual installation.
 
Jayesh A Lalwani
Rancher
Posts: 2762
32
Eclipse IDE Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Usually, when someone tells me to use an archetype, I use their archetype once, open the generated POM to figure out what it does, and then add those things manually into my POM. Usually, when I need something, I have already started a web/standalone project. I want to use someone else's dependency in my project. I don;t want to frigging throw away my POM just so I can use a library!


This post paid for the Dept of We-need-no-stinking-archetypes
I am the President of Dept of We-need-no-stinking-archetypes and I approve this message
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!