Maven之-使用自已的Manifest File
程序员文章站
2022-06-09 08:03:30
...
By default, Maven Archiver generates the manifest file for you. It is sometimes useful to use your own hand crafted manifest file. Say that you want to use the manifest file src/main/resources/META-INF/MANIFEST.MF. This is done with the <manifestFile> configuration element by setting the value to the location of your file.
The content of your own manifest file will be merged with the entries generated by Maven Archiver. If you specify an entry in your own manifest file it will override the value generated by Maven Archiver.
Note: As with all the examples here, this configuration can be used in all plugins that use Maven Archiver, not just maven-jar-plugin as in this example.
<project>
...
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
...
<configuration>
<archive>
<manifestFile>src/main/resources/META-INF/MANIFEST.MF</manifestFile>
</archive>
</configuration>
...
</plugin>
</plugins>
</build>
...
</project>
The content of your own manifest file will be merged with the entries generated by Maven Archiver. If you specify an entry in your own manifest file it will override the value generated by Maven Archiver.
Note: As with all the examples here, this configuration can be used in all plugins that use Maven Archiver, not just maven-jar-plugin as in this example.
<project>
...
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
...
<configuration>
<archive>
<manifestFile>src/main/resources/META-INF/MANIFEST.MF</manifestFile>
</archive>
</configuration>
...
</plugin>
</plugins>
</build>
...
</project>
上一篇: freemarker自定义标签(一)【适用于JeecmsV8】
下一篇: 存储技术摘录—iSCSI
推荐阅读
-
Java全栈程序员之07:IDEA中使用MAVEN构架生产级的Web项目
-
开发自己的Maven插件之六:使用自己的report-plugin
-
Maven之-使用自已的Manifest File
-
Maven之-使用自已的Manifest File
-
介绍Manifest文件的使用(sundy深入浅出)之基础概念 manifest
-
介绍Manifest文件的使用(sundy深入浅出)之基础概念
-
Java全栈程序员之07:IDEA中使用MAVEN构架生产级的Web项目
-
解决使用maven的java web项目导入后出现的有关问题 -cannot be read or is not a valid ZIP file...