-
Notifications
You must be signed in to change notification settings - Fork 35
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
[MPIR-375] add plugin excludes feature for plugin-management report #7
Conversation
Added pluginManagementExcludes list parameter.
Fixed in 82f4bf2 |
src/it/MPIR-375/pom.xml
Outdated
<!-- | ||
Example plugin generating the Eclipse's "Plugin execution not covered by lifecycle configuration" error message | ||
--> | ||
<plugin> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you remove this plugin, I don't see the need for it in this IT
} | ||
else | ||
{ | ||
MavenProject pluginProject = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you the try-catch statement inside the else-statement, not around the whole if-else statement
|
||
for ( String pattern : excludes ) | ||
{ | ||
String[] subStrings = pattern.split( ":" ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see a reason to cleanup the pattern. This is already a list, not a single comma-separated String.
* @return <code>true</code> if the artifact matches the pattern | ||
*/ | ||
protected boolean compareDependency( String pattern, Artifact artifact ) | ||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use org.apache.maven.shared.artifact.filter.PatternExcludesArtifactFilter instead
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't knew that class...very handy!
<version>1.0-SNAPSHOT</version> | ||
<packaging>jar</packaging> | ||
<name>plugin management project info</name> | ||
<dependencies> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Try to remove all unrequired stuff, like dependencies
- Removed unnecessary code in tests. - Narrowed scope of try-catch when building the report. - Simplified exclusion logic by using PatternExcludesArtifactFilter.
Pushed a new commit containing the suggested changes. |
I've reopened this issue, so I can merge the improvements on the code. Can you first solve the conflicts? |
Merged with 82f4bf2. |
…lte: - Removed unnecessary code in tests. - Narrowed scope of try-catch when building the report. - Simplified exclusion logic by using PatternExcludesArtifactFilter.
Added pluginManagementExcludes list parameter.