On 28/11/2007, Wayne Fay <[EMAIL PROTECTED]> wrote: > > What do you mean "my jar does not work out"? How does it break? > > Please review the JAR spec -- I am reasonably certain the > Maven-produced manifest.mf is correct: > > http://java.sun.com/j2se/1.5.0/docs/guide/jar/jar.html#Notes%20on%20Manifest%20and%20Signature%20Files > > Line length: > No line may be longer than 72 bytes (not characters), in its > UTF8-encoded form. If a value would make the initial line longer than > this, it should be continued on extra lines (each starting with a > single SPACE).
that's correct - you'll see the same effect when using plain old jar: jar cfm foo.jar src/main/resources/META-INF/MANIFEST.MF jar xf foo.jar and META-INF/MANIFEST.MF will be formatted with the 72 char limit as Wayne said, could you explain more about "does not work out"? do you see any exceptions / errors when using your jar? are those jarfiles listed in Class-Path, in the same directory as your jar. note Class-Path does not allow you to refer to embedded jars, see: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4648386 for the (long-running!) saga... Wayne > > On 11/27/07, helio <[EMAIL PROTECTED]> wrote: > > Hi, > > > > I am using maven-jar-plugin on maven 2.0.7. > > I added this in my pom.xml: > > > > <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> > > > > In src/main/resources/META-INF/MANIFEST.MF I have: > > > > Manifest-Version: 1.0 > > Class-Path: activation.jar commons-logging.jar getopt.jar javassist.jar > > jaxb-api.jar jaxb-impl.jar jbossall-client.jar jboss-ejb3x.jar > > jboss-j2ee.jar jboss-jaxrpc.jar jboss-jaxws.jar jboss-saaj.jar > > jbossws-client.jar jbossws-spi.jar jboss-xml-binding.jar jtds-1.2.jar > > log4j.jar mail.jar mysql-connector-java-3.1.12-bin.jar policy.jar > > stax-api.jar wsdl4j.jar wstx.jar xercesImpl.jar > > Main-Class: com.Claudio > > > > But when I run mvn clean package, into jar“s MANIFEST.MF I got: > > > > Manifest-Version: 1.0 > > Archiver-Version: Plexus Archiver > > Created-By: Apache Maven > > Built-By: claudior > > Build-Jdk: 1.5.0_06 > > Main-Class: com.Claudio > > Class-Path: activation.jar commons-logging.jar getopt.jar javassist.ja > > r jaxb-api.jar jaxb-impl.jar jbossall-client.jar jboss-ejb3x.jar jbos > > s-j2ee.jar jboss-jaxrpc.jar jboss-jaxws.jar jboss-saaj.jar jbossws-cl > > ient.jar jbossws-spi.jar jboss-xml-binding.jar jtds-1.2.jar log4j.jar > > mail.jar mysql-connector-java-3.1.12-bin.jar policy.jar stax-api.jar > > wsdl4j.jar wstx.jar xercesImpl.jar > > > > The plugin maven-jar-plugin adds breaklines in Class-Path and my jar > > does not work out!!! > > > > Please, help me. > > > > Helio > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Cheers, Stuart
