• Post Reply Bookmark Topic Watch Topic
  • New Topic

Java package manager  RSS feed

 
Paolo Dina
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does it exist for Java a package manager with dependencies management, to write a sort of jar install packagename and get both packagename and dependencies installed?

Thanks
 
Daesung Park
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can find package analysis tools such as JDepend, but I am not sure these can meet your needs.

If you use Maven, dependencies between packages can be explicitly described.
 
Petrus Pelser
Ranch Hand
Posts: 132
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can also try Apache Ivy. You can use it with Ant or stand-alone.
 
Paolo Dina
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys, thanks for your suggestions, I'll get a look at Maven and Ivy soon but I'm not sure they do what I want. What I was looking for is a pratical way to automatically download (from a package repository like CPAN, Pear or PyPI but for Java) and install 3rd party Java packages, with all dependencies included.

As an example, if I want to use delicious Java API actually I have to:
1. find this package over the internet, download and install it inside a directory listed in CLASSPATH. So far so good.
2. find the package that provides HttpClient type required by delicious API (commons-httpclient-3.1.jar contains that but I had to search for it) and install it. Hmmm... ok :-(
3. download, install dependencies for HttpClient (commons-codec, commons-logging, junit) and hope that these packages have not other requirements in terms of other packages they need :-)
4. finally use delicious API to write client classes.

Sorry, probably I didn't explain it clearly in my original post. The question was if there is a way to automate steps 1, 2 and 3 without having to setup and configure a fully featured build system (or even a "simple" standalone ivy).

Thanks!
 
Martijn Verburg
author
Bartender
Posts: 3275
5
Eclipse IDE Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Maven and/or Ivy for Ant is definitely what you're after in that case. You declare what lib you want it they resolve and download the dependencies for you. Give them a go and you can ask further questions in our Maven, Ant and Build Tools forum if you get stuck!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!