r1823 - in trunk: . src/it src/main/java/org/nuiton/license/plugin
Author: ymartel Date: 2010-09-24 14:09:25 +0200 (Fri, 24 Sep 2010) New Revision: 1823 Url: http://nuiton.org/repositories/revision/maven-license-plugin/1823 Log: Remove usage of "projectFilter" parameter, now use only included/exluded Groups/Artifacts Removed: trunk/src/it/evol-818/ Modified: trunk/pom.xml trunk/src/main/java/org/nuiton/license/plugin/AbstractAddThirdPartyMojo.java trunk/src/main/java/org/nuiton/license/plugin/AddThirdPartyMojo.java trunk/src/main/java/org/nuiton/license/plugin/AggregatorAddThirdPartyMojo.java trunk/src/main/java/org/nuiton/license/plugin/LicenseMap.java Modified: trunk/pom.xml =================================================================== --- trunk/pom.xml 2010-09-24 11:56:14 UTC (rev 1822) +++ trunk/pom.xml 2010-09-24 12:09:25 UTC (rev 1823) @@ -429,8 +429,7 @@ <artifactId>maven-invoker-plugin</artifactId> <configuration> <pomIncludes> - <pomInclude>excluded-included/pom.xml</pomInclude> - <pomInclude>evol-818/pom.xml</pomInclude> + <pomInclude>evo-818-excluded-included/pom.xml</pomInclude> <pomInclude>ano-816/pom.xml</pomInclude> <pomInclude>add-third-party/no-encoding/pom.xml</pomInclude> <pomInclude>aggregate-add-third-party/pom.xml</pomInclude> Modified: trunk/src/main/java/org/nuiton/license/plugin/AbstractAddThirdPartyMojo.java =================================================================== --- trunk/src/main/java/org/nuiton/license/plugin/AbstractAddThirdPartyMojo.java 2010-09-24 11:56:14 UTC (rev 1822) +++ trunk/src/main/java/org/nuiton/license/plugin/AbstractAddThirdPartyMojo.java 2010-09-24 12:09:25 UTC (rev 1823) @@ -158,14 +158,6 @@ protected boolean groupByLicense; /** - * A filter for projects licenses. - * - * @parameter expression="${license.projectFilter}" default-value="" - * @since 2.3.2 - */ - protected String projectFilter; - - /** * A filter to exclude some GroupIds * * @parameter expression="${license.excludedGroups}" default-value="" @@ -548,14 +540,6 @@ this.doGenerateBundle = doGenerateBundle; } - public String getProjectFilter() { - return projectFilter; - } - - public void setProjectFilter(String projectFilter) { - this.projectFilter = projectFilter; - } - public String getExcludedGroups() { return excludedGroups; } Modified: trunk/src/main/java/org/nuiton/license/plugin/AddThirdPartyMojo.java =================================================================== --- trunk/src/main/java/org/nuiton/license/plugin/AddThirdPartyMojo.java 2010-09-24 11:56:14 UTC (rev 1822) +++ trunk/src/main/java/org/nuiton/license/plugin/AddThirdPartyMojo.java 2010-09-24 12:09:25 UTC (rev 1823) @@ -102,7 +102,7 @@ protected LicenseMap createLicenseMap() throws ProjectBuildingException { Log log = getLog(); - LicenseMap licenseMap = new LicenseMap(this.getProjectFilter()); + LicenseMap licenseMap = new LicenseMap(); licenseMap.setLog(log); boolean haveNoIncludedGroups = StringUtils.isEmpty(includedGroups); Modified: trunk/src/main/java/org/nuiton/license/plugin/AggregatorAddThirdPartyMojo.java =================================================================== --- trunk/src/main/java/org/nuiton/license/plugin/AggregatorAddThirdPartyMojo.java 2010-09-24 11:56:14 UTC (rev 1822) +++ trunk/src/main/java/org/nuiton/license/plugin/AggregatorAddThirdPartyMojo.java 2010-09-24 12:09:25 UTC (rev 1823) @@ -83,7 +83,7 @@ protected LicenseMap createLicenseMap() throws ProjectBuildingException { Log log = getLog(); - LicenseMap licenseMap = new LicenseMap(this.getProjectFilter()); + LicenseMap licenseMap = new LicenseMap(); licenseMap.setLog(log); SortedMap<String, MavenProject> artifacts = getArtifactCache(); Modified: trunk/src/main/java/org/nuiton/license/plugin/LicenseMap.java =================================================================== --- trunk/src/main/java/org/nuiton/license/plugin/LicenseMap.java 2010-09-24 11:56:14 UTC (rev 1822) +++ trunk/src/main/java/org/nuiton/license/plugin/LicenseMap.java 2010-09-24 12:09:25 UTC (rev 1823) @@ -62,17 +62,12 @@ private static final long serialVersionUID = 864199843545688069L; private transient Log log; - private String licenseFilterPattern; public static final String unknownLicenseMessage = "Unknown license"; public LicenseMap() { } - public LicenseMap(String someLicenseFilterPattern) { - licenseFilterPattern = someLicenseFilterPattern; - } - public void setLog(Log log) { this.log = log; } @@ -90,31 +85,6 @@ return; } - if (StringUtils.isNotEmpty(licenseFilterPattern)) { - // we have some defined license filters - try { - Pattern pattern = Pattern.compile(licenseFilterPattern); - Matcher matchGroupId = pattern.matcher(project.getGroupId()); - if (matchGroupId.find()) { - if (log.isDebugEnabled()) { - log.debug("Exclude " + project.getGroupId()); - } - return; - } - Matcher matchArtifactId = pattern.matcher(project.getArtifactId()); - if (matchArtifactId.find()) { - if (log.isDebugEnabled()) { - log.debug("Exclude " + project.getGroupId() + ":" + - project.getArtifactId()); - } - return; - } - } - catch (PatternSyntaxException e) { - getLog().warn("The pattern specified by expression <" + licenseFilterPattern + "> seems to be invalid."); - } - } - if (CollectionUtils.isEmpty(licenses)) { // no license found for the dependency
participants (1)
-
ymartel@users.nuiton.org