Hi, The reason why Maven is complaining, is because the root-project doesn't have an exec-maven-plugin configured. In fact, this would have happened with any plugin with required parameters without a default. And that's why the phase was specified. If you run Maven by calling a phase instead of a specific plugin goal, Maven will walk through every phase and check if there's a plugin bound to it. If there's not any logical phase you can bind the exec-maven-plugin to, you might want to consider using profiles. - Robert
Date: Tue, 7 Dec 2010 10:41:43 +0100 From: [email protected] To: [email protected] Subject: [mojo-user] A possible newbie question on exec-maven-plugin.. Hello.. Being new tom Maven I’ve run into a problem…which is as follows. We are using Glassfish and to be able to deploy artifacts I have to use exec-maven-plugin to execute asadmin. We are deploying to remote servers so this seems to be the only option since none of the other plugins available seems to support remote deployment to Glassfish. The problem is as follows: The project has parent (super?) pom file and each module has it’s own pom files. The result of the build are four ear files that should be deployed to a remote development server. In the parent (super) pom I trigger the deployment through activating a profile. If I run the build at the level of each ear file everything works ok and the ear files are deployed to the remote development server. However, if I try to do this from the parent (super) pom level (build and deploy) I get an error message from the exec-maven-plugin… Error message as follows: [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' I have tried to follow the examples that are on the plugin website, like the one describing multiple executions - http://article.gmane.org/gmane.comp.java.maven-plugins.mojo.user/1307 Nothing seem to work though and I guess I am missing something obvious here (like doing something wrong on <phase> possibly?). Plugin section looks like this: <build> <plugins> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>exec-maven-plugin</artifactId> <executions> <execution> <goals> <goal>exec</goal> </goals> </execution> </executions> <configuration> <executable>/path/asadmin</executable> <arguments> <argument>--port=12345</argument> <argument>--host=x.x.x.x</argument> <argument>--passwordfile=/path/glassfish_passwd.txt</argument> <argument>--user=admin</argument> <argument>deploy</argument> <argument>/path/${artifactId}-${version}.${packaging}</argument> </arguments> </configuration> </plugin> </plugins> </build> Regards //Bengt
