You can use exclusions to cut out transitive dependencies.

In the following example, we want our lms-facades package but we do not want the faces and logging dragged in with it.

<dependency>
<groupId>com.artifact_software.lms</groupId>
<artifactId>lms-facades</artifactId>
<version>1.8.1</version>
<exclusions>
<exclusion>
<artifactId>jsf-api</artifactId>
<groupId>javax.faces</groupId>
</exclusion>
<exclusion>
<artifactId>jsf-impl</artifactId>
<groupId>javax.faces</groupId>
</exclusion>
<exclusion>
<artifactId>commons-logging</artifactId>
<groupId>commons-logging</groupId>
</exclusion>
</exclusions>
</dependency>


Ron

On 18/05/2010 8:42 AM, AVSUNIL wrote:
Hi,

I have project A which produces artifact as war. Project A has dependency on
project B and it is mentioned in the pom of Project A. Now the build of
Project A is acting indifferently in 2 environments

a) When I am building from my local/development envionment, it builds the
war with only the dependencies mentioned in its pom

b) When I build from my test environment, it builds the war with dependecies
mentioned in pom as well as dependecies of dependecies. This is undesirable
as war will become very big as well as unwanted versions might cree through

How do I get the behaviour of my dev env in test env also? How do I make
sure dependecies of dependencies does not come inot my war?
I am only using pom and and not the assembly descriptor.
Both environment have the same build script which checksout the latest
from SVN and then does
mvn clean
mvn compile
mvn package

Thanks
Sunil



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to