gpt4 book ai didi

java - Maven部署插件不工作

转载 作者:行者123 更新时间:2023-11-29 04:34:26 26 4
gpt4 key购买 nike

我的 pom.xml 中有以下配置,我想使用 maven 部署插件目标进行部署。

        <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>

我尝试使用下面的命令及其工作-

     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

但是当我跑到下面时,它就失败了。我想部署 zip 而不像上面那样指定完整信息-

     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

任何帮助将不胜感激

最佳答案

如果未指定某些信息,

mvn deploy:deploy-file 将失败,如本页官方文档所建议:mvn deploy-file

关于java - Maven部署插件不工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42291942/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com