Hi,
I think it would be useful to add a 'run' goal to the java plugin. As Maven
manages the compilation by generating the appropriate classpath from
dependencies. I reckon it makes sense to provide a goal to execute the compiled
classes thus removing the neccessity for the developer to manage the runtime
classpath.
something like:
<goal name="java:run"
description="Execute the main class"
prereqs="java:jar">
<java classname="${pom.build.mainClass}">
<classpath>
<path refid="maven.dependency.classpath"/>
<pathelement location="${maven.build.dir}/${maven.final.name}.jar"/>
</classpath>
</java>
</goal>
need to add a mainClass entry to the pom.
another option would be to extend the java:jar goal to be capable of creating
jars with the Main-Class entry in the manifest (if appropriate). In such cases
the run target could execute the jar file.
Cheers
Nathan
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>