Is the boot class in the jetty dependency? If so, add the dependency to the dependency plugin section as well.
Then, ensure the jar gets included into your war. --- Thank You… Mick Knutson, President BASE Logic, Inc. Enterprise Architecture, Design, Mentoring & Agile Consulting p. (866) BLiNC-411: (254-6241-1) f. (415) 685-4233 Website: http://baselogic.com Linked IN: http://linkedin.com/in/mickknutson Vacation Rental: http://tahoe.baselogic.com --- On Wed, Sep 23, 2009 at 8:28 AM, zedros <[email protected]> wrote: > > 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] > >
