Skip to content
This repository has been archived by the owner on Nov 23, 2021. It is now read-only.

activate checkstyle automatically on maven project import #1

Open
hohwille opened this issue Aug 26, 2014 · 3 comments
Open

activate checkstyle automatically on maven project import #1

hohwille opened this issue Aug 26, 2014 · 3 comments

Comments

@hohwille
Copy link
Member

We have been trying to activate checkstlye for projects automatically with m2e in Eclipse.
This was so easy with maven-eclipse-plugin:
http://maven.apache.org/plugins/maven-eclipse-plugin/examples/configure-checkstyle.html

However with m2e this is a big problem. We found and tested this project:
https://code.google.com/p/m2e-extensions/
However it seems to be dead and does not work with recent versions of Eclipse and m2e if it ever worked at all. See also:
https://code.google.com/p/m2e-extensions/wiki/Checkstyle

Next we tried this one:
https://github.com/m2e-code-quality/m2e-code-quality
It installs properly but seems to do nothing. There are no working step-by-step instructions that worked for us...

General infos how it could practically work are described here:
https://docs.sonatype.org/display/M2ECLIPSE/Customizable+build+lifecycle+mapping+for+m2e+extensions+developers

We also tried to create our own eclipse plugin for this but had no luck either.

@hohwille hohwille self-assigned this Aug 26, 2014
agreul added a commit to oasp/oasp4j that referenced this issue Sep 5, 2014
@hohwille
Copy link
Member Author

@hohwille
Copy link
Member Author

We could try a workaround using this approach:
https://wiki.eclipse.org/M2E_compatible_maven_plugins

We write a mojo that "hacks" the .project file by adding nature and builder for checkstyle. Then we configure m2e to trigger this as described in the link. I am not sure if it will workout easily but it is worth a try. The Mojo would need to be deployed into nexus for the moment to make it available for developers. Not a great solution but if it works out better than nothing.

@hohwille
Copy link
Member Author

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant