| ------ |
| Use Your Own Manifest File |
| ------ |
| Dennis Lundberg |
| ------ |
| 2008-01-01 |
| ------ |
| |
| ~~ Licensed to the Apache Software Foundation (ASF) under one |
| ~~ or more contributor license agreements. See the NOTICE file |
| ~~ distributed with this work for additional information |
| ~~ regarding copyright ownership. The ASF licenses this file |
| ~~ to you under the Apache License, Version 2.0 (the |
| ~~ "License"); you may not use this file except in compliance |
| ~~ with the License. You may obtain a copy of the License at |
| ~~ |
| ~~ http://www.apache.org/licenses/LICENSE-2.0 |
| ~~ |
| ~~ Unless required by applicable law or agreed to in writing, |
| ~~ software distributed under the License is distributed on an |
| ~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| ~~ KIND, either express or implied. See the License for the |
| ~~ specific language governing permissions and limitations |
| ~~ under the License. |
| |
| Use Your Own Manifest File |
| |
| By default, Maven Archiver creates 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 |
| created by Maven Archiver. If you specify an entry in your own manifest file |
| it will override the value created 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> |
| +-----+ |