Hi,

with the <execution/> tag you declare an excplicit invocation of a plugin goal during your build lifecylce. The configuration you declare inside this execution is only effective for that excution. It is not visible to other executions of the plugin and certainly not when you invoke the plugin goal from the commandline.

The common configuration of a plugin should go to <plugin><configuration>. The configuration provided on this level is picked up by all executions of the plugin, this includes excutions from the commandline.

However, I suspect for you use-case this won't work either, because at least the pomFile parameter is read-only for the normal deploy mojo. This will cause maven to fail with an error when you specify it in your pom and invoke 'mvn deploy'.

-Tim

Ashley Williams schrieb:
Hi,

Instead of supplying my arguments to maven deploy plugin deploy-file goal at the command line, I would like to configure them in my project pom as below. That way nobody has to remember what vm parameters to type and I don't have to invent a batch file to store in source control to call it either.

        <build>
                <plugins>
                        <plugin>
 <artifactId>maven-deploy-plugin</artifactId>
                                <executions>
                                        <execution>
                                                <id>slf4j</id>
                                                <goals>
 <goal>deploy-file</goal>
                                                </goals>
                                                <configuration>
                                                        <file>
 ${uploaddir}/slf4j-jdk14/slf4j-jdk14-1.3.0.jar
                                                        </file>
                                                        <pomFile>
 ${uploaddir}/slf4j-jdk14/pom.xml
                                                        </pomFile>
                                                        <url>${repo}</url>
 <repositoryId>site</repositoryId>
                                                </configuration>
                                        </execution>
                                </executions>
                        </plugin>
...

However when I run 'mvn deploy:deploy-file' I get a complaint that I haven't supplied the required vm parameters. How can I get it to use the values I've specified inside the pom.xml? Also can I be sure that my configuration above won't affect the deploy phase of the normal build for this artifact - I really just want a one off task that I can call from time to time, a bit like a static method in a java class.

- Ashley

---

This e-mail may contain confidential and/or privileged information. If you are 
not the intended recipient (or have received this e-mail in error) please 
notify the sender immediately and delete this e-mail. Any unauthorized copying, 
disclosure or distribution of the material in this e-mail is strictly forbidden.

Please refer to http://www.db.com/en/content/eu_disclosures.htm for additional 
EU corporate and regulatory disclosures.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to