詹金斯

时间:2017-05-25 15:06:23

标签: java json git maven jenkins

我正在尝试将json报告文件推送到Nexus repo。我设置Jenkins工作

  

mvn -X -e deploy:deploy-file" -DgeneratePom = true"   " -Durl = http://repo_location"   -DrepositoryId =内部储存库" " -DgroupId = com.devsys" " -DartifactId =报告" " -Dbuild.number =%BUILD_NUMBER%"   " -Dpackaging = JSON"   " -Dfile =%WORKSPACE%\后端接纳的测试\目标\ cucumber.json"

然而,收到错误:

  

参数'文件'为了目标   org.apache.maven.plugins:maven-deploy-plugin:2.8.1:deploy-file are   

缺失或无效

我甚至尝试过绝对路径,仍然是同样的错误,json坐在指定的位置。

希望得到另一组眼睛来提供有关此类问题的反馈意见?

完整错误

  

[错误]无法执行目标   org.apache.maven.plugins:行家 - 部署 - 插件:2.8.1:部署文件   项目工作脑自动化框架上的(default-cli):   参数' file'为了目标   org.apache.maven.plugins:maven-deploy-plugin:2.8.1:deploy-file are   遗失或无效 - > [帮助1]   org.apache.maven.lifecycle.LifecycleExecutionException:失败   执行目标   org.apache.maven.plugins:行家 - 部署 - 插件:2.8.1:部署文件   项目工作脑自动化框架上的(default-cli):   参数' file'为了目标   org.apache.maven.plugins:maven-deploy-plugin:2.8.1:deploy-file are   丢失或无效   org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:220)     在   org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)     在   org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)     在   org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)     在   org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)     在   org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)     在   org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)     在org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:317)at at   org.apache.maven.DefaultMaven.execute(DefaultMaven.java:152)at   org.apache.maven.cli.MavenCli.execute(mavenCli.java:555)at at   org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)at at   org.apache.maven.cli.MavenCli.main(MavenCli.java:158)at at   sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)at   sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)     在   sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)     在java.lang.reflect.Method.invoke(Method.java:483)at   org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)     在   org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)     在   org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)     在   org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)   引起:org.apache.maven.plugin.PluginParameterException:The   参数' file'为了目标   org.apache.maven.plugins:maven-deploy-plugin:2.8.1:deploy-file are   丢失或无效   org.apache.maven.plugin.internal.DefaultMavenPluginManager.populatePluginFields(DefaultMavenPluginManager.java:581)     在   org.apache.maven.plugin.internal.DefaultMavenPluginManager.getConfiguredMojo(DefaultMavenPluginManager.java:534)     在   org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:97)     在   org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)     ......还有19个

1 个答案:

答案 0 :(得分:4)

您在-DrepositoryId=之前错过了引用。所有引号都需要正确匹配才能实现。