jar management

Hi,

Our projects uses a lot third-party libraries, plus in order to manage the code complexity, we modularize our classes into stand-alone libraries compiled into jars that are then added to various projects as needed.

I'm finding that managing library dependencies in a project is becoming increasingly difficult and cumbersome, especially as the number of in-house libraries keeps creeping up. This is mostly due to the fact, that these libraries are constantly in flux, with new versions being released weekely or even daily. In order too prevent inconsistencies in library use among the team members, every library jar has a datestamp of when it was compiled. This means that when new jars are been released, one has to go into project setup and update the dependencies. This is where the cumbersomeness comes into play.

How do others deal with this issues?

I'm using Maven for packaging and deployment and I really like the way they've solved this problem by using a jar repository and a few other related useful features. Any chance that IDEA may adopt this approach in the future too?

4 comments
Comment actions Permalink

Dmitry Beransky wrote:

Hi,

Our projects uses a lot third-party libraries, plus in order to manage the code complexity, we modularize our classes into stand-alone libraries compiled into jars that are then added to various projects as needed.

I'm finding that managing library dependencies in a project is becoming increasingly difficult and cumbersome, especially as the number of in-house libraries keeps creeping up. This is mostly due to the fact, that these libraries are constantly in flux, with new versions being released weekely or even daily. In order too prevent inconsistencies in library use among the team members, every library jar has a datestamp of when it was compiled. This means that when new jars are been released, one has to go into project setup and update the dependencies. This is where the cumbersomeness comes into play.

How do others deal with this issues?

I'm using Maven for packaging and deployment and I really like the way they've solved this problem by using a jar repository and a few other related useful features. Any chance that IDEA may adopt this approach in the future too?

Define a project level library with the name that is not change. When the library jars are changed you're to change lib
definition only and all the dependencies would stay in tact.

--
Maxim Shafirov
IntelliJ Labs / JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"

0
Comment actions Permalink

Define a project level library with the name that is
not change. When the library jars are changed you're
to change lib definition only and all the dependencies
would stay in tact.


That's what I'm doing right now, but still, relinking libraries for different projects gets tiresome.

0
Comment actions Permalink

no_mail@jetbrains.com wrote:
>>Define a project level library with the name that is
>>not change. When the library jars are changed you're
>>to change lib definition only and all the dependencies
>>would stay in tact.


That's what I'm doing right now, but still, relinking libraries for different projects gets tiresome.

Write an Ant script that renames (or copies with new names) the jars to
stable jar names (e.g. you can use regular expressions or wildcards to
strip off the date stamp). Then all you'll have to do is run the Ant
script whenever new jars become available. It may take some tweaking
depending on your project requirements, but this is the simplest and
easiest way to keep such manual tasks automated.

--
Rob Harwood
Software Developer
JetBrains Inc.
http://www.jetbrains.com
"Develop with pleasure!"

0
Comment actions Permalink

It would be cool to be able to add a "directory containing jars" as a
library. The way the WEB-INF/lib directory of a war file works...

BoD


Rob Harwood wrote:

no_mail@jetbrains.com wrote:

>>> Define a project level library with the name that is
>>> not change. When the library jars are changed you're
>>> to change lib definition only and all the dependencies would stay in
>>> tact.
>>
>>
>>
>> That's what I'm doing right now, but still, relinking libraries for
>> different projects gets tiresome.
>>

Write an Ant script that renames (or copies with new names) the jars to
stable jar names (e.g. you can use regular expressions or wildcards to
strip off the date stamp). Then all you'll have to do is run the Ant
script whenever new jars become available. It may take some tweaking
depending on your project requirements, but this is the simplest and
easiest way to keep such manual tasks automated.

0

Please sign in to leave a comment.