Maven插件的部署问题

我尝试运行时收到此错误 mvn clean deploy -P PROD

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.5:deploy (default-deploy) on project mysticpaste: Deployment failed: repository element was

org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.5:deploy (default-deploy) on project mysticp

at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:203)

at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:148)

at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:140)

at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)

at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)

at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)

at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)

at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:314)

at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:151)

at org.apache.maven.cli.MavenCli.execute(MavenCli.java:445)

at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:168)

at org.apache.maven.cli.MavenCli.main(MavenCli.java:132)

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.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)

at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)

at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)

at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)

Caused by: org.apache.maven.plugin.MojoExecutionException: Deployment failed: repository element was not specified in the POM inside distributionManagement element or in

at org.apache.maven.plugin.deploy.DeployMojo.getDeploymentRepository(DeployMojo.java:231)

at org.apache.maven.plugin.deploy.DeployMojo.execute(DeployMojo.java:117)

at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:107)

at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:195)

... 19 more

[ERROR]

回答:

请参阅Maven手册的部署部分。

您需要定义一个<repositories>在元素的settings.xml(不是你的pom.xml,这是很糟糕),或<distributionManagement>在你的元素pom.xml

以上是 Maven插件的部署问题 的全部内容, 来源链接: utcz.com/qa/420273.html

回到顶部