Hi. Does anyone know whether it is possible to run mvn exec:java on mvn aggregate POM?
Currently I get:
2009-09-24 02:24:14.404 :bash: karolrvn@karolrvn-laptop : ~/adfadf/programming/verknowsys/codadris/ide_projects $ mvn exec:java -e -Dexec.mainClass=codadris.coviob2.App_Coviob2
+ Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO] Reactor build order:
[INFO] net.jcip.annotations
[INFO] codadris.utils
[INFO] codadris.binblocklang
[INFO] jargs
[INFO] codadris.dbapp
[INFO] codadris.dbgui.scala
[INFO] flexdock_codadris
[INFO] codadris.gui.utils
[INFO] codadris.gui
[INFO] codadris.gui.treetable
[INFO] codadris.gui.textedit
[INFO] codadris.gui.screenspace
[INFO] codadris.gui.suite
[INFO] codadris.dbgui
[INFO] All Codadris modules aggregate POM
[INFO] Searching repository for plugin with prefix: 'exec'.
[INFO] ------------------------------------------------------------------------
[INFO] Building net.jcip.annotations
[INFO] task-segment: [exec:java]
[INFO] ------------------------------------------------------------------------
[INFO] Preparing exec:java
[INFO] No goals needed for project - skipping
[INFO] [exec:java]
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] An exception occured while executing the Java class. codadris.coviob2.App_Coviob2
[INFO] ------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: An exception occured while executing the Java class. codadris.coviob2.App_Coviob2
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:583)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:512)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:482)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:330)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:291)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:142)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:287)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.MojoExecutionException: An exception occured while executing the Java class. codadris.coviob2.App_Coviob2
at org.codehaus.mojo.exec.ExecJavaMojo.execute(ExecJavaMojo.java:345)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:451)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:558)
... 16 more
Caused by: java.lang.ClassNotFoundException: codadris.coviob2.App_Coviob2
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 java.lang.ClassLoader.loadClass(ClassLoader.java:252)
at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:283)
at java.lang.Thread.run(Thread.java:619)
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1 second
[INFO] Finished at: Thu Sep 24 02:24:17 CEST 2009
[INFO] Final Memory: 4M/94M
[INFO] ------------------------------------------------------------------------
2009-09-24 02:24:17.917 :bash: karolrvn@karolrvn-laptop : ~/adfadf/programming/verknowsys/codadris/ide_projects $
The POM:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>codadris</groupId>
<artifactId>codadris</artifactId>
<packaging>pom</packaging>
<version>0.0.1-SNAPSHOT</version>
<name>All Codadris modules aggregate POM</name>
<url>http://maven.apache.org</url>
<modules>
<module>codadris.binblocklang</module>
<module>codadris.dbapp</module>
<module>codadris.dbgui</module>
<!-- <module>codadris.dbgui.scala</module> -->
<module>codadris.gui</module>
<!--<module>codadris.gui.scala</module>-->
<module>codadris.gui.screenspace</module>
<module>codadris.gui.suite</module>
<module>codadris.gui.textedit</module>
<module>codadris.gui.treetable</module>
<module>codadris.gui.utils</module>
<module>codadris.utils</module>
<!-- <module>ekit_codadris</module>-->
<module>flexdock_codadris</module>
<module>jargs</module>
<module>net.jcip.annotations</module>
<module>codadris.dbgui.scala</module>
</modules>
<!-- 2009-08-27 06:04:10 ; karolrvn ; http://stackoverflow.com/questions/1274523/maven-surefire-reporting-plugin-configuration -->
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-report-plugin</artifactId>
<!-- <version>2.4.2</version> -->
<configuration>
<aggregate>true</aggregate>
<!--also set this to link to generated source reports-->
<linkXRef>true</linkXRef>
</configuration>
</plugin>
</plugins>
</reporting>
</project>
the class, which i want to execute ( codadris.coviob2.App_Coviob2 ) is in module codadris.dbgui
Any ideas?
TIA
Sorry for probably not exactly too correct formatting. I had some problem with newlines.