Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Library management
Library management [message #143058] Wed, 18 February 2004 21:48 Go to next message
Eclipse UserFriend
Originally posted by: igor.noemail.com

Hi,

doesn't Eclipse have a Java library management that allows to define
libraries each with a set of JARs, sources, docs and library
dependencies? I would like to use them for different projects without
having to add the JARs over and over again.

If Eclipse itself does not support it, is there a plugin that does?

I worked with JBuilder for a long time and liked its library
management a lot. Now that I switched to eclipse, I miss this feature.

Igor
Re: Library management [message #143101 is a reply to message #143058] Wed, 18 February 2004 21:57 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: richkulp.NO.SPAM.us.ibm.com

You create a project, put the libraries in there, mark them as exported
in the the java build path for the project, and then in other projects
that need that set of libraries, add that common project to the required
projects list within the java build path of the new project.


--
Thanks, Rich Kulp

Re: Library management [message #143110 is a reply to message #143058] Wed, 18 February 2004 22:00 Go to previous messageGo to next message
Patrick Mueller is currently offline Patrick MuellerFriend
Messages: 13
Registered: July 2009
Junior Member
Igor Akkerman wrote:

> doesn't Eclipse have a Java library management that allows to define
> libraries each with a set of JARs, sources, docs and library
> dependencies? I would like to use them for different projects without
> having to add the JARs over and over again.
>
> If Eclipse itself does not support it, is there a plugin that does?

I'm starting to play with Maven - http://maven.apache.org

It has an interesting approach to this problem, maintaing a separate
repository of libraries. There is an 'eclipse' plugin for maven (note,
a plugin written for maven, not an eclipse plugin you use in eclipse)
that will build a .classpath for you based on your library dependencies.

--
Patrick_Mueller@us.ibm.com
Re: Library management [message #143119 is a reply to message #143110] Wed, 18 February 2004 22:01 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: if.you.want.to.email.visit.joshbrain.tripod.org

Patrick Mueller <Patrick_Mueller@us.ibm.com> wrote in news:c10n3s$uio$1
@eclipse.org:

> It has an interesting approach to this problem, maintaing a separate
> repository of libraries. There is an 'eclipse' plugin for maven (note,
> a plugin written for maven, not an eclipse plugin you use in eclipse)
> that will build a .classpath for you based on your library dependencies.

Rich culp mentioned in another post a way to simulate this within Eclipse:
create a "Libraries" project with just a bunch of exported jars, then have
your other projects (those with actual source code and stuff) depend on
that other project. This scheme works suprisingly well, until you have to
deploy something! Then you have to worry about which libraries you actually
need. Kind of a PITA, but until someone writes a tool that does this
dependency checking for you it's the best way.
Re: Library management [message #143157 is a reply to message #143119] Wed, 18 February 2004 23:00 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: hhzz60.hotmail.com

I do something similar and solve the deploy issue by sorting the JARs into
two different directories. One for runtime the other for development. I
do not duplicate any jars, I just compile against both directories, but when
ANT builds a deployment I just pickup the runtime jars.

Example:

/commons/lib/dev
junit.jar
j2ssh-ant.jar
axis-1_1-src.zip

/commons/lib/runtime
axis-1_1.zip
xalan.jar

You will also note that I zip of the source to some libraries and put the
zip into dev. I can then link the source to a runtime lib. This is all
checked into CVS and all paths are relative so that all developers on the
team can get a consistent view.



"Josh" <if.you.want.to.email@visit.joshbrain.tripod.org> wrote in message
news:Xns94938F4D93B83ifyouwanttoemailvisi@204.138.98.10...
> Patrick Mueller <Patrick_Mueller@us.ibm.com> wrote in news:c10n3s$uio$1
> @eclipse.org:
>
> > It has an interesting approach to this problem, maintaing a separate
> > repository of libraries. There is an 'eclipse' plugin for maven (note,
> > a plugin written for maven, not an eclipse plugin you use in eclipse)
> > that will build a .classpath for you based on your library dependencies.
>
> Rich culp mentioned in another post a way to simulate this within Eclipse:
> create a "Libraries" project with just a bunch of exported jars, then have
> your other projects (those with actual source code and stuff) depend on
> that other project. This scheme works suprisingly well, until you have to
> deploy something! Then you have to worry about which libraries you
actually
> need. Kind of a PITA, but until someone writes a tool that does this
> dependency checking for you it's the best way.
Re: Library management [message #143188 is a reply to message #143157] Wed, 18 February 2004 23:27 Go to previous messageGo to next message
Patrick Mueller is currently offline Patrick MuellerFriend
Messages: 13
Registered: July 2009
Junior Member
Kurt wrote:

> I do something similar and solve the deploy issue by sorting the JARs into
> two different directories. One for runtime the other for development. I
> do not duplicate any jars, I just compile against both directories, but when
> ANT builds a deployment I just pickup the runtime jars.

Another thing I've done in the past, is to drop 3rd party libraries each
into a separate source folder. I put the source folder on the
..cvsignore. And then have an Ant script that fetches the source for the
library and unpacks it into the source folder. This allows me to have
the full source available at dev and runtime, classes compiled live, and
not keep it in CVS.

The bit about classes compiled live is somewhat disheartening though.
Non-eclipse users tend to leave all kind of droppings around that
eclipse users would clean up. Extraneous imports being the most common,
most annoying, but least problematic flavor of this.

I seem to remember having to kludge the .classpath though, as it
>really< did not like having references to source folders that didn't
exist. So the steps after loading the project from cvs were something like:

- run the script to fetch the source, populate the source folder

- manually copy over a copy of the real .classpath contents in a file
not named ".classpath" to the .classpath file. I reckon, now, that I
could have had the script do this, or been super-smart and have the
script fix up the .classpath live.

--
Patrick_Mueller@us.ibm.com
Re: Library management [message #143312 is a reply to message #143188] Thu, 19 February 2004 12:05 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: igor.noemail.com

Hi,

thanks everybody for your quick replies. In my opinion, all of your
suggestions are some kinds of workarounds for the real problem. They
are smart but not really clean solutions as I expect them from a good
IDE. That makes them complex and time wasting in the daily use.

This is why I think that Eclipse should have its own real library
management.

Igor
Re: Library management [message #143333 is a reply to message #143312] Thu, 19 February 2004 14:18 Go to previous messageGo to next message
Patrick Mueller is currently offline Patrick MuellerFriend
Messages: 13
Registered: July 2009
Junior Member
Igor Akkerman wrote:
> thanks everybody for your quick replies. In my opinion, all of your
> suggestions are some kinds of workarounds for the real problem.

I don't disagree with this.

> They are smart but not really clean solutions as I expect them from a good
> IDE. That makes them complex and time wasting in the daily use.

I do disagree with this. I think all the options presented are things
that hit you in two ways:

- setting up the architecture/tools for this
- 'resetting' your project after loading it

So sure, the setup for this is non-trivial (but almost cut-n-paste for
me at this point). And the setup is a PITA, but something you do very
rarely (reloading your project from your repo). In daily use, it most
certainly is *not* complex or time wasting.

> This is why I think that Eclipse should have its own real library
> management.

I think Maven is moving in the right direction; I'm trying to figure out
the minimum amount of plugin coding I can do to help make maven usable
in the IDE right now. Maven has a good foundation of a project object
model, that it would be a shame to have to invent yet another one. It's
not perfect; for instance, it doesn't allow you to pull source jars as
libraries. But more importantly, the sheer number of goodies that Maven
provides is something that would be great to get for free within Eclipse
as well.

--
Patrick_Mueller@us.ibm.com
Re: Library management [message #143343 is a reply to message #143312] Thu, 19 February 2004 14:48 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: hcs33.egon.gyaloglo.hu

Hi,

A better library support is planned afaik. See bug
https://bugs.eclipse.org/bugs/show_bug.cgi?id=50461. You are welcome to add
your comments there I think. For the time being you can use the UserLib
plugin mentioned in this bug report:
http://www.javango.net/eclipse/userlib.html. Maybe it fits your needs.

HTH,
Regards,
Csaba

"Igor Akkerman" <igor@noemail.com> wrote in message
news:1c89305ti4qi0kodh3ugm1v21shkp6rrrb@4ax.com...
> Hi,
>
> thanks everybody for your quick replies. In my opinion, all of your
> suggestions are some kinds of workarounds for the real problem. They
> are smart but not really clean solutions as I expect them from a good
> IDE. That makes them complex and time wasting in the daily use.
>
> This is why I think that Eclipse should have its own real library
> management.
>
> Igor
>
Re: Library management [message #143391 is a reply to message #143333] Thu, 19 February 2004 16:13 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: igor.noemail.com

Hi Patrick,

Patrick Mueller <Patrick_Mueller@us.ibm.com> schrieb:
>I think Maven is moving in the right direction; I'm trying to figure out
>the minimum amount of plugin coding I can do to help make maven usable
>in the IDE right now. Maven has a good foundation of a project object
>model, that it would be a shame to have to invent yet another one. It's
>not perfect; for instance, it doesn't allow you to pull source jars as
>libraries. But more importantly, the sheer number of goodies that Maven
>provides is something that would be great to get for free within Eclipse
>as well.

Well, of course, if Maven can be integrated into the IDE, this is the
right thing to do. But isn't the JDT project object model already "yet
another one"? Isn't just the library management missing?

Igor
Re: Library management [message #143437 is a reply to message #143391] Thu, 19 February 2004 16:53 Go to previous messageGo to next message
Patrick Mueller is currently offline Patrick MuellerFriend
Messages: 13
Registered: July 2009
Junior Member
Igor Akkerman wrote:

> Hi Patrick,

Hello!

> Well, of course, if Maven can be integrated into the IDE, this is the
> right thing to do. But isn't the JDT project object model already "yet
> another one"? Isn't just the library management missing?

Well, comparing the maven project model to eclipse's makes eclipse's
look quite weak, IMO.

But having said that, extending the current JDT project model to handle
libraries better would be great. Even better if it could take advantage
of maven's library repository.

The best way to integrate Maven is to make a new type of project and
associated builder. There's stuff that Maven allows that is simply not
possible with the current Java project builder (like having per-source
folder class paths). And you want quick ways to do all the groovy Maven
stuff like run all your tests (using the UI, not text runner), rebuild
your web site, deploy your web site, etc.

I've been living with the equivalent of the current Java project object
model since the days of Envy/Smalltalk; it hasn't changed so much. I
see Maven as the next gen; there is space for both the 'simple' JDT
model, and the wacky, more-dynamic, does-everything maven model.
Getting them to integrate would be another problem area (getting a
traditional JDT project to 'reference' a Maven project; probably a Maven
project will have to 'be' a JDT project, lest we create a meta-model ...)

--
Patrick_Mueller@us.ibm.com
Re: Library management [message #143480 is a reply to message #143343] Thu, 19 February 2004 17:18 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: igor.noemail.com

Hi Csaba!

"Horváth, Csaba" <hcs33@egon.gyaloglo.hu> schrieb:
>A better library support is planned afaik. See bug
>https://bugs.eclipse.org/bugs/show_bug.cgi?id=50461. You are welcome to add
>your comments there I think. For the time being you can use the UserLib
>plugin mentioned in this bug report:
>http://www.javango.net/eclipse/userlib.html. Maybe it fits your needs.

I've just installed the UserLib plugin and this is what I imagined.
The dependency on other libraries is still missing to me but I can do
without for the time being. I will also post my comments and ideas to
the bug page.

I can't tell you often enough: Thanks a lot for the links. You just
prevented me from going back to JBuilder. :-)

Igor
Re: Library management [message #143580 is a reply to message #143480] Thu, 19 February 2004 21:09 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: smesh.openrules.com

> I've just installed the UserLib plugin and this is what I imagined.

What's wrong with Rich Kulp's advise (library project)?

Sam Mesh - http://openrules.com
Life is very short, and there's no time,
For coding and testing, my friend.
Re: Library management [message #143630 is a reply to message #143580] Thu, 19 February 2004 23:07 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: igor.noemail.com

Sam Mesh <smesh@openrules.com> schrieb:

>> I've just installed the UserLib plugin and this is what I imagined.
>
>What's wrong with Rich Kulp's advise (library project)?

For me, it is important to make a distinction between projects and
libraries. It is cleaner in any way and makes it easier to manage
them. For me, a project is something *i* work on, whereas a library is
something I need for my project.

Plus: The libraries would appear in any project list where I don't
really want to see them.

Igor
Re: Library management [message #143652 is a reply to message #143630] Thu, 19 February 2004 23:50 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: smesh.openrules.com

>>>I've just installed the UserLib plugin and this is what I imagined.
>>
>>What's wrong with Rich Kulp's advise (library project)?
>
> For me, it is important to make a distinction between projects and
> libraries. It is cleaner in any way and makes it easier to manage
> them. For me, a project is something *i* work on, whereas a library is
> something I need for my project.
> Plus: The libraries would appear in any project list where I don't
> really want to see them.

Let's introduce, say, RuleSets. How do you prefer to see them?
1. Additional ruleset-nature that can be added to the project.
2. New concept that "makes a distinction between projects and ..." :)

Sam Mesh - http://openrules.com
Life is very short, and there's no time,
For coding and testing, my friend.
Re: Library management [message #143658 is a reply to message #143652] Fri, 20 February 2004 00:14 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: igor.noemail.com

Sam Mesh <smesh@openrules.com> wrote:

>> For me, it is important to make a distinction between projects and
>> libraries. It is cleaner in any way and makes it easier to manage
>> them. For me, a project is something *i* work on, whereas a library is
>> something I need for my project.
> > Plus: The libraries would appear in any project list where I don't
>> really want to see them.
>
>Let's introduce, say, RuleSets. How do you prefer to see them?
>1. Additional ruleset-nature that can be added to the project.
>2. New concept that "makes a distinction between projects and ..." :)

Sorry, I don't really understand what you're trying to tell us. Is it
that it is better to have one concept and everything is an instance of
this concept instead of having many concepts?

Igor
Re: Library management [message #144106 is a reply to message #143333] Fri, 20 February 2004 19:32 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: KingD.tmicha.net

"Patrick Mueller" <Patrick_Mueller@us.ibm.com> wrote in message
news:c12gdv$smp$1@eclipse.org...
>
> I think Maven is moving in the right direction; I'm trying to figure out
> the minimum amount of plugin coding I can do to help make maven usable
> in the IDE right now. Maven has a good foundation of a project object
> model, that it would be a shame to have to invent yet another one. It's
> not perfect; for instance, it doesn't allow you to pull source jars as
> libraries. But more importantly, the sheer number of goodies that Maven
> provides is something that would be great to get for free within Eclipse
> as well.


There already is an maven plug-in for Eclipse (as opposed to the eclipse
plug-in within Maven). See http://mevenide.sourceforge.net. It's still a
work in progress, but I've begun to use it. Note that it only works in
Eclipse 3.0 and not all features work correctly.
--
Dale King
Re: Library management [message #144147 is a reply to message #144106] Fri, 20 February 2004 22:51 Go to previous message
Eclipse UserFriend
Originally posted by: igor.noemail.com

>There already is an maven plug-in for Eclipse (as opposed to the eclipse
>plug-in within Maven). See http://mevenide.sourceforge.net. It's still a
>work in progress, but I've begun to use it. Note that it only works in
>Eclipse 3.0 and not all features work correctly.

Thanks for the hint! Could you say what features currently work well
and which ones don't?

Igor
Previous Topic:Standalone or plug-in project
Next Topic:3.0m7 build 200310101454 - read file in: "c:\Program Files" fails when using getResource
Goto Forum:
  


Current Time: Sat Nov 09 03:37:18 GMT 2024

Powered by FUDForum. Page generated in 0.06705 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top