Hi,

You can use the dependency <exclusions> tag in your pom to explicitly exclude the
specific jar you don't want to be downloaded.

See http://maven.apache.org/ref/current/maven-model/maven.html#class_dependency for
more info about it.

This might also be useful http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html

Thanks,
Deng

Thinkboy wrote:
hi,

my servlet-api version is conflict due to transitive dep

e.g.

i)  commons-logging-1.0.3.jar  -> servlet-api-2.2.jar
ii) jetty-6.1.1.jar -> servlet-api-2.2.jar


after I packaged all to /lib directory, in which both servlet-api-2.2.jar and servlet-api-2.2.jar are located. when I try to run application which is built with Jetty. it throws Exception bcos, jetty app loaded servlet-api-2.2.jar API instead of servlet-api-2.2.jar

my question: what is the correct way to handle ver conflict?
1) possible to exclue this servlet-api-2.2.jar in dependency-maven-plugin ? 2) or the worse case, a maven plugin that I can specify in pom.xml to remove jar in /lib ?

I am using depency-maven-plugin to generate a set of all necessary jar in /lib
<!-- PLUGIN: dependency, copy all depended jars to lib -->
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>dependency-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>copy-dependencies</id>
                        <phase>package</phase>
                        <goals>
                            <goal>copy-dependencies</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>
                                ${project.build.directory}/lib
                            </outputDirectory>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

pls advise
~manchi



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


!DSPAM:602,46133fa1153191147216240!



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

Reply via email to