Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/313.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java Maven findbugs Maven插件因超时而失败_Java_Apache_Maven_Plugins_Findbugs - Fatal编程技术网

Java Maven findbugs Maven插件因超时而失败

Java Maven findbugs Maven插件因超时而失败,java,apache,maven,plugins,findbugs,Java,Apache,Maven,Plugins,Findbugs,我正在使用Electric Commander部署一个Java项目,在运行site deploy目标时,该项目在集成测试期间失败,同时为findbugs maven插件生成报告 下面的输出显示Findbugs报告在显示“Fork Value is true”后被卡住,失败后显示“[ERROR]未能执行goal org.apache.maven.plugins:maven site plugin:3.3:site(默认站点)在项目集成模块上:执行目标org.apache.maven的默认站点plu

我正在使用Electric Commander部署一个Java项目,在运行site deploy目标时,该项目在集成测试期间失败,同时为findbugs maven插件生成报告

下面的输出显示Findbugs报告在显示“Fork Value is true”后被卡住,失败后显示“[ERROR]未能执行goal org.apache.maven.plugins:maven site plugin:3.3:site(默认站点)在项目集成模块上:执行目标org.apache.maven的默认站点plugins:maven站点plugin:3.3:site failed:Timeout:killed the sub process->[Help 1]”

除了上述尝试之外,我还尝试将MAVEN_OPTS设置为包含
-Dtimeout=25200000
(时间单位为毫秒,相当于7小时)和其他一些荒谬的时间,但超时时间总是大约为600000或10分钟(findbugs MAVEN插件的默认值如下:)

这里的问题是,我们已经削减了我们的版本,所以我们不能更改代码,这意味着我不能修改pom中的插件

我有几个报告插件需要为集成测试模块运行,但Findbugs报告是最不重要的,可以完全删除,但它恰好是问题的根源


有没有办法通过命令行或使用maven_选项覆盖findbugs maven插件的超时选项默认设置?如果没有,是否有办法通过命令行跳过单个模块的Findbugs报告?另一种可能是,即使Findbugs超时,也可以选择完成站点部署的运行;是否有防止站点部署失败的Maven选项?对这个问题的任何帮助都将是巨大的

你找到解决这个问题的办法了吗?我面临着一个类似的问题。@VenkateshManohar在这篇文章发表几个月后,我解决了这个问题,但我从来没有抽出时间在这里发布这个决议。如果我没记错的话,这最终是一个内存问题。我增加了scala maven插件的默认JVM内存设置。插件文档向您展示了如何配置插件设置:。希望这有帮助!
[INFO] Generating "FindBugs Report" report    --- findbugs-maven-plugin:2.5.2
[INFO] Locale is en
[INFO] Fork Value is true

