You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by shep <sh...@q.com> on 2008/01/28 20:34:13 UTC
Re: running a specific plugin only while deploying ; running
multiple times a same plugin while varying its parameters
I try this and I get the following:
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'
------------------------------------------------------------------------
[DEBUG]Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Error configuring:
org.codehaus.mojo:exec-maven-plugin. Reason: Invalid or missing parameters:
[Mojo parameter [name: 'executable'; alias: 'null']] for mojo:
org.codehaus.mojo:exec-maven-plugin:1.1-beta-1:exec
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:568)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:493)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:463)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:311)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:278)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:143)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:333)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:126)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:282)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at
org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.PluginParameterException: Error
configuring: org.codehaus.mojo:exec-maven-plugin. Reason: Invalid or missing
parameters: [Mojo parameter [name: 'executable'; alias: 'null']] for mojo:
org.codehaus.mojo:exec-maven-plugin:1.1-beta-1:exec
at
org.apache.maven.plugin.DefaultPluginManager.checkRequiredParameters(DefaultPluginManager.java:911)
at
org.apache.maven.plugin.DefaultPluginManager.getConfiguredMojo(DefaultPluginManager.java:616)
at
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:425)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:539)
... 16 more
here is my profiles section of the pom:
<profile>
<activation>
<property>
<name>profile1</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<configuration>
<executable>java</executable>
<arguments>
<argument>-classpath</argument>
<classpath />
<argument>
com.ngc.casper.persistent.PersistentCollection
</argument>
</arguments>
</configuration>
</plugin>
</plugins>
</build>
</profile>
Can you tell me what I am doing wrong? I really need a way to run this class
file. Here is my command line
nvn exec:exec -Pprofile1
Saritha SV wrote:
>
> Hi
>
> For running multiple times a same plugin with various
> parameters , you can use profiles .
>
> http://maven.apache.org/guides/introduction/introduction-to-profiles.html
>
> this will give you an intro to build profiles .
> You can use different profiles in pom.xml , with the same plugin having
> different arguments .
> And u can list the active Profiles in settings.xml or u can specify the
> profiles to be executed in the command line separated by comma .
>
> find an eg of using 2 different profiles in pom.xml with maven-exec-plugin
> .
>
> <profiles>
> <profile>
> <activation>
> <property>
> <name>testProfile1</name>
> </property>
> </activation>
> <build>
> <plugin>
> <groupId>org.codehaus.mojo</groupId>
> <artifactId>exec-maven-plugin</artifactId>
> <configuration>
> <executable>java</executable>
> <arguments>
> <argument>-classpath</argument>
> <classpath />
> <argument>
> com.test.example
> </argument>
> </arguments>
> </configuration>
> </plugin>
> </build>
> </profile>
> <profile>
> <activation>
> <property>
> <name>testProfile2</name>
> </property>
> </activation>
> <build>
> <plugin>
> <groupId>org.codehaus.mojo</groupId>
> <artifactId>exec-maven-plugin</artifactId>
> <configuration>
> <executable>java</executable>
> <arguments>
> <argument>-classpath</argument>
> <classpath />
> <argument>
> com.testProfile.example2
> </argument>
> </arguments>
> </configuration>
> </plugin>
> </build>
> </profile>
> </profiles
>
>
>
> in command line you can run the profile by
> mvn exec:exec -P testProfile1, testProfile2
>
> or in settings it can be like :
>
>
> <settings>
> ...
> <activeProfiles>
> <activeProfile>testProfile1</activeProfile>
>
> <activeProfile>testProfile2</activeProfile>
>
> </activeProfiles>
> ...
> </settings>
>
> Thanks
> Saritha
>
> On 11/2/07, Julien CARSIQUE <jc...@nuxeo.com> wrote:
>>
>> Hi,
>>
>> I would like to zip our generated ear and attach it but only when
>> deploying to our archiva (for snapshot deployment and release).
>> I actually use build-helper-maven-plugin to attach the zip file but had
>> to associate it to a specific profile so it isn't done by default. How
>> to run this profile only when using maven-deploy-plugin ? Is there a
>> property set by this plugin ?
>>
>> Then, I would like to run multiple times a same plugin with various
>> parameters, all this in a single call to mvn install; how can I do that ?
>>
>> Thanks,
>> Julien C.
>>
>>
>> ---------------------------------------------------------------------
>> 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/running-a-specific-plugin-only-while-deploying---running-multiple-times-a-same-plugin-while-varying-its-parameters-tp13554828s177p15143385.html
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org