From 8babfb39bfa51aaa36c9318a1a98d9267e21fc05 Mon Sep 17 00:00:00 2001 From: Alessandro Ballarin Date: Sat, 2 Mar 2019 10:13:51 +0100 Subject: [PATCH] Failure test case for issue #303 --- .../child1/pom.xml | 58 ++++++++++++++ .../invoker.properties | 23 ++++++ .../pom.xml | 80 +++++++++++++++++++ .../postbuild.groovy | 29 +++++++ 4 files changed, 190 insertions(+) create mode 100644 src/it/aggregate-add-third-party-include-optional/child1/pom.xml create mode 100644 src/it/aggregate-add-third-party-include-optional/invoker.properties create mode 100644 src/it/aggregate-add-third-party-include-optional/pom.xml create mode 100644 src/it/aggregate-add-third-party-include-optional/postbuild.groovy diff --git a/src/it/aggregate-add-third-party-include-optional/child1/pom.xml b/src/it/aggregate-add-third-party-include-optional/child1/pom.xml new file mode 100644 index 000000000..91a2fed3d --- /dev/null +++ b/src/it/aggregate-add-third-party-include-optional/child1/pom.xml @@ -0,0 +1,58 @@ + + + + + + 4.0.0 + + + org.codehaus.mojo.license.test + test-aggregate-add-third-party-include-optional + 1.0 + + test-aggregate-add-third-party-include-optional-child1 + + + + + + com.jhlabs + filters + 2.0.235 + + + + + commons-logging + commons-logging + 1.1.1 + true + + + + + + + diff --git a/src/it/aggregate-add-third-party-include-optional/invoker.properties b/src/it/aggregate-add-third-party-include-optional/invoker.properties new file mode 100644 index 000000000..3c5fd74bb --- /dev/null +++ b/src/it/aggregate-add-third-party-include-optional/invoker.properties @@ -0,0 +1,23 @@ +### +# #%L +# License Maven Plugin +# %% +# Copyright (C) 2019 Alessandro Ballarin +# %% +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Lesser Public License for more details. +# +# You should have received a copy of the GNU General Lesser Public +# License along with this program. If not, see +# . +# #L% +### +invoker.goals=clean license:aggregate-add-third-party +invoker.failureBehavior=fail-at-end diff --git a/src/it/aggregate-add-third-party-include-optional/pom.xml b/src/it/aggregate-add-third-party-include-optional/pom.xml new file mode 100644 index 000000000..62416c11e --- /dev/null +++ b/src/it/aggregate-add-third-party-include-optional/pom.xml @@ -0,0 +1,80 @@ + + + + + + 4.0.0 + + org.codehaus.mojo.license.test + test-aggregate-add-third-party-include-optional + 1.0 + + + child1 + + + Test: aggregate-add-third-party-include-optional + + pom + + + UTF-8 + + + + + + + + org.codehaus.mojo + license-maven-plugin + @pom.version@ + + true + + + + + + + + org.codehaus.mojo + license-maven-plugin + + + include-optional + + aggregate-add-third-party + + + + + + + + + + + diff --git a/src/it/aggregate-add-third-party-include-optional/postbuild.groovy b/src/it/aggregate-add-third-party-include-optional/postbuild.groovy new file mode 100644 index 000000000..4995c34fe --- /dev/null +++ b/src/it/aggregate-add-third-party-include-optional/postbuild.groovy @@ -0,0 +1,29 @@ +/* + * #%L + * License Maven Plugin + * %% + * Copyright (C) 2019 Alessandro Ballarin + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Lesser Public License for more details. + * + * You should have received a copy of the GNU General Lesser Public + * License along with this program. If not, see + * . + * #L% + */ + +file = new File(basedir, 'target/generated-sources/license/THIRD-PARTY.txt'); +assert file.exists(); +content = file.text; + +assert !content.contains('the project has no dependencies.'); +assert content.contains('com.jhlabs:filters:2.0.235'); +assert content.contains('commons-logging:commons-logging:1.1.1');