maven-archiver 中文官方文档

痛定思痛。 2022-12-27 04:39 254阅读 0赞

原文地址

Maven Archiver 主要由插件用于处理打包。在这个页面的Since列中引用的版本号是Maven Archiver组件的版本—不是任何特定插件的版本。要查看插件使用的 Maven Archiver 版本,请访问该插件的站点。

  1. <archive>
  2. <addMavenDescriptor/>
  3. <compress/>
  4. <forced/>
  5. <index/>
  6. <pomPropertiesFile/>
  7. <manifestFile/>
  8. <manifest>
  9. <addClasspath/>
  10. <addDefaultEntries/>
  11. <addDefaultImplementationEntries/>
  12. <addDefaultSpecificationEntries/>
  13. <addBuildEnvironmentEntries/>
  14. <addExtensions/>
  15. <classpathLayoutType/>
  16. <classpathPrefix/>
  17. <customClasspathLayout/>
  18. <mainClass/>
  19. <packageName/>
  20. <useUniqueVersions/>
  21. </manifest>
  22. <manifestEntries>
  23. <key>value</key>
  24. </manifestEntries>
  25. <manifestSections>
  26. <manifestSection>
  27. <name/>
  28. <manifestEntries>
  29. <key>value</key>
  30. </manifestEntries>
  31. <manifestSection/>
  32. </manifestSections>
  33. </archive>

存档


































































元素 描述 类型
addMavenDescriptor 创建的归档文件是否包含这两个Maven文件:
1. pom 文件, 位于归档文件中 META-INF/maven/ g r o u p I d / {groupId}/ groupId/{artifactId}/pom.xml
2. pom.properties 文件, 位于归档文件中 META-INF/maven/ g r o u p I d / {groupId}/ groupId/{artifactId}/pom.properties
默认值为true。
boolean
compress 为存档激活压缩。默认值为true。 boolean
forced 是否强制重新创建存档(默认情况下)。将此选项设置为false,意味着归档程序应该将所包含文件的时间戳与目标归档的时间戳进行比较,并仅在后一个时间戳先于前一个时间戳的情况下重新构建归档。检查时间戳通常会提高性能(特别是,如果可以取消构建中的以下步骤,如果没有重新创建归档),而不考虑您不时得到不准确结果的成本。特别是,不会检测到源文件的删除。
归档器不一定支持最新的检查。如果是,将该选项设置为true将被忽略。
默认值为true。
boolean 2.2
index 创建的存档是否包含 INDEX.LIST 文件。默认值为false。 boolean
pomPropertiesFile 使用它来覆盖自动创建的 pom.properties 文件(仅当addMavenDescriptor被设置为true时) File 2.3
manifestFile 有了它,您可以提供自己的清单文件。 File
manifest
manifestEntries 要添加到清单中的键/值对列表。 Map
manifestSections

pom.properties 内容

自动创建 pom.properties 文件将包含以下内容:

  1. artifactId=${project.artifactId}
  2. groupId=${project.groupId}
  3. version=${project.version}

manifest








































































元素 描述 类型
addClasspath 是否创建 Class-Path 清单项。默认值为false。 boolean
addDefaultEntries 如果清单将包含以下条目: boolean 3.4.0
addDefaultImplementationEntries
addDefaultSpecificationEntries
addBuildEnvironmentEntries
addExtensions
classpathLayoutType 格式化创建的 Class-Path 中的条目时要使用的布局类型。有效值是:simple、repository(与Maven类路径布局相同)和custom。
注意:如果指定 custom 类型,还必须设置 customClasspathLayout。默认值很简单。
classpathPrefix 将作为所有Class-Path条目前缀的文本。默认值为“”
customClasspathLayout
mainClass Main-Class清单条目 String

发表评论

表情:
评论列表 (有 0 条评论,254人围观)

还没有评论,来说两句吧...

相关阅读