On 2/2/06, Darryl L. Pierce <[EMAIL PROTECTED]> wrote: > I would like to be able to run an application from the commandline using > Maven. The ideal thing would be for Maven to create the command line, > especially the classpath, given that it knows my dependencies. Is such a > thing possible and, if so, how? Thanks.
The Execute plugin was created for that. You will find it in mojo-sandbox. http://mojo.codehaus.org/exec-maven-plugin/introduction.html <plugins> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>exec-maven-plugin</artifactId> <executions> <execution> <id>myexecution</id> <phase>package</phase> <goals> <goal>exec</goal> </goals> </execution> </executions> <configuration> <executable>java</executable> <arguments> <argument>-Dmyproperty=myvalue</argument> <argument>-classpath</argument> <classpath/> <!-- automatically creates the classpath using all project dependencies --> <argument>mypackage.MyClass</argument> ... </arguments> </configuration> --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]