Reputation: 336
I have a below configuration in my pom.xml and I want to deploy using maven deploy plugin goal.
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.5</version>
<executions>
<execution>
<id>deploy-file</id>
<phase>deploy</phase>
<goals>
<goal>deploy-file</goal>
</goals>
<configuration>
<groupId>com.my.build</groupId>
<artifactId>my_build</artifactId>
<version>${version}</version>
<packaging>zip</packaging>
<generatePom>true</generatePom>
<repositoryId>dsnexus</repositoryId>
<url>https://dsnexus.xxxcontent/repositories/releases</url>
<file>target/my_build-${version}.zip</file>
</configuration>
</execution>
</executions>
</plugin>
<distributionManagement>
<repository>
<id>dsnexus</id>
<name>Repo</name>
<url>
https://dsnexus.xxxcontent/repositories/releases
</url>
</repository>
</distributionManagement>
I tried using below command and its working-
mvn deploy:deploy-file -Dfile=target/my_build-1.5.5.zip -DrepositoryId=dsnexus -Durl=https://dsnexus.xxxcontent/repositories/releases
-DgroupId=com.my.build -DartifactId=my_build -Dversion=1.5.5 -Dpackaging=zip
But when I run below its failing. I want to deploy zip without specifing full info like above-
mvn deploy:deploy-file
Error:
Caused by: org.apache.maven.plugin.PluginParameterException: The parameters 'file', 'url' for goal org.apache.maven.plugins:maven-deploy-plugin:2.5:deploy-file are missing or invalid
at org.apache.maven.plugin.internal.DefaultMavenPluginManager.populatePluginFields(DefaultMavenPluginManager.java:576)
at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getConfiguredMojo(DefaultMavenPluginManager.java:529)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:92)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
... 19 more
Any help would be appreciated
Upvotes: 1
Views: 2818
Reputation: 1334
mvn deploy:deploy-file
fails if some information is not specified, as suggests the official documentation at this page: mvn deploy-file
Upvotes: 3