2017-01-19 65 views
0

我跑Jacoco代理人,以万无一失的jacoco如神火argLine - 命令行太长

<plugin> 
    <groupId>org.apache.maven.plugins</groupId> 
    <artifactId>maven-failsafe-plugin</artifactId> 
    <version>2.18.1</version> 
    <configuration> 
     <argLine>${jacoco.agent.argLine}</argLine> 
    </configuration> 
</plugin> 

我与排除(常量和我的过时的类)的大名单配置Jacoco为我的建筑破坏者。

<plugin> 
    <groupId>org.jacoco</groupId> 
    <artifactId>jacoco-maven-plugin</artifactId> 
    <version>0.7.5.201505241946</version> 
    <configuration> 
     <excludes> 
      <exclude>*/*Test</exclude> 
      <exclude>*/*Constants*</exclude> 
      <exclude>${jacoco.exclusions.list}</exclude> 
     </excludes> 
    </configuration> 

什么我得到的是,当我去运行测试中,我得到的错误:


T E S T S 
------------------------------------------------------- 
The command line is too long. 

Results : 

Tests run: 0, Failures: 0, Errors: 0, Skipped: 0 

[INFO] ------------------------------------------------------------------------ 
[INFO] BUILD FAILURE 
[INFO] ------------------------------------------------------------------------ 

是否有另一种方式来排除列表传递给Jacoco比对代理参数arglist在命令行? (看起来at the code它看起来不像)

我的问题是:如何将排除列表传递给除了在命令行上运行的Jacoco代理程序?

+0

请您详细说明 - 为什么您需要一个长时间的排除列表代理,而不是报告生成?正如页面http://www.jacoco.org/jacoco/trunk/doc/agent.html所述:“除了性能优化或技术角落案例,通常不需要此选项。” – Godin

+0

这是一个技术性的角落案例。 – hawkeye

+0

您能否详细说明“角落案例”?我不是因为好奇才问,而是作为JaCoC开发人员之一,以了解我们可以做哪些改进。 – Godin

回答