使用jenkins构建grails应用程序war文件失败

时间:2016-03-14 08:25:40

标签: grails jenkins

enter image description here

我已经配置了jenkins作业来构建grails应用程序war文件,如图所示。我检查了输出控制台,我收到了以下错误。

Output console Error: [JENKINS-7702] sanitizing $JAVA_OPTS
    [workspace] $ cmd.exe /C '"G:\practice\jenkins\tools\com.g2one.hudson.grails.GrailsInstallation\grails-2.2.4\bin\grails.bat -Dgrails.work.dir=/G:/practice/jenkins/jobs/Grails-Jenkins/workspace//target clean --non-interactive --plain-output && exit %%ERRORLEVEL%%"'
    Can't load log handler "1catalina.org.apache.juli.FileHandler"
    java.lang.ClassNotFoundException: 1catalina.org.apache.juli.FileHandler
    java.lang.ClassNotFoundException: 1catalina.org.apache.juli.FileHandler
        at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
        at java.util.logging.LogManager$4.run(LogManager.java:808)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.util.logging.LogManager.loadLoggerHandlers(LogManager.java:802)
        at java.util.logging.LogManager.addLogger(LogManager.java:1008)
        at java.util.logging.LogManager$1.run(LogManager.java:209)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.util.logging.LogManager.<clinit>(LogManager.java:181)
        at java.util.logging.Logger.demandLogger(Logger.java:339)
        at java.util.logging.Logger.getLogger(Logger.java:393)
        at org.codehaus.groovy.runtime.DefaultGroovyMethodsSupport.<clinit>(DefaultGroovyMethodsSupport.java:33)
        at org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl.<init>(MetaClassRegistryImpl.java:96)
        at org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl.<init>(MetaClassRegistryImpl.java:73)
        at groovy.lang.GroovySystem.<clinit>(GroovySystem.java:33)
        at org.codehaus.groovy.runtime.InvokerHelper.<clinit>(InvokerHelper.java:62)
        at groovy.lang.GroovyObjectSupport.<init>(GroovyObjectSupport.java:32)
        at groovy.lang.Closure.<init>(Closure.java:221)
        at groovy.lang.Closure.<init>(Closure.java:238)
        at groovy.lang.Closure$1.<init>(Closure.java:205)
        at groovy.lang.Closure.<clinit>(Closure.java:205)
        at org.codehaus.groovy.grails.cli.GrailsScriptRunner.<clinit>(GrailsScriptRunner.java:84)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at org.codehaus.groovy.grails.cli.support.GrailsStarter.rootLoader(GrailsStarter.java:234)
        at org.codehaus.groovy.grails.cli.support.GrailsStarter.main(GrailsStarter.java:262)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at org.codehaus.groovy.grails.cli.support.GrailsStarter.rootLoader(GrailsStarter.java:234)
        at org.codehaus.groovy.grails.cli.support.GrailsStarter.main(GrailsStarter.java:262)

请帮助我完成grails构建配置。

1 个答案:

答案 0 :(得分:0)

在编译之前刷新依赖项:

clean refresh-dependencies "war target/ROOT.war" 

顺便说一下,我们通常使用字段Exec command并添加自定义bash脚本来控制生成文件的流量和位置。

更新: 基于this thread

  

看起来你的logging.properties文件包含无效   设置。

  

似乎JMX代理正在使用Tomcat的logging.properties但是   使用来自JRE的未修改的java.util.logging包而不是   来自Tomcat的JULI。你能告诉我们最终的命令行是什么吗?   推出Tomcat?参数指定   -Djava.util.logging.manager = org.apache.juli.ClassLoaderLogManager看起来像是缺失。