diff --git a/src/it/PR-32/child1/pom.xml b/src/it/PR-32/child1/pom.xml index 1025f79d7..7c6cb4aaa 100644 --- a/src/it/PR-32/child1/pom.xml +++ b/src/it/PR-32/child1/pom.xml @@ -11,8 +11,8 @@ PR-32-child1 - LGPL 3.0 - https://www.gnu.org/licenses/lgpl-3.0.txt + Apache License 2.0 + https://www.apache.org/licenses/LICENSE-2.0.txt diff --git a/src/it/PR-32/postbuild.groovy b/src/it/PR-32/postbuild.groovy index b5eaa6816..313c96e5d 100644 --- a/src/it/PR-32/postbuild.groovy +++ b/src/it/PR-32/postbuild.groovy @@ -20,11 +20,11 @@ * #L% */ -def lgpl3 = new File(basedir, 'child2/target/generated-resources/licenses/lgpl 3.0 - lgpl-3.0.txt') -assert lgpl3.exists() -assert lgpl3.text.contains('GNU LESSER GENERAL PUBLIC LICENSE'); +def asl2 = new File(basedir, 'child2/target/generated-resources/licenses/apache license 2.0 - license-2.0.txt') +assert asl2.exists() +assert asl2.text.contains('Version 2.0, January 2004'); def licensesXml = new File(basedir, 'child2/target/generated-resources/licenses.xml'); assert licensesXml.exists() -assert licensesXml.text.contains('lgpl 3.0 - lgpl-3.0.txt') -assert licensesXml.text.contains('https://www.gnu.org/licenses/lgpl-3.0.txt') +assert licensesXml.text.contains('apache license 2.0 - license-2.0.txt') +assert licensesXml.text.contains('https://www.apache.org/licenses/LICENSE-2.0.txt') diff --git a/src/it/PR-33/child1/pom.xml b/src/it/PR-33/child1/pom.xml index 1f0c6bc7a..6f6490b98 100644 --- a/src/it/PR-33/child1/pom.xml +++ b/src/it/PR-33/child1/pom.xml @@ -11,8 +11,8 @@ PR-33-child1 - LGPL 2.1 - https://www.gnu.org/licenses/lgpl-2.1.txt + Apache License 1.0 + https://www.apache.org/licenses/LICENSE-1.0 diff --git a/src/it/PR-33/child2/pom.xml b/src/it/PR-33/child2/pom.xml index a48465640..8f2b85b72 100644 --- a/src/it/PR-33/child2/pom.xml +++ b/src/it/PR-33/child2/pom.xml @@ -11,8 +11,8 @@ PR-33-child2 - LGPL 3.0 - https://www.gnu.org/licenses/lgpl-3.0.txt + Apache License 2.0 + https://www.apache.org/licenses/LICENSE-2.0.txt diff --git a/src/it/PR-33/postbuild.groovy b/src/it/PR-33/postbuild.groovy index 8dcea0807..c9a57cdf8 100644 --- a/src/it/PR-33/postbuild.groovy +++ b/src/it/PR-33/postbuild.groovy @@ -20,34 +20,18 @@ * #L% */ -def assertExistsFile(file) { - if (!file.exists() || file.isDirectory()) { - println(file.getAbsolutePath() + " file is missing or a directory.") - assert false - } - assert true -} -def assertContains(file, content, expected) { - if (!content.contains(expected)) { - println(expected + " was not found in file [" + file + "]\n :" + content) - return false - } - return true -} +def asl2 = new File(basedir, 'child3/target/generated-resources/licenses/org.codehaus.mojo.license.test.pr-33-child2_apache_license_2.0.txt') +assert asl2.exists() +assert asl2.text.contains('Version 2.0, January 2004'); - -def lgpl3 = new File(basedir, 'child3/target/generated-resources/licenses/org.codehaus.mojo.license.test.pr-33-child1_lgpl_2.1.txt') -assert lgpl3.exists() -assert lgpl3.text.contains('Version 2.1, February 1999'); - -def lgpl21 = new File(basedir, 'child3/target/generated-resources/licenses/org.codehaus.mojo.license.test.pr-33-child2_lgpl_3.0.txt') -assert lgpl21.exists() -assert lgpl21.text.contains('Version 3, 29 June 2007'); +def asl1 = new File(basedir, 'child3/target/generated-resources/licenses/org.codehaus.mojo.license.test.pr-33-child1_apache_license_1.0.txt') +assert asl1.exists() +assert asl1.text.contains('Copyright (c) 1995-1999 The Apache Group.'); def licensesXml = new File(basedir, 'child3/target/generated-resources/licenses.xml'); assert licensesXml.exists() -assert licensesXml.text.contains('org.codehaus.mojo.license.test.pr-33-child1_lgpl_2.1.txt') -assert licensesXml.text.contains('https://www.gnu.org/licenses/lgpl-2.1.txt') -assert licensesXml.text.contains('org.codehaus.mojo.license.test.pr-33-child2_lgpl_3.0.txt') -assert licensesXml.text.contains('https://www.gnu.org/licenses/lgpl-3.0.txt') +assert licensesXml.text.contains('org.codehaus.mojo.license.test.pr-33-child2_apache_license_2.0.txt') +assert licensesXml.text.contains('https://www.apache.org/licenses/LICENSE-2.0.txt') +assert licensesXml.text.contains('org.codehaus.mojo.license.test.pr-33-child1_apache_license_1.0.txt') +assert licensesXml.text.contains('https://www.apache.org/licenses/LICENSE-1.0')