Maven

I have a maven build that is copying a bunch of jars that it should not be into WEB-INF/lib for my war project.

The jars do not show up in the output of mvn dependency:tree but mvn package puts these (among other) jars into the WEB-INF/lib directory of the generated war file:

maven-artifact, maven-artifcat-manager, maven-profile, maven-project, maven-settings...

Where are these coming from? What (other than dependency:tree) might show me what is causing these jars to be included? I have done a mvn clean and rebuild and same thing.

It seems that when I add this plugin I get the extra jars added:

  <plugin>
    <groupId>org.codehaus.mojo</groupId>
    <artifactId>xmlbeans-maven-plugin</artifactId>
    <version>2.2.0</version>
    <executions>
      <execution>
        <id>xmlbeans-generate-compile</id>
        <phase>generate-sources</phase>
        <goals>
          <goal>xmlbeans</goal>
          <goal>xmlbeans-test</goal>
        </goals>
      </execution>
    </executions>
    <configuration>
      <verbose>true</verbose>
      <sourceGenerationDirectory>src/xmlbean/java</sourceGenerationDirectory>
      <classGenerationDirectory>target/xmlbean/build</classGenerationDirectory>
      <schemaDirectory>src/main/components</schemaDirectory>
    </configuration>
  </plugin>
</plugins>

The rest of the POM is just dependency stuff and this:

<plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>2.3.2</version>
        <configuration>
          <source>1.6</source>
          <target>1.6</target>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>2.16</version>
        <configuration>
          <argLine>-Dfile.encoding=UTF-8</argLine>
          <additionalClasspathElements>
            <additionalClasspathElement>${basedir}/tests</additionalClasspathElement>
          </additionalClasspathElements>
        </configuration>
        <dependencies>
          <dependency>
            <groupId>org.apache.maven.surefire</groupId>
            <artifactId>surefire-junit47</artifactId>
            <version>2.15</version>
          </dependency>
        </dependencies>
      </plugin>
链接地址: http://www.djcxy.com/p/74666.html

上一篇: 我可以从lib中的JAR内部提供JSP吗,还是有解决方法?

下一篇: Maven的