Each execution should have its own id.
Thus:
<executions>
> <execution>
<id>execute-javatoddl</id>
> <goals>
> <goal>java</goal>
> </goals>
> <configuration>
>
> <mainClass>com.test.JavaToDDL</mainClass>
> <arguments>
>
> <argument>--fetch</argument>
> </arguments>
> </configuration>
> </execution>
> <execution>
<id>execute-mysql</id>
> <configuration>
>
> <executable>mysql</executable>
> <arguments>
>
> <argument>-uroot</argument>
>
> <argument>testdb</argument>
>
> <argument><</argument>
>
> <argument>import/property-data/Property_DATA.sql</argument>
> </arguments>
> </configuration>
> <goals>
> <goal>exec</goal>
> </goals>
> </execution>
> </executions>
Hth,
Nick Stolwijk
~Java Developer~
Iprofs BV.
Claus Sluterweg 125
2012 WS Haarlem
www.iprofs.nl
On Thu, Apr 23, 2009 at 1:46 PM, Java Programmer <[email protected]> wrote:
> hello,
> I have to run with one Maven command two different processes one for
> prepare SQL data in java, and second to import it into mysql. I'm not
> able to run it with configuration I have provide:
> <plugin>
> <groupId>org.codehaus.mojo</groupId>
> <artifactId>exec-maven-plugin</artifactId>
> <executions>
> <execution>
> <goals>
> <goal>java</goal>
> </goals>
> <configuration>
>
> <mainClass>com.test.JavaToDDL</mainClass>
> <arguments>
>
> <argument>--fetch</argument>
> </arguments>
> </configuration>
> </execution>
> <execution>
> <configuration>
>
> <executable>mysql</executable>
> <arguments>
>
> <argument>-uroot</argument>
>
> <argument>testdb</argument>
>
> <argument><</argument>
>
> <argument>import/property-data/Property_DATA.sql</argument>
> </arguments>
> </configuration>
> <goals>
> <goal>exec</goal>
> </goals>
> </execution>
> </executions>
> </plugin>
> if I run with mvn exec:exec I got:
> ------------------------
> [ERROR] BUILD ERROR
> [INFO]
> ------------------------------------------------------------------------
> [INFO] One or more required plugin parameters are invalid/missing for
> 'exec:exec'
>
> [0] Inside the definition for plugin 'exec-maven-plugin' specify the
> following:
>
> <configuration>
> ...
> <executable>VALUE</executable>
> </configuration>
>
> -OR-
>
> on the command line, specify: '-Dexec.executable=VALUE'
> ------------------------
>
> How that can be solved? In mine scenario I need to run both with "mvn
> exec:java exec:exec" in that order. I can't find the way of using <id>
> maybe it can help?
>
> Best regards,
> Adr
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>