[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Parent Module ......................... SUCCESS [2:27.472s]
[INFO] Module 1 .............................. SUCCESS [6:13.576s]
[INFO] Module 2 .............................. SUCCESS [7:12.407s]
[INFO] Module 3 .............................. SUCCESS [3:10.419s]
[INFO] Integration Tests Module .............. FAILURE [21:18.987s]
[INFO] Module 4 .............................. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 40:30.544s
[INFO] Finished at: Tue Jan 24 18:00:08 CST 2017
[INFO] Final Memory: 238M/692M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-site-plugin:3.3:site (default-site) on project integration-module: Execution default-site of goal org.apache.maven.plugins:maven-site-plugin:3.3:site failed: Timeout: killed the sub-process -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <goals> -rf :integration-module
[INFO] Generating "FindBugs Report" report    --- findbugs-maven-plugin:2.5.2
[DEBUG] Inside canGenerateReport..... false
[DEBUG] canGenerate Src is true
[DEBUG] canGenerate is true
[DEBUG] Inside canGenerateReport..... false
[DEBUG] canGenerate Src is true
[DEBUG] canGenerate is true
[INFO] Locale is en
[DEBUG] ****** FindBugsMojo executeReport *******
[DEBUG] report Output Directory is /Users/my_username/workspace/project/integration-module/target/site
[DEBUG] Output Directory is /Users/my_username/workspace/project/integration-module/target/site
[DEBUG] Classes Directory is /Users/my_username/workspace/project/integration-module/target/classes
[DEBUG] resourceManager outputDirectory is /Users/my_username/workspace/project/integration-module/target
[DEBUG]   Plugin Artifacts to be added ->[org.codehaus.mojo:findbugs-maven-plugin:maven-plugin:2.5.2:, org.codehaus.gmaven:gmaven-mojo:jar:1.4:compile, org.codehaus.gmaven.runtime:gmaven-runtime-api:jar:1.4:compile, org.codehaus.gmaven.feature:gmaven-feature-api:jar:1.4:compile, org.codehaus.gmaven.runtime:gmaven-runtime-1.5:jar:1.4:compile, org.codehaus.gmaven.feature:gmaven-feature-support:jar:1.4:compile, org.codehaus.groovy:groovy-all-minimal:jar:1.5.8:compile, org.apache.ant:ant:jar:1.8.2:compile, org.apache.ant:ant-launcher:jar:1.8.2:compile, jline:jline:jar:0.9.94:compile, org.codehaus.plexus:plexus-interpolation:jar:1.1:compile, org.codehaus.gmaven:gmaven-plugin:jar:1.4:compile, org.codehaus.gmaven.runtime:gmaven-runtime-loader:jar:1.4:compile, org.codehaus.gmaven.runtime:gmaven-runtime-support:jar:1.4:compile, org.sonatype.gshell:gshell-io:jar:2.4:compile, com.thoughtworks.qdox:qdox:jar:1.12:compile, org.apache.maven.shared:file-management:jar:1.2.1:compile, org.apache.maven.shared:maven-shared-io:jar:1.1:compile, commons-lang:commons-lang:jar:2.6:compile, org.slf4j:slf4j-api:jar:1.5.10:compile, org.sonatype.gossip:gossip:jar:1.2:compile, org.apache.maven.reporting:maven-reporting-impl:jar:2.1:compile, commons-validator:commons-validator:jar:1.2.0:compile, commons-beanutils:commons-beanutils:jar:1.7.0:compile, commons-digester:commons-digester:jar:1.6:compile, commons-logging:commons-logging:jar:1.0.4:compile, oro:oro:jar:2.0.8:compile, xml-apis:xml-apis:jar:1.0.b2:compile, org.codehaus.groovy:groovy-all:jar:1.7.4:compile, org.apache.maven.doxia:doxia-core:jar:1.1.3:compile, org.apache.maven.doxia:doxia-logging-api:jar:1.1.3:compile, xerces:xercesImpl:jar:2.9.1:compile, commons-httpclient:commons-httpclient:jar:3.1:compile, commons-codec:commons-codec:jar:1.2:compile, org.apache.maven.doxia:doxia-decoration-model:jar:1.1.3:compile, org.apache.maven.doxia:doxia-module-xhtml:jar:1.1.3:compile, org.apache.maven.doxia:doxia-module-fml:jar:1.1.3:compile, org.codehaus.plexus:plexus-i18n:jar:1.0-beta-7:compile, org.codehaus.plexus:plexus-velocity:jar:1.1.7:compile, org.apache.velocity:velocity:jar:1.5:compile, commons-collections:commons-collections:jar:3.2:compile, org.apache.maven.shared:maven-doxia-tools:jar:1.2.1:compile, commons-io:commons-io:jar:1.4:compile, com.google.code.findbugs:findbugs-ant:jar:2.0.1:compile, com.google.code.findbugs:findbugs:jar:2.0.1:compile, com.google.code.findbugs:bcel:jar:2.0.1:compile, com.google.code.findbugs:jsr305:jar:2.0.1:compile, com.google.code.findbugs:jFormatString:jar:2.0.1:compile, com.google.code.findbugs:annotations:jar:2.0.1:compile, dom4j:dom4j:jar:1.6.1:compile, jaxen:jaxen:jar:1.1.1:compile, jdom:jdom:jar:1.0:compile, xom:xom:jar:1.0:compile, xerces:xmlParserAPIs:jar:2.6.2:compile, xalan:xalan:jar:2.6.0:compile, com.ibm.icu:icu4j:jar:2.6.1:compile, asm:asm:jar:3.3:compile, asm:asm-tree:jar:3.3:compile, asm:asm-commons:jar:3.3:compile, jgoodies:plastic:jar:1.2.0:compile, org.codehaus.plexus:plexus-resources:jar:1.0-alpha-4:compile, org.codehaus.plexus:plexus-utils:jar:1.5.6:compile, org.sonatype.plexus:plexus-build-api:jar:0.0.7:compile]
[DEBUG] XML outputFile is /Users/my_username/workspace/project/integration-module/target/findbugsXml.xml
[DEBUG] XML output Directory is /Users/my_username/workspace/project/integration-module/target
[DEBUG] ****** FindBugsMojo executeFindbugs *******
[DEBUG] ****** Executing FindBugsMojo *******
[DEBUG] resourceManager outputDirectory is /Users/my_username/workspace/project/integration-module/target
[DEBUG]   Plugin Artifacts to be added -> [org.codehaus.mojo:findbugs-maven-plugin:maven-plugin:2.5.2:, org.codehaus.gmaven:gmaven-mojo:jar:1.4:compile, org.codehaus.gmaven.runtime:gmaven-runtime-api:jar:1.4:compile, org.codehaus.gmaven.feature:gmaven-feature-api:jar:1.4:compile, org.codehaus.gmaven.runtime:gmaven-runtime-1.5:jar:1.4:compile, org.codehaus.gmaven.feature:gmaven-feature-support:jar:1.4:compile, org.codehaus.groovy:groovy-all-minimal:jar:1.5.8:compile, org.apache.ant:ant:jar:1.8.2:compile, org.apache.ant:ant-launcher:jar:1.8.2:compile, jline:jline:jar:0.9.94:compile, org.codehaus.plexus:plexus-interpolation:jar:1.1:compile, org.codehaus.gmaven:gmaven-plugin:jar:1.4:compile, org.codehaus.gmaven.runtime:gmaven-runtime-loader:jar:1.4:compile, org.codehaus.gmaven.runtime:gmaven-runtime-support:jar:1.4:compile, org.sonatype.gshell:gshell-io:jar:2.4:compile, com.thoughtworks.qdox:qdox:jar:1.12:compile, org.apache.maven.shared:file-management:jar:1.2.1:compile, org.apache.maven.shared:maven-shared-io:jar:1.1:compile, commons-lang:commons-lang:jar:2.6:compile, org.slf4j:slf4j-api:jar:1.5.10:compile, org.sonatype.gossip:gossip:jar:1.2:compile, org.apache.maven.reporting:maven-reporting-impl:jar:2.1:compile, commons-validator:commons-validator:jar:1.2.0:compile, commons-beanutils:commons-beanutils:jar:1.7.0:compile, commons-digester:commons-digester:jar:1.6:compile, commons-logging:commons-logging:jar:1.0.4:compile, oro:oro:jar:2.0.8:compile, xml-apis:xml-apis:jar:1.0.b2:compile, org.codehaus.groovy:groovy-all:jar:1.7.4:compile, org.apache.maven.doxia:doxia-core:jar:1.1.3:compile, org.apache.maven.doxia:doxia-logging-api:jar:1.1.3:compile, xerces:xercesImpl:jar:2.9.1:compile, commons-httpclient:commons-httpclient:jar:3.1:compile, commons-codec:commons-codec:jar:1.2:compile, org.apache.maven.doxia:doxia-decoration-model:jar:1.1.3:compile, org.apache.maven.doxia:doxia-module-xhtml:jar:1.1.3:compile, org.apache.maven.doxia:doxia-module-fml:jar:1.1.3:compile, org.codehaus.plexus:plexus-i18n:jar:1.0-beta-7:compile, org.codehaus.plexus:plexus-velocity:jar:1.1.7:compile, org.apache.velocity:velocity:jar:1.5:compile, commons-collections:commons-collections:jar:3.2:compile, org.apache.maven.shared:maven-doxia-tools:jar:1.2.1:compile, commons-io:commons-io:jar:1.4:compile, com.google.code.findbugs:findbugs-ant:jar:2.0.1:compile, com.google.code.findbugs:findbugs:jar:2.0.1:compile, com.google.code.findbugs:bcel:jar:2.0.1:compile, com.google.code.findbugs:jsr305:jar:2.0.1:compile, com.google.code.findbugs:jFormatString:jar:2.0.1:compile, com.google.code.findbugs:annotations:jar:2.0.1:compile, dom4j:dom4j:jar:1.6.1:compile, jaxen:jaxen:jar:1.1.1:compile, jdom:jdom:jar:1.0:compile, xom:xom:jar:1.0:compile, xerces:xmlParserAPIs:jar:2.6.2:compile, xalan:xalan:jar:2.6.0:compile, com.ibm.icu:icu4j:jar:2.6.1:compile, asm:asm:jar:3.3:compile, asm:asm-tree:jar:3.3:compile, asm:asm-commons:jar:3.3:compile, jgoodies:plastic:jar:1.2.0:compile, org.codehaus.plexus:plexus-resources:jar:1.0-alpha-4:compile, org.codehaus.plexus:plexus-utils:jar:1.5.6:compile, org.sonatype.plexus:plexus-build-api:jar:0.0.7:compile]
[DEBUG] outputFile is /Users/my_username/workspace/project/integration-module/target/findbugsXml.xml
[DEBUG] output Directory is /Users/my_username/workspace/project/integration-module/target
[DEBUG] Temp File is /Users/my_username/workspace/project/integration-module/target/findbugsTemp.xml
[INFO] Fork Value is true
[DEBUG] effort is Default
[DEBUG] effortParameter is default
[DEBUG] threshold is Default
[DEBUG] thresholdParameter is -medium
...
...
...
[DEBUG] Findbugs arg is -xml:withMessages
[DEBUG] Findbugs arg is -auxclasspathFromInput
[DEBUG] Findbugs arg is -projectName
[DEBUG] Findbugs arg is Integration Tests Module
[DEBUG] Findbugs arg is -effort:default
[DEBUG] Findbugs arg is -medium
[DEBUG] Findbugs arg is -nested:false
[DEBUG] Findbugs arg is -output
[DEBUG] Findbugs arg is /Users/my_username/workspace/project/integration-module/target/findbugsTemp.xml
[DEBUG] Findbugs arg is /Users/my_username/workspace/project/integration-module/target/classes
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 21:55 min
[INFO] Finished at: 2017-01-24T17:36:03-06:00
[INFO] Final Memory: 104M/252M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-site-plugin:3.3:site (default-site) on project integration-module: Execution default-site of goal org.apache.maven.plugins:maven-site-plugin:3.3:site failed: Timeout: killed the sub-process -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-site-plugin:3.3:site (default-site) on project integration-module: Execution default-site of goal org.apache.maven.plugins:maven-site-plugin:3.3:site failed: Timeout: killed the sub-process
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:224)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:120)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:355)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:155)
    at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584)
    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:216)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:160)
    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: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)
Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default-site of goal org.apache.maven.plugins:maven-site-plugin:3.3:site failed: Timeout: killed the sub-process
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:143)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
    ... 19 more
