I found this nice recipe and want to use it to deploy some 3rd-party files in our repository
The call on the command line is
mvn -P deploy-libs
If I do this for one file it works exactly as intended
<profiles>
<profile>
<id>deploy-libs</id>
<build>
<defaultGoal>deploy:deploy-file</defaultGoal>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.4</version>
<goals>
<goal>deploy-file</goal>
</goals>
<configuration>
<repositoryId>openscada-external</repositoryId>
<url>${openscada.distrib.repository}</url>
<file>../openscada_opc_dcom/lib/j-interop.jar</file>
<pomFile>../openscada_opc_dcom/lib/j-interop.pom</pomFile>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
If I use an execution block with multiple executions, it doesn't work. Is this a bug, or is this intended behavior?
<profiles>
<profile>
<id>deploy-libs</id>
<build>
<defaultGoal>deploy:deploy-file</defaultGoal>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.4</version>
<configuration>
<repositoryId>openscada-external</repositoryId>
<url>${openscada.distrib.repository}</url>
</configuration>
<executions>
<execution>
<id>j-interop</id>
<goals>
<goal>deploy-file</goal>
</goals>
<configuration>
<file>../openscada_opc_dcom/lib/j-interop.jar</file>
<pomFile>../openscada_opc_dcom/lib/j-interop.pom</pomFile>
</configuration>
</execution>
<execution>
<id>j-interopdeps</id>
<goals>
<goal>deploy-file</goal>
</goals>
<configuration>
<file>../openscada_opc_dcom/lib/j-interopdeps.jar</file>
<pomFile>../openscada_opc_dcom/lib/j-interopdeps.pom</pomFile>
</configuration>
</execution>
<execution>
<id>jcifs</id>
<goals>
<goal>deploy-file</goal>
</goals>
<configuration>
<file>../openscada_opc_dcom/lib/jcifs-1.2.9.jar</file>
<pomFile>../openscada_opc_dcom/lib/jcifs-1.2.9.pom</pomFile>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
The error I get is:
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] One or more required plugin parameters are invalid/missing for 'deploy:deploy-file'
[0] Inside the definition for plugin 'maven-deploy-plugin' specify the following:
<configuration>
...
<file>VALUE</file>
</configuration>
-OR-
on the command line, specify: '-Dfile=VALUE'
[INFO] ------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Error configuring: org.apache.maven.plugins:maven-deploy-plugin. Reason: Invalid or missing parameters: [Mojo parameter [name: 'file'; alias: 'null']] for mojo: org.apache.maven.plugins:maven-deploy-plugin:2.4:deploy-file
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:587)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:512)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:482)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:330)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:227)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:142)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:287)
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.apache.maven.plugins:maven-deploy-plugin. Reason: Invalid or missing parameters: [Mojo parameter [name: 'file'; alias: 'null']] for mojo: org.apache.maven.plugins:maven-deploy-plugin:2.4:deploy-file
at org.apache.maven.plugin.DefaultPluginManager.checkRequiredParameters(DefaultPluginManager.java:1042)
at org.apache.maven.plugin.DefaultPluginManager.getConfiguredMojo(DefaultPluginManager.java:659)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:429)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:558)
... 16 more
Any ideas?