hi
I did lioke stephenconnolly suggested (see under for the details or the
previous mail in the thread), but my java -jar foo.war gives me :
Exception in thread "main" java.lang.NoClassDefFoundError: boot/JettyMain
Caused by: java.lang.ClassNotFoundException: boot.JettyMain
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
Could not find the main class: boot.JettyMain. Program will exit.
My manifest says Main-Class: boot.JettyMain and this main class is to be
found under /WEB-INF/classes/boot/JettyMain.class.
Any suggestion on how to resolve this ?
thanks in advance
zedros
This will give you an executable war file, i.e.
java -jar foo.war
which does what you want
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>____</groupId>
<artifactId>____</artifactId>
<packaging>war</packaging>
<dependencies>
<!-- your dependencies... don't forget jetty -->
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<archive>
<manifest>
<mainClass>your.package.JettyMain</mainClass>
</manifest>
</archive>
</configuration>
</plugin>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<phase>generate-resources</phase>
<goals>
<goal>unpack-dependencies</goal>
</goals>
<configuration>
<includeTypes>jar</includeTypes>
<outputDirectory>${project.build.directory}/${project.build.finalName}</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
--
View this message in context:
http://n2.nabble.com/Using-custom-assembly-descriptor-tp3189204p3699241.html
Sent from the maven users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]