-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Include M2E ignore file in jacoco-maven-plugin #203
Comments
I can contribute a fix but I am not sure where to put the file as the maven plugin doesn't use the standard maven directory layout so it may not support src/main/resources/META-INF/.... Should I create a new resources directory next to the src directory? Ie, "jacoco-maven-plugin/resources"? |
This should already be in place in the Eclipse plugin for JaCoCo (EclEmma): Can you please verify whether this works for you? |
Hi Marc, I am not sure how that is relevant to M2E and jacoco-maven-plugin. Do I need to install that Eclipse plugin to avoid seeing the M2E messages? Is it possible for you to copy and paste (or move) the file into jacoco-maven-plugin.jar so it comes directly through Maven without the extra plugin? Thanks, Peter
|
Hi Peter, I see your point. Can you please install EclEmma and check whether it works for you as expected? Then we can port this to jacoco-maven-plugin -- if it does not introduce a dependency on M2E. |
Thanks, installing EclEmma fixed the bug! It would however be easiest to also copy the file into the jacoco-maven-plugin so that all M2E users get it automatically. There is no extra dependency on M2E. As with the file inside of the EclEmma plugin jar file, M2E will automatically detect it based on scanning the classpath for all matching META-INF... files. |
The current definition in org.mountainminds.eclemma.core only excludes the goal "prepare-agent". What about the other goals provided by JaCoCo? |
Including all of the goals that could be included in a pom.xml file would be useful in my view:
The ones that are unlikely to ever be included in pom.xml, and run manually instead may not need to be there:
The list above is based on: |
can this be closed? has it been released? |
@rtack lifecycle mapping was added into Eclemma Eclipse plugin ( see jacoco/eclemma@d89be28 ), whereas this ticket is about addition directly into jacoco-maven-plugin, which wasn't done yet. |
would a PR help solving this? |
Yes, a PR would help. I am still a little confused by the build system here and where a resource would be added, as it doesn't look like it would be src/main/resources/META-INF/ as usual for maven. |
I get a compilation error when I compile from the git repository using oracle jdk 8: [INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ org.jacoco.core.test --- Looking at the pom.xml file there is a profile that I could select to disable the compilation of those classes, but it isn't clear why the compilation should work for java-8 users, given that the source and target for the maven-compiler-plugin are both inherited from the maven.compiler.source and maven.compiler.target properties defined in the org.jacoco.build pom, with or without the profile being active. My environment is Oracle JDK 8 on Ubuntu 14.04: After compiling using "mvn -Pno-java8-validation clean install", it seems to work. I verified that the M2E error appears with 0.7.4.201502262128 but does not appear when I changed that to 0.7.5-SNAPSHOT to use my locally compiled version. Thanks! |
Sorry, didn't mean to confuse the issue, just describing what happened when I did the testing. |
@ansell no pb. |
Could jacoco include a file like the following with each of the goals that should not be run by M2E in the list of goals so that M2E users do not need to manually ignore it? The file needs to be in the plugin jar file at META-INF/m2e/lifecycle-mapping-metadata.xml
More documentation can be found at: http://wiki.eclipse.org/M2E_compatible_maven_plugins
The text was updated successfully, but these errors were encountered: