mvn site
see the tree of dependencies
use exclusions in your dependencies
http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html

On 2/6/07, Tandon, Pankaj <[EMAIL PROTECTED]> wrote:
Hi all,
We've been using Maven 1.1 for more that a year now and are looking to
move to M2.
With M1 our project.xml file had dependencies specified explicitly
because there was no support for transitive dependencies. As a result,
the jar files we downloaded for our webapp weighed in at about 11Meg.
While building our M2 pom.xml file(s), we kept adding dependencies (in
the pom.xml) till we got a clean compile. However now the size of the
dependent artifacts has doubled to a whopping 23Meg! And they make it to
the WEB-INF/lib increasing the size of our final artifact.

So the questions are:
1. How can we control what get's into WEB-INF/lib. We tried all the
scopes mentioned, but that did not help. There used to be a
<properties><war.bundle>true</war.bundle></properties> in the dependency
node in M1, but that is no longer available in M2. So even if I have
more depoendencies at compile time, how can I prevent my war artifact
from getting bloated?

2. How can we exclude second and third level dependencies. And IF we can
do so, how do I know what the dependency graph is for some of the
downloaded jars.
For instance, there is a jar file (that is about 3Meg in size) called
apacheds-core-0.9.jar. We know our app does not need this becuase if we
delete this file, the app works just fine.

2a. How do I find out what top level dependecny that is specified in the
pom caused a certain file to be downloaded? If we figure that out maybe
we can use the exclude element in each dependency to NOT load this
dependency.
For instance, how do I find out what top level dependency in my pom
caused this apacheds-core-0.9.jar to land up in my local repository.
Infact, this jar does not even exist on http://repo1.maven.org/maven2/
unless I google it out and find it is tucked away here
http://repo1.maven.org/maven2/directory/.

3. Is there a way to go back to explicit dependencies (non-transitive)
in the pom.xml?


Thanks in advance,
Pankaj



--
I could give you my word as a Spaniard.
No good. I've known too many Spaniards.
                            -- The Princess Bride

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to