Hi,

I am using my own manifest file by following

<project>
  ...
  <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>
  ...
</project>

I specified my class path in my manifest.mf file in the format of
Class-Path: dir/xxx.jar dir/yyy.jar

After mvn install, when I do java -jar myApp.jar it complains 'NoClassFound' 
for the class I specified in the class path. It took me an hour to find out the 
the MANIFEST.MF file in the generated jar has carriage returns in it.

The generated manifest.mf file looks like

Class-Path: /home/xxx/.m2/repository/com/xxx/xxx/mod
 el/1.0-SNAPSHOT/ model-1.0-SNAPSHOT.jar

I guess that is why it complains NoClassFound, anybody any idea?

Thanks

Kevin








______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________

Reply via email to