| Summary: | [mojo] org.apache.maven.plugins:maven-enforcer-plugin support | ||
|---|---|---|---|
| Product: | z_Archived | Reporter: | Missing name Mising name <vonnahme> |
| Component: | m2e | Assignee: | Project Inbox <m2e.core-inbox> |
| Status: | CLOSED NOT_ECLIPSE | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | igor |
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | |||
|
Description
Missing name Mising name
Ok, I took an initial try at this, and I've put my code here: https://github.com/pmv/m2eclipse-extras Basically I just copied the antlr connector. It seems to work. If an enforcer rule fails, there's an error marker with a description of "Some Enforcer rules have failed. Look above for specific messages explaining why the rule failed..." (You actually have to look in the Maven Console for the error detail, but I didn't take the time to see if the error description was something I could change) The one coding change I wasn't sure of is I had to override the AbstractJavaProjectConfigurator.configureRawClasspath method to avoid a NullPointerException. (https://github.com/pmv/m2eclipse-extras/blob/master/org.sonatype.m2e.enforcer/src/org/sonatype/m2e/enforcer/internal/EnforcerProjectConfigurator.java) I'm not familiar enough with m2e internals to know if that was the correct thing to do or not. Could someone review this and give feedback? If it's good enough, let me know what the next steps would be. Few things. You didn't need to fork entire m2eclipse-extras, standalone repo makes more sense in this case (of course, you are welcome to use code m2eclipse-extras as starting point). If you only need to execute enforcer plugin as part of (full?) workspace build, you can use <execute/> mapping action, so you won't need EnforcerBuildParticipant/EnforcerProjectConfigurator java classes. If you decide to keep EnforcerProjectConfigurator and build participant, to provide better error messages, for example, you probably want to extend AbstractProjectConfigurator directly and not AbstractJavaProjectConfigurator. closing old/stale bugreports |