javamavenosgimaven-bundle-plugin

How can one prevent certain attributes from being added to the bundle's manifest with the Maven Bundle Plugin?


I would like to remove certain headers from my release jars (e.g. "Built-by").

I have read that setting the headers to an empty content should do the trick, but it's not working for me. For example, I'm using:

<plugin>
    <groupId>org.apache.felix</groupId>
    <artifactId>maven-bundle-plugin</artifactId>
    <version>2.3.7</version>
    <extensions>true</extensions>
    <configuration>
        <instructions>
            <Built-By>a</Built-By>
            <Build-Jdk></Build-Jdk>
            <Created-By></Created-By>
            <Somethng-else>Hello</Somethng-else>
        </instructions>
    </configuration>
</plugin>

While Something-else is being added, all the other headers (e.g. Built-By) remain. Any insights? Thanks!


Solution

  • <_removeheaders>Build-*</_removeheaders>
    

    Nice to hear you find the plugin annoying (without seeming to have looked for the manual).