我正在尝试MANIFEST.MF
为 jar-packaged 工件和 test-jar-packaged 创建不同的文件。maven-jar-plugin
用于将其他东西添加到-MANIFEST.MF
到目前为止效果很好。但是,如果我想MANIFEST.MF
为 testproject 选择不同的模板文件,Maven 只对两个工件使用第二个引用的模板......
我怎样才能让 Maven 使用PROD-MANIFEST.MF-template
普通的 jar-packaging 和TEST-MANIFEST.MF-template
test-jar-packaging?
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<executions>
<execution>
<id>test-manifest-mf</id>
<phase>package</phase>
<goals>
<goal>test-jar</goal>
</goals>
</execution>
</executions>
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
</manifest>
<manifestFile>foo/TEST-MANIFEST.MF</manifestFile>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<executions>
<execution>
<id>default-manifest-mf</id>
<phase>package</phase>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
</manifest>
<manifestFile>foo/PROD-MANIFEST.MF</manifestFile>
</archive>
</configuration>
</plugin>