BTW, unless I'm misataken, the following invocation should also work:
mvn exec:java
-j
Trevor Harmon wrote:
Hi all,
I'm an experienced Ant user but new to Maven, and I'm a little shocked
at how verbose Maven is, even compared to Ant, which is notorious for
its verbosity. For example, if I want to launch a Java application in
Ant, I do this:
<target name="run">
<java classname="foo.Bar" classpath="${my.classpath}">
<sysproperty key="mykey" value="myvalue"/>
<arg value="-h"/>
</java>
</target>
These six lines of Ant explode into 27 lines when ported to Maven:
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>java</goal>
</goals>
</execution>
</executions>
<configuration>
<mainClass>foo.Bar</mainClass>
<arguments>
<argument>-h</argument>
</arguments>
<systemProperties>
<systemProperty>
<key>mykey</key>
<value>myvalue</value>
</systemProperty>
</systemProperties>
</configuration>
</plugin>
</plugins>
</build>
Plus, when I want to run the Ant task, I only have to type this:
# ant run
But in Maven I have to type all this:
# mvn org.codehaus.mojo:exec-maven-plugin:java
Everything about Maven seems more complex, more verbose, and more
difficult, at least for this example. Am I missing something? I thought
Maven was supposed to make things simpler...
Trevor
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
John Casey
Developer, PMC Member - Apache Maven (http://maven.apache.org)
Blog: http://www.ejlife.net/blogs/buildchimp/
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]