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