At 03:43 PM 10/12/2005, Adrian wrote:
I'm trying to run an executable (windows, script on linux) via maven.xml; program needs to take command line arguments;

I'm looking for an example on how to do this; could not find anything in any docs, or examples except on calling built in functionality, or classes;

could anyone send me an example or pointer to an example doing this

here is what I need to do in my program
1. set some variables, and to program to execute
2. run the program

Here is an example using a number of Ant tasks to set up and environment for executing the Ant java task. It turns out the the Maven Jeez tags map the ant tags into the default Maven name space, which is why I didn't prefix the Ant tags with the Ant namespace.

To execute a program other than Java you can use the Ant exec task.

Hope that this helps.

  <goal name="jester">
    <delete dir="target/jester-src"/>
    <copy todir="target/jester-src">
      <fileset dir="src/java">
        <include name="**/*.java"/>
      </fileset>
    </copy>
<pathconvert targetos="windows" property="classpath" refid="jester.classpath"/> <java classpathref="jester.classpath" classname="jester.TestTester" fork="true">
      <arg value="-cp=target/jester-src;${classpath}"/>
      <arg value="org.jvalue.value.name.PersonNameTest"/>
      <arg value="target/jester-src"/>
    </java>
</goal>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to