Caused by: : Timeout: killed the sub-process
    at org.apache.tools.ant.taskdefs.Java.fork(Java.java:794)
    at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:214)
    at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:135)
    at org.apache.tools.ant.taskdefs.Java.execute(Java.java:108)
    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.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
    at org.apache.tools.ant.Task.perform(Task.java:348)
    at groovy.util.AntBuilder.nodeCompleted(AntBuilder.java:199)
    at groovy.util.BuilderSupport.doInvokeMethod(BuilderSupport.java:147)
    at groovy.util.AntBuilder.doInvokeMethod(AntBuilder.java:149)
    at groovy.util.BuilderSupport.invokeMethod(BuilderSupport.java:64)
    at org.codehaus.groovy.runtime.InvokerHelper.invokePogoMethod(InvokerHelper.java:756)
    at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:730)
    at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodN(ScriptBytecodeAdapter.java:170)
    at org.codehaus.mojo.findbugs.FindBugsMojo.executeFindbugs(FindBugsMojo.groovy:1004)
    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.groovy.reflection.CachedMethod.invoke(CachedMethod.java:86)
    at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:230)
    at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:912)
    at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnCurrentN(ScriptBytecodeAdapter.java:78)
    at org.codehaus.mojo.findbugs.FindBugsMojo.executeReport(FindBugsMojo.groovy:640)
    at org.apache.maven.reporting.AbstractMavenReport.generate(AbstractMavenReport.java:190)
    at org.apache.maven.plugins.site.ReportDocumentRenderer.renderDocument(ReportDocumentRenderer.java:219)
    at org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.renderModule(DefaultSiteRenderer.java:319)
    at org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.render(DefaultSiteRenderer.java:135)
    at org.apache.maven.plugins.site.SiteMojo.renderLocale(SiteMojo.java:175)
    at org.apache.maven.plugins.site.SiteMojo.execute(SiteMojo.java:138)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:132)
    ... 20 more
[ERROR]
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException