I answered my own question. This is not exactly well-documented, but I figured it out. Here is the relevant snippet from pom.xml:

           <plugin>
<!-- NOTE: We don't need a groupId specification because the group is
                   org.apache.maven.plugins ...which is assumed by default.
               -->
               <artifactId>maven-assembly-plugin</artifactId>
               <configuration>
                   <archive>
<manifestFile>src/main/resources/META-INF/MANIFEST.MF</manifestFile>
                   </archive>
                   <descriptors>
                       <descriptor>assembly.xml</descriptor>
                   </descriptors>
               </configuration>
           </plugin>


Dan Tenenbaum wrote:
Jörg Schaible wrote:
Hi Dan,

Dan Tenenbaum wrote on Saturday, December 16, 2006 2:59 AM:
[snip]
I changed it to:
<mainClass>org.systemsbiology.informaticsCore.uddiBrowser.cyto
scape.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.

This is exactly how manifest entries have to be written according the spec. Lines longer than 77 (?) chars have to be wrapped that way. Otherwise it is not be a proper manifest ;-)

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?

Why? Do you want to create invalid manifests? hehehe

OK, let's suppose I refactor the class name to be shorter so that the entire line is less than 77 characters. How then do I get my custom manifest attribute into the jar? Remember, I am using the assembly plugin here, not the maven jar plugin (which does provide a way to do this, but does not otherwise do what I want).

Thanks




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to