On 05/02/2013 10:35 AM, Wayne Fay wrote:
way.  Taking dependencies and packing them all into a single archive is
certainly doable, but when you're planning on going into an environment
like OSGi, that's a bad, bad idea.  :)
I don't think Ron has literally built a single JAR with those
artifacts all glommed together. Instead, he has a single Maven project
(pom) that declares Hibernate, Tomcat, Spring etc as dependencies.
Then he depends on THAT pom project in his own projects. That brings
all those dependencies (in those specific versions) in transitively.
 At compile time, you are right.
Since the dependency is "provided" it does not get added to our war files.


Then he goes another step and specifies that pom as scope provided and
puts all those jars in the server or lib folder of his app server.
This keeps his actual project wars tiny and quick to deploy, and his
various projects use the same small number of version-specific
artifacts/dependencies across the board.
We do make a single jar for each group in the group POM and put that in the Tomcat lib at run time.
This just keeps the clutter down.
It makes sure that we get the same versions of everything with which we did the builds of the wars, without having to deal with 70+ jar files.

It also makes it a bit easier to make sure that everyone has the right versions on there workstations when testing. The aggregated jar has the version number of the target release so if you see a Spring-Hibernate-MySql-Tomcat-1.9.jar and you are supposed to be working on 1.10, you know that you have a problem. If you have to look through the versions on 20 jars files in a library with 70+ jars, you may miss the fact that the person is testing with an different combination of jars.

The war files don't care how the libraries get there.

Unsure how well this fits in with OSGi.

Me neither, but I would like to hear anyone's opinion.

Wayne

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org




--
Ron Wheeler
President
Artifact Software Inc
email: rwhee...@artifact-software.com
skype: ronaldmwheeler
phone: 866-970-2435, ext 102


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org

Reply via email to