tags:

views:

63

answers:

3

Hi,

I am trying to build a simple war file which has a few jsps. However I am coming across an odd issue, for some reason during the packaging maven is pulling 4 jar files into the WEB-INF/lib. I have trimmed down all the fat from the pom file, and have grepped for any references to these jars without any success. I cannot figure out where maven is pulling them from. I tried 'mvn dependency:build-classpath' and the classpath is empty. Please help, these jars are corrupt and I cannot deploy this war file because of them.

Thanks,

natasha

+1  A: 

You are very likely getting these dependency transitively and your best weapon to debug this is:

mvn dependency:tree

This should help you to find the culprit.

Just a wild guess: do you have a dependency on log4j-1.2.15.jar?

Pascal Thivent
A: 

I cannot get 'mvn dependency:tree' to work I am getting 'Required goal not found: dependency:tree'. I have Maven version: 2.0.4. And no, I do not have log4j-1.2.15.jar dependency.

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:maven="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"&gt;
    <modelVersion>4.0.0</modelVersion>
    <groupId>com.xxx.mobile</groupId>
    <artifactId>mobile-war</artifactId>
    <version>1.0-SNAPSHOT</version>
    <packaging>war</packaging>
    <name>mobile war</name>
    <scm>
        <url>http://xxx/cgi-bin/viewvc.cgi/apps/packages/mobile-war/trunk/&lt;/url&gt;
        <connection>scm:svn:http://xxx/svn/apps/packages/mobile-war/trunk/&lt;/connection&gt;
        <developerConnection>scm:svn:http://xxx/svn/apps/packages/mobile-war/trunk/&lt;/developerConnection&gt;
    </scm>
    <distributionManagement>
        <repository>
            <id>bluefly-corporate-repository</id>
            <name>Bluefly Repository</name>
            <uniqueVersion>false</uniqueVersion>
            <url>file:///mnt/xxx-repository</url>
        </repository>
    </distributionManagement>
    <repositories>
        <repository>
            <id>central</id>
            <name>Internal Mirror of Central Repository</name>
            <url>http://xxx/maven2&lt;/url&gt;
        </repository>
    </repositories>
    <pluginRepositories>
        <pluginRepository>
            <id>central</id>
            <name>Internal Mirror of Central Repository</name>
            <url>http://xxx/maven2&lt;/url&gt;
        </pluginRepository>
    </pluginRepositories>

    <build>
        <finalName>iphone</finalName>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-war-plugin</artifactId>
                <version>2.0</version>
                <configuration>
                    <archive>
                        <manifestEntries>
                            <ATG-Module-Uri>test.war</ATG-Module-Uri>
                            <ATG-Context-Root>test</ATG-Context-Root>
                            <ATG-Module-Version>test.war</ATG-Module-Version>
                        </manifestEntries>
                    </archive>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>
Not sure what version of the dependency plugin you get in Maven 2.0.4. The following command should work: `mvn org.apache.maven.plugins:maven-dependency-plugin:2.1:tree`.
Pascal Thivent
A: 

Sorry to trouble you all, I found them :(