我必須編譯Google聚合資源,並將它們放入本地(與Linux Linux shell集成的Windows 10)的特定文件夾中,但在我的jenkins(它在Ubuntu 17.04服務器上進入Docker容器中)失敗。maven在本地工作,但在jenkins上使用javascript資源時失敗
我與詹金斯一個新手,這是我第一次測試它
POM的配置上GitHub
這裏管道的配置:
node {
def mvnHome
def nodeHome
stage('Preparation') { // for display purposes
// Get some code from a GitHub repository
git 'https://github.com/ITGuy9401/RPGMakerVXtoMVConverterWEB.git'
// Get the Maven tool.
// ** NOTE: This 'M3' Maven tool must be configured
// ** in the global configuration.
mvnHome = tool 'maven35'
nodeHome = tool 'nodejs840'
env.PATH = "${nodeHome}/bin:${mvnHome}/bin:${env.PATH}"
}
stage('Build') {
// Run the maven build
if (isUnix()) {
sh "'${mvnHome}/bin/mvn' -Dmaven.test.failure.ignore clean package"
} else {
bat(/"${mvnHome}\bin\mvn" -Dmaven.test.failure.ignore clean package/)
}
}
stage('Results') {
junit '**/target/surefire-reports/TEST-*.xml'
archive 'target/*.jar'
}
}
和有控制檯輸出
[INFO] ------------------------------------------------------------------------
[INFO] Building app 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.6.1:clean (default-clean) @ app ---
[INFO]
[INFO] --- exec-maven-plugin:1.6.0:exec (clean-web-res) @ app ---
[INFO]
[INFO] --- exec-maven-plugin:1.6.0:exec (prepare-resource-folder) @ app ---
[INFO]
[INFO] --- exec-maven-plugin:1.6.0:exec (npm-install) @ app ---
npm WARN [email protected] No repository field.
up to date in 5.152s
[INFO]
[INFO] --- exec-maven-plugin:1.6.0:exec (bower-build) @ app ---
[INFO]
[INFO] --- exec-maven-plugin:1.6.0:exec (polymer-build) @ app ---
info: Clearing build/ directory...
info: (default) Building...
info: (default) Build complete!
[INFO]
[INFO] --- exec-maven-plugin:1.6.0:exec (test-list-files) @ app ---
bower.json
bower_components
images
index.html
manifest.json
src
[INFO]
[INFO] --- exec-maven-plugin:1.6.0:exec (move-files) @ app ---
cp: cannot stat 'dev-static/build/default/*': No such file or directory
[ERROR] Command execution failed.
org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1)
at org.apache.commons.exec.DefaultExecutor.executeInternal(DefaultExecutor.java:404)
at org.apache.commons.exec.DefaultExecutor.execute(DefaultExecutor.java:166)
at org.codehaus.mojo.exec.ExecMojo.executeCommandLine(ExecMojo.java:804)
at org.codehaus.mojo.exec.ExecMojo.executeCommandLine(ExecMojo.java:751)
at org.codehaus.mojo.exec.ExecMojo.execute(ExecMojo.java:313)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:154)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:146)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:309)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:194)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:107)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:993)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:345)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:191)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
我做了很多嘗試使其成功,但沒有任何幫助。 感謝您的任何幫助!
謝謝你,但是爲什麼行家沒有打印的DTD驗證錯誤? 的方式,固定
現在我'試圖讓它建立在jenkins上,然後我會做一些重構來實現最佳實踐 –
我明白了。這是錯誤嗎?在發生錯誤時,存在目錄'/src/main/resources/dev-static/build/default',並且其中有文件嗎? –