You can do this with a "real" Mojo by attaching the variable to Maven Project. But you can't do this in a simple Antrun plugin config. So you'll need to write some Java or Groovy etc.
Wayne On 1/30/08, Christian Weber <[EMAIL PROTECTED]> wrote: > Hi all, > > i have a Problem in writing the Output of a Command-Execution into a Maven > Variable, so that it can be used later. I successfully have executed the > following into a maven-antrun-plugin: > > -- Code Snippet > <plugin> > <groupId>org.apache.maven.plugins</groupId> > <artifactId>maven-antrun-plugin</artifactId> > <executions> > <execution> > <id>validate</id> > <phase>validate</phase> > <configuration> > <tasks> > <exec > executable="glib-config" outputproperty="Test.Testvariable"> > <arg > value="--version"/> > </exec> > <echo > message="Content of Testvariable: ${Test.Testvariable}"/> > </tasks> > </configuration> > <goals> > <goal>run</goal> > </goals> > </execution> > </executions> > </plugin> > -- > > With this Piece of Code i'm able to retrieve the Output of the "glib-config > --version" Command and display it in the followed "echo message..." Line. > But how do i write it into a Maven Variable, so that i have Access to it in > later Steps. For example i want to call this Code in the Parent POM File and > recall the Variable in a Child POM File. > > Is there maybe another Way to accomplish this? > > Regards, > Christian > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]