Better jacococli design

35 views
Skip to first unread message

william feng

unread,
May 19, 2020, 6:47:04 AM5/19/20
to JaCoCo and EclEmma Users
hello there, I love this tool and thanks very much :)
Currently I use jacococli.jar to handle my ec files, and I have a question / suggestion:

  1. Now `classfiles` will recursivily scan directories. It is not flexible enough. If I want to include or exclude some specific classes, I have to:
    • Use `--classfiles` and include every sub directories I want, like `java -jar jacococli.jar report xxx.ec --classfiles xx.class --classfiles yy.class --classfiles mydir`. 
    • In a large project, it may easily causes `command too long` in linux.
    • .ec files can be merged, but class files can not.
    • Command would be longer and longer in the future.
  2. In my opinion, we can put all these configures to a extra configure file (maybe json? or something like nginx.conf):
    • Make this command to something like `java -jar jacococli.jar -config jacoco_config.json`.
    • It 's easy to extend, for example, we can set a very precise `include` and `exclude` in config file.

Thanks

Marc Hoffmann

unread,
May 19, 2020, 4:59:43 PM5/19/20
to JaCoCo and EclEmma Users
Hi,

thanks for your kind words and your proposal. We want to keep our tools as slim as possible and are very reluctant to add e.g. new file formats.

In your case I recommend

1) using command line tools to copy the classes of interest in temporary location before you create the report
2) Use e.g. our Ant task which accepts Ant filesets with all its filtering options

Regards,
-marc


--
You received this message because you are subscribed to the Google Groups "JaCoCo and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jacoco+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jacoco/86a023cd-abec-46f2-8fae-cd67126b6ad1%40googlegroups.com.

william feng

unread,
May 20, 2020, 3:25:39 AM5/20/20
to JaCoCo and EclEmma Users
> using command line tools to copy the classes of interest in temporary location before you create the report

It works fine. Thanks!
BTW, can I move all my classes in a single directory without creating sub dirs? Will it cause any path issues?

before:

- a
    - 1.class
    - 2.class
- b
    - c
        - 3.class

after:

- a
    - 1.class
    - 2.class
    - 3.class

Thanks

在 2020年5月20日星期三 UTC+8上午4:59:43,Marc R. Hoffmann写道:
To unsubscribe from this group and stop receiving emails from it, send an email to jac...@googlegroups.com.

Marc Hoffmann

unread,
May 20, 2020, 3:29:30 AM5/20/20
to jac...@googlegroups.com
As long as you don’t have any naming conflicts you can copy class files in arbitrary folders. The class name is picked from classfile content.

Regards,
-marc

To unsubscribe from this group and stop receiving emails from it, send an email to jacoco+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jacoco/d1adc802-633c-4175-8179-c15d9f0c140e%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages