From a8f817e043450863d1fc79a1409765342a6a80da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoph=20L=C3=A4ubrich?= Date: Thu, 5 May 2022 20:22:45 +0200 Subject: [PATCH] Reproducer for #898 --- .../feature.dependency/.mvn/extensions.xml | 8 ++++ .../feature.dependency/.mvn/maven.config | 1 + .../feature/build.properties | 1 + .../feature.dependency/feature/feature.xml | 10 +++++ tycho-its/projects/feature.dependency/pom.xml | 39 +++++++++++++++++++ .../feature.dependency/site/category.xml | 4 ++ .../feature/FeatureWithDependenciesTest.java | 34 ++++++++++++++++ 7 files changed, 97 insertions(+) create mode 100644 tycho-its/projects/feature.dependency/.mvn/extensions.xml create mode 100644 tycho-its/projects/feature.dependency/.mvn/maven.config create mode 100644 tycho-its/projects/feature.dependency/feature/build.properties create mode 100644 tycho-its/projects/feature.dependency/feature/feature.xml create mode 100644 tycho-its/projects/feature.dependency/pom.xml create mode 100644 tycho-its/projects/feature.dependency/site/category.xml create mode 100644 tycho-its/src/test/java/org/eclipse/tycho/test/feature/FeatureWithDependenciesTest.java diff --git a/tycho-its/projects/feature.dependency/.mvn/extensions.xml b/tycho-its/projects/feature.dependency/.mvn/extensions.xml new file mode 100644 index 0000000000..64513b8578 --- /dev/null +++ b/tycho-its/projects/feature.dependency/.mvn/extensions.xml @@ -0,0 +1,8 @@ + + + + org.eclipse.tycho + tycho-build + ${tycho-version} + + \ No newline at end of file diff --git a/tycho-its/projects/feature.dependency/.mvn/maven.config b/tycho-its/projects/feature.dependency/.mvn/maven.config new file mode 100644 index 0000000000..090a1850ba --- /dev/null +++ b/tycho-its/projects/feature.dependency/.mvn/maven.config @@ -0,0 +1 @@ +-Dtycho-version=3.0.0-SNAPSHOT \ No newline at end of file diff --git a/tycho-its/projects/feature.dependency/feature/build.properties b/tycho-its/projects/feature.dependency/feature/build.properties new file mode 100644 index 0000000000..64f93a9f0b --- /dev/null +++ b/tycho-its/projects/feature.dependency/feature/build.properties @@ -0,0 +1 @@ +bin.includes = feature.xml diff --git a/tycho-its/projects/feature.dependency/feature/feature.xml b/tycho-its/projects/feature.dependency/feature/feature.xml new file mode 100644 index 0000000000..6a4391bb0d --- /dev/null +++ b/tycho-its/projects/feature.dependency/feature/feature.xml @@ -0,0 +1,10 @@ + + + + + + + + diff --git a/tycho-its/projects/feature.dependency/pom.xml b/tycho-its/projects/feature.dependency/pom.xml new file mode 100644 index 0000000000..c74ddb01dc --- /dev/null +++ b/tycho-its/projects/feature.dependency/pom.xml @@ -0,0 +1,39 @@ + + + 4.0.0 + + org.eclipse.tycho.it + 1.0.0 + parent-898 + pom + + 3.0.0-SNAPSHOT + https://download.eclipse.org/tools/orbit/downloads/2022-03/ + + + + + repo + p2 + ${orbit-url} + + + + + feature + site + + + + + + org.eclipse.tycho + tycho-maven-plugin + ${tycho-version} + true + + + + diff --git a/tycho-its/projects/feature.dependency/site/category.xml b/tycho-its/projects/feature.dependency/site/category.xml new file mode 100644 index 0000000000..e827ab55f0 --- /dev/null +++ b/tycho-its/projects/feature.dependency/site/category.xml @@ -0,0 +1,4 @@ + + + + diff --git a/tycho-its/src/test/java/org/eclipse/tycho/test/feature/FeatureWithDependenciesTest.java b/tycho-its/src/test/java/org/eclipse/tycho/test/feature/FeatureWithDependenciesTest.java new file mode 100644 index 0000000000..301d0edbf0 --- /dev/null +++ b/tycho-its/src/test/java/org/eclipse/tycho/test/feature/FeatureWithDependenciesTest.java @@ -0,0 +1,34 @@ +/******************************************************************************* + * Copyright (c) 2022 Christoph Läubrich and others. + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Christoph Läubrich - initial API and implementation + *******************************************************************************/ +package org.eclipse.tycho.test.feature; + +import static org.junit.Assert.assertTrue; + +import java.io.File; +import java.util.List; + +import org.apache.maven.it.Verifier; +import org.eclipse.tycho.test.AbstractTychoIntegrationTest; +import org.junit.Test; + +public class FeatureWithDependenciesTest extends AbstractTychoIntegrationTest { + + @Test + public void testFeatureRestriction() throws Exception { + Verifier verifier = getVerifier("feature.dependency", false, true); + verifier.executeGoals(List.of("clean", "package")); + verifier.verifyErrorFreeLog(); + File pluginsFolder = new File(verifier.getBasedir(), "site/target/repository/plugins"); + assertTrue("No plugin folder created!", pluginsFolder.exists()); + } +}