maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From iceman <tgaut...@yahoo.com>
Subject Re: exec plugin - how to define more than one?
Date Wed, 23 Aug 2006 16:28:31 GMT

Thanks for the tip.  I still don't seem to get it, based on what you are
saying my config should change to:

> ...
> <plugin>
>        <groupId>org.codehaus.mojo</groupId>
>        <artifactId>exec-maven-plugin</artifactId>
>        <executions>
>          <execution>
>            <id>client</id>
>            <goals>
>              <goal>exec</goal>
>            </goals>
>        <configuration>
>          <executable>foo</executable>
>          <arguments>
>            <argument>-classpath</argument>
>            <classpath/>
>            <argument>A B C D</argument>
>          </arguments>
>        </configuration>
>          </execution>
          ... [ more execution definitions here]
>        </executions>
>      </plugin>

However maven complains with the following error:

---------------------------------------------
[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'
---------------------------------

Assuming I were to get the config right, I am still not understanding how I
would distinguish between one execution or another from the command line. 
My goal is that I want to use Maven to launch execution A, or execution B -
not both.

thanks!


Jon SlinnHawkins wrote:
> 
> Hi,
> 
> Put the <configuration> within an <execution> for each executable you 
> require.
> 
> Cheers
> 
> Jon
> 
> "iceman" <tgautier@yahoo.com> wrote in message 
> news:5935357.post@talk.nabble.com...
>>
>> I've been able to successfully define the configuration for a single
>> execution, but I would like to define more than one.
>>
>> IOTW, I have the following:
>>
>> ...
>> <plugin>
>>        <groupId>org.codehaus.mojo</groupId>
>>        <artifactId>exec-maven-plugin</artifactId>
>>        <executions>
>>          <execution>
>>            <id>client</id>
>>            <goals>
>>              <goal>exec</goal>
>>            </goals>
>>          </execution>
>>        </executions>
>>        <configuration>
>>          <executable>foo</executable>
>>          <arguments>
>>            <argument>-classpath</argument>
>>            <classpath/>
>>            <argument>A B C D</argument>
>>          </arguments>
>>        </configuration>
>>    <!--  This doesn't work - you'll have to pass everything on the 
>> cmdline!
>>      <configuration>
>>          <executable>bar</executable>
>>          <arguments>
>>            <argument>X Y Z</argument>
>>          </arguments>
>>        </configuration>
>>      -->
>>      </plugin>
>>
>> As you can see, I can define how to run foo, but not bar.  I would like
>> to
>> do both, since it will be common for users of the software to run more 
>> than
>> one application.
>> -- 
>> View this message in context: 
>> http://www.nabble.com/exec-plugin---how-to-define-more-than-one--tf2149338.html#a5935357
>> Sent from the Maven - Users forum at Nabble.com. 
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/exec-plugin---how-to-define-more-than-one--tf2149338.html#a5947937
Sent from the Maven - Users forum at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Mime
View raw message