Maven的

我有一个maven构建,它正在复制一堆不应该放入我的战争项目的WEB-INF / lib中的jar。

这些jar不会显示在mvn dependency:tree的输出中mvn dependency:tree但是mvn package会将这些(以及其他)jar放入生成的war文件的WEB-INF / lib目录中:

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

这些来自哪里? 什么(除了依赖:树)可能会告诉我是什么导致这些罐子被包括在内? 我已经完成了mvn clean和重建工作。

看来,当我添加这个插件时,我添加了额外的jar文件:

  <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>

POM的其余部分只是依赖性的东西,而这个:

<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/74665.html

上一篇: Maven

下一篇: Adding JAR from local to the WAR packing using Maven