虽然我在pom.xml中有<packagingExcludes> WEB-INF / lib / *。jar </packagingExcludes>标记,但是我的构建无法排除那些软件包或jar

时间:2019-07-16 11:28:04

标签: java maven jenkins

尽管我在<packagingExcludes>WEB-INF/lib/*.jar</packagingExcludes>中有pom.xml标记,但是我的构建无法排除那些软件包或jar。

第八,在.mf(Manifest file)中创建类路径

<profiles>
  <profile>
    <id>dev</id>
  </profile>
  <profile>
    <id>deploy</id>
    <activation>
      <activeByDefault>true</activeByDefault>
    </activation>
    <build>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-war-plugin</artifactId>
          <configuration>
            <packagingExcludes>WEB-INF/lib/*.jar</packagingExcludes>
            <archive>
              <manifest>
                <addClasspath>true</addClasspath>
                <classpathPrefix>lib/</classpathPrefix>
                <useUniqueVersions>false</useUniqueVersions>
              </manifest>
            </archive>
          </configuration>
        </plugin>
      </plugins>
    </build>
  </profile>
</profiles>

0 个答案:

没有答案