PageRenderTime 40ms CodeModel.GetById 15ms RepoModel.GetById 1ms app.codeStats 0ms

/maven-archiver-2.5/src/site/apt/examples/manifest.apt

#
Unknown | 101 lines | 88 code | 13 blank | 0 comment | 0 complexity | f72621903b66c19ae7a6f2a2ed061bdf MD5 | raw file
Possible License(s): Apache-2.0
  1. ------
  2. Manifest
  3. ------
  4. Dennis Lundberg
  5. ------
  6. 2008-01-01
  7. ------
  8. ~~ Licensed to the Apache Software Foundation (ASF) under one
  9. ~~ or more contributor license agreements. See the NOTICE file
  10. ~~ distributed with this work for additional information
  11. ~~ regarding copyright ownership. The ASF licenses this file
  12. ~~ to you under the Apache License, Version 2.0 (the
  13. ~~ "License"); you may not use this file except in compliance
  14. ~~ with the License. You may obtain a copy of the License at
  15. ~~
  16. ~~ http://www.apache.org/licenses/LICENSE-2.0
  17. ~~
  18. ~~ Unless required by applicable law or agreed to in writing,
  19. ~~ software distributed under the License is distributed on an
  20. ~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  21. ~~ KIND, either express or implied. See the License for the
  22. ~~ specific language governing permissions and limitations
  23. ~~ under the License.
  24. Manifest
  25. * Default Manifest
  26. The default manifest created by Maven Archiver will contain the following
  27. bits of information:
  28. +-----+
  29. Manifest-Version: 1.0
  30. Archiver-Version: Plexus Archiver
  31. Created-By: Apache Maven
  32. Built-By: ${user.name}
  33. Build-Jdk: ${java.version}
  34. +-----+
  35. * Adding Implementation And Specification Details
  36. Starting with version 2.1, Maven Archiver no longer creates the
  37. Implementation and Specification details in the manifest by default.
  38. If you want them in your manifest you have to say so explicitly in your configuration.
  39. <<Note:>> Because this is a recent change in Maven Archiver, different plugins
  40. may or may not have started using it yet. Please check the documentation for
  41. the plugin you want to use. In this example we use maven-jar-plugin 2.1 which
  42. was the first version of that plugin to use this new feature.
  43. +-----+
  44. <project>
  45. ...
  46. <build>
  47. <plugins>
  48. <plugin>
  49. <groupId>org.apache.maven.plugins</groupId>
  50. <artifactId>maven-jar-plugin</artifactId>
  51. <version>2.1</version>
  52. ...
  53. <configuration>
  54. <archive>
  55. <manifest>
  56. <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
  57. <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
  58. </manifest>
  59. </archive>
  60. </configuration>
  61. ...
  62. </plugin>
  63. </plugins>
  64. </build>
  65. ...
  66. </project>
  67. +-----+
  68. The resulting manifest would contain these pieces of information:
  69. +-----+
  70. Manifest-Version: 1.0
  71. Archiver-Version: Plexus Archiver
  72. Created-By: Apache Maven
  73. Built-By: ${user.name}
  74. Build-Jdk: ${java.version}
  75. Specification-Title: ${project.name}
  76. Specification-Version: ${project.version}
  77. Specification-Vendor: ${project.organization.name}
  78. Implementation-Title: ${project.name}
  79. Implementation-Version: ${project.version}
  80. Implementation-Vendor-Id: ${project.groupId}
  81. Implementation-Vendor: ${project.organization.name}
  82. +-----+
  83. <<Note:>> If your pom.xml does not have an <<<\<organization\>>>>/<<<\<name\>>>>
  84. element, then the <<<Specification-Vendor>>> and <<<Implementation-Vendor>>>
  85. entries will <<not>> be in the manifest.
  86. <<Note:>> If your pom.xml does not have a <<<\<name\>>>> element, then the
  87. <<<Specification-Title>>> and <<<Implementation-Title>>> entries will have
  88. "Unnamed - $\{project.groupId\}:$\{project.artifactId\}:$\{project.version\}" as their value.