• 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
  • Junilu Lacar
  • Liutauras Vilda
Sheriffs:
  • Paul Clapham
  • Jeanne Boyarsky
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
Bartenders:
  • Jesse Duncan
  • Frits Walraven
  • Mikalai Zaikin

download Jersey by maven

 
Ranch Hand
Posts: 416
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 49
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Rancher
Posts: 43028
76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 43028
76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes indeed.
 
Amir Keibi
Ranch Hand
Posts: 49
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Rancher
Posts: 2759
32
Eclipse IDE Spring Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Bring me the box labeled "thinking cap" ... and then read this tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic