Author: ymartel Date: 2010-09-23 16:56:51 +0200 (Thu, 23 Sep 2010) New Revision: 1819 Url: http://nuiton.org/repositories/revision/maven-license-plugin/1819 Log: review two operation, extracting log from parameters Modified: trunk/src/main/java/org/nuiton/license/plugin/AddThirdPartyMojo.java Modified: trunk/src/main/java/org/nuiton/license/plugin/AddThirdPartyMojo.java =================================================================== --- trunk/src/main/java/org/nuiton/license/plugin/AddThirdPartyMojo.java 2010-09-23 14:53:27 UTC (rev 1818) +++ trunk/src/main/java/org/nuiton/license/plugin/AddThirdPartyMojo.java 2010-09-23 14:56:51 UTC (rev 1819) @@ -120,10 +120,10 @@ MavenProject project = addArtifact(id, artifact); // Check if the project should be included - boolean isToInclude = isIncludable(project, log); + boolean isToInclude = isIncludable(project); // Check if the project should be excluded - boolean isToExclude = isExcludable(project, log); + boolean isToExclude = isExcludable(project); if (isToInclude && !isToExclude) { licenseMap.addLicense(project, project.getLicenses()); @@ -256,8 +256,9 @@ } - protected boolean isIncludable(MavenProject project, Log log) { + protected boolean isIncludable(MavenProject project) { + Log log = getLog(); // If there is no constraint on groups or artifacts, all should be included if(StringUtils.isEmpty(includedGroups) && StringUtils.isEmpty(includedArtifacts)) { return true; @@ -306,8 +307,9 @@ } - protected boolean isExcludable(MavenProject project, Log log) { + protected boolean isExcludable(MavenProject project) { + Log log = getLog(); // check if the groupId of the project should be included if (StringUtils.isNotEmpty(excludedGroups)) { // we have some defined license filters