Start Jonas locally with Maven and Cargo
Celinio <[email protected]> Tue, 22 Feb 2011 03:49:05 -0800 (PST)
| Newsgroups | gmane.comp.java.objectweb.jonas |
|---|---|
| Message-ID | <[email protected]> |
Hi,
I am trying to fix my POM.xml file so that i can start/stop Jonas (and later deploy) with the Cargo plugin for Maven.
So far, this is what i have come with in my POM.xml file :
<profiles>
<profile>
<id>cargo</id>
<activation>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.cargo</groupId>
<artifactId>cargo-maven2-plugin</artifactId>
<version>1.0</version>
<executions>
<execution>
<id>start-jonas</id>
<phase>pre-integration-test</phase>
<goals>
<goal>start</goal>
</goals>
</execution>
<execution>
<id>stop-jonas</id>
<phase>post-integration-test</phase>
<goals>
<goal>stop</goal>
</goals>
</execution>
</executions>
<configuration>
<container>
<containerId>jonas5x</containerId>
<type>installed</type>
<home>E:\appft2\jonas-full-5.1.5\bin</home>
</container>
<configuration>
<type>existing</type>
<home>E:\appft2\jonas-full-5.1.5\</home>
<properties>
<cargo.servlet.port>9000</cargo.servlet.port>
<cargo.hostname>localhost</cargo.hostname>
<cargo.protocol>http</cargo.protocol>
<cargo.jonas.server.name>jonas</cargo.jonas.server.name>
<cargo.jonas.domain.name>jonas</cargo.jonas.domain.name>
</properties>
</configuration>
<deployer>
<deployables>
<deployable>
<groupId>${project.groupId}</groupId>
<artifactId>${project.artifactId}</artifactId>
<type>${project.packaging}</type>
<classifier>${config.classifier}</classifier>
</deployable>
</deployables>
</deployer>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
This is giving me the following error :
[INFO] ------------------------------------------------------------------------
[INFO] Building voltage-ear(ear) 1.0.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- cargo-maven2-plugin:1.0:start (default-cli) @ voltage-ear ---
[INFO] [talledLocalContainer] JOnAS 5.x starting...
[WARNING] [talledLocalContainer] java.lang.NoClassDefFoundError: org/ow2/jonas/commands/admin/ClientAdmin
[WARNING] [talledLocalContainer] Caused by: java.lang.ClassNotFoundException: org.ow2.jonas.commands.admin.ClientAdmin
[WARNING] [talledLocalContainer] at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
[WARNING] [talledLocalContainer] at java.security.AccessController.doPrivileged(Native Method)
[WARNING] [talledLocalContainer] at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
[WARNING] [talledLocalContainer] at java.lang.ClassLoader.loadClass(ClassLoader.java:303)
[WARNING] [talledLocalContainer] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
[WARNING] [talledLocalContainer] at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
[WARNING] [talledLocalContainer] at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:316)
[WARNING] [talledLocalContainer] Could not find the main class: org.ow2.jonas.commands.admin.ClientAdmin. Program will exit.
[WARNING] [talledLocalContainer] Exception in thread "main"
[WARNING] [talledLocalContainer] Java Result: 1
What am i missing ?
Thanks.