You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Dan Tenenbaum <dt...@systemsbiology.org> on 2006/12/16 02:59:26 UTC
adding a manifest attribute other than Main-Class to an assembly
I need to add a custom attribute to the manifest of the jar produced by
mvn assembly:assembly
The attribute should look like this in the MANIFEST.MF file:
Cytoscape-Plugin:
org.systemsbiology.informaticsCore.uddiBrowser.cytoscape.UDDIBrowserPlugin
My plugin is configured as follows:
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<archive>
<manifest>
<Cytoscape-Plugin>org.systemsbiology.informaticsCore.uddiBrowser.cytoscape.UDDIBrowserPlugin</Cytoscape-Plugin>
</manifest>
</archive>
<descriptors>
<descriptor>cytoscape-plugin-assembly.xml</descriptor>
</descriptors>
</configuration>
</plugin>
But of course Maven chokes on the line:
<Cytoscape-Plugin>org.systemsbiology.informaticsCore.uddiBrowser.cytoscape.UDDIBrowserPlugin</Cytoscape-Plugin>
Because it doesn't understand that tag.
I changed it to:
<mainClass>org.systemsbiology.informaticsCore.uddiBrowser.cytoscape.UDDIBrowserPlugin</mainClass>
and it worked as expected, EXCEPT that the line was wrapped as follows:
Main-Class: org.systemsbiology.informaticsCore.uddiBrowser.cytoscape.U
DDIBrowserPlugin
That is, it is on two lines, and there is a space at the beginning of
the second line. I don't think the jvm will recognize that as a valid
main class attribute.
So, my two questions:
How do you get a custom attribute put in to a jar created by an
assembly? And how do you ensure that there is no line wrapping like above?
Thanks
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org