On Fri, May 9, 2008 at 4:50 AM, avin98 <[EMAIL PROTECTED]> wrote: > > I'm trying to run a shell script from a maven goal. > > Here's my definition > > <build> > <plugins> > <plugin> > <groupId>org.codehaus.mojo</groupId> > <artifactId>exec-maven-plugin</artifactId> > <executions> > <execution> > <goals> > <goal>exec</goal> > </goals> > </execution> > </executions> > <configuration> > <executable>/bin/sh</executable> > <arguments> > <argument>run.sh</argument> > </arguments> > </configuration> > </plugin> > </plugins> > </build> > > When I call mvn exec:exec I get the following error > > [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' > > [INFO] > ------------------------------------------------------------------------ > [INFO] 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:334) > at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125) > at org.apache.maven.cli.MavenCli.main(MavenCli.java:272) > 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:585) > 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:907) > at > org.apache.maven.plugin.DefaultPluginManager.getConfiguredMojo(DefaultPluginManager.java:612) > at > org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:421) > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:539) > ... 16 more > [INFO] > ------------------------------------------------------------------------ > [INFO] Total time: 1 second > [INFO] Finished at: Thu May 08 19:49:56 PDT 2008 > [INFO] Final Memory: 3M/6M > [INFO] > ------------------------------------------------------------------------
I cannot reproduce the problem (see below. I used maven 2.0.8). * exec mojo issues are reported on the mojo user list * please create a test case that reproduces the issuer and tell us more of your environment [EMAIL PROTECTED]:/tmp$ cat run.sh echo Working [EMAIL PROTECTED]:/tmp$ cat pom.xml <project> <modelVersion>4.0.0</modelVersion> <groupId>org.cb.maven.plugins.exec</groupId> <artifactId>test</artifactId> <version>0.1</version> <packaging>jar</packaging> <build> <plugins> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>exec-maven-plugin</artifactId> <version>1.1-beta-1</version> <executions> <execution> <goals> <goal>exec</goal> </goals> </execution> </executions> <configuration> <executable>/bin/sh</executable> <arguments> <argument>run.sh</argument> </arguments> </configuration> </plugin> </plugins> </build> </project> [EMAIL PROTECTED]:/tmp$ mvn exec:exec [INFO] Scanning for projects... [INFO] Searching repository for plugin with prefix: 'exec'. [INFO] ------------------------------------------------------------------------ [INFO] Building Unnamed - org.cb.maven.plugins.exec:test:jar:0.1 [INFO] task-segment: [exec:exec] [INFO] ------------------------------------------------------------------------ [INFO] [exec:exec] [INFO] Working [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESSFUL [INFO] ------------------------------------------------------------------------ [INFO] Total time: 1 second [INFO] Finished at: Sat May 10 17:54:28 CEST 2008 [INFO] Final Memory: 2M/53M [INFO] ------------------------------------------------------------------------ Jerome --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]