You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Alexis Midon <al...@gmail.com> on 2006/07/26 14:43:49 UTC

How to add some attributes to the manifest?

Hi all,

I'd like to add dynamically some attributes to a manifest.
I've searched into the maven-jar-plugin and found a way to set the manifest
file itself but nothing about attributes.
I'd like something like the Maven 1 jar plugin configuration :
http://maven.apache.org/maven-1.x/plugins/jar/properties.html#Jar_Settings

thanks for your help,

Alexis

Re: How to add some attributes to the manifest?

Posted by Alexis Midon <al...@gmail.com>.
I finally found a way to add attribute to the manifest.
You should use the following syntax :

<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>
                        <manifestEntries>

<myCustomAttributeName>myValue</myCustomAttributeName>
                        </manifestEntries>
                    </archive>
                </configuration>
            </plugin>
        </plugins>
    </build>


regards,

Alexis

On 7/26/06, Alexis Midon <al...@gmail.com> wrote:
>
>
>
> Hi all,
>
> I'd like to add dynamically some attributes to a manifest.
> I've searched into the maven-jar-plugin and found a way to set the
> manifest file itself but nothing about attributes.
> I'd like something like the Maven 1 jar plugin configuration :
> http://maven.apache.org/maven-1.x/plugins/jar/properties.html#Jar_Settings
>
> thanks for your help,
>
> Alexis
>
>