[Arakhnę-Dev] [219] * Bug fix: thirdPartyLicenses parameter of the Maven license plugin is no more mandatory . |
[ Thread Index |
Date Index
| More arakhne.org/dev Archives
]
- To: dev@xxxxxxxxxxx
- Subject: [Arakhnę-Dev] [219] * Bug fix: thirdPartyLicenses parameter of the Maven license plugin is no more mandatory .
- From: subversion@xxxxxxxxxxxxx
- Date: Tue, 01 Mar 2011 09:42:17 +0100
Revision: 219
Author: galland
Date: 2011-03-01 09:42:16 +0100 (Tue, 01 Mar 2011)
Log Message:
-----------
* Bug fix: thirdPartyLicenses parameter of the Maven license plugin is no more mandatory.
Modified Paths:
--------------
trunk/maven-license-install-plugin/src/main/java/org/arakhne/maven/maven_license_install_plugin/InstallLicenseMojo.java
Modified: trunk/maven-license-install-plugin/src/main/java/org/arakhne/maven/maven_license_install_plugin/InstallLicenseMojo.java
===================================================================
--- trunk/maven-license-install-plugin/src/main/java/org/arakhne/maven/maven_license_install_plugin/InstallLicenseMojo.java 2011-02-28 13:24:33 UTC (rev 218)
+++ trunk/maven-license-install-plugin/src/main/java/org/arakhne/maven/maven_license_install_plugin/InstallLicenseMojo.java 2011-03-01 08:42:16 UTC (rev 219)
@@ -67,7 +67,6 @@
* Third-party licenses. A file to license name map.
*
* @parameter
- * @required
*/
protected String[] thirdPartyLicenses;
@@ -127,16 +126,18 @@
Map<String,License> includedLicenses = new HashMap<String,License>();
Pattern re = Pattern.compile("^([^:]+):(.+)$"); //$NON-NLS-1$
- for(String tpl : this.thirdPartyLicenses) {
- Matcher matcher = re.matcher(tpl);
- if (matcher.matches()) {
- String l = matcher.group(1);
- String f = matcher.group(2);
- lic = License.parse(l, null);
- if (lic!=null) {
- includedLicenses.put(f, lic);
- }
- }
+ if (this.thirdPartyLicenses!=null) {
+ for(String tpl : this.thirdPartyLicenses) {
+ Matcher matcher = re.matcher(tpl);
+ if (matcher.matches()) {
+ String l = matcher.group(1);
+ String f = matcher.group(2);
+ lic = License.parse(l, null);
+ if (lic!=null) {
+ includedLicenses.put(f, lic);
+ }
+ }
+ }
}
try {