Skip to content

Commit

Permalink
Reproducer for eclipse-tycho#898
Browse files Browse the repository at this point in the history
  • Loading branch information
laeubi committed May 5, 2022
1 parent 8dda882 commit a8f817e
Show file tree
Hide file tree
Showing 7 changed files with 97 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tycho-its/projects/feature.dependency/.mvn/extensions.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<extensions>
<extension>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-build</artifactId>
<version>${tycho-version}</version>
</extension>
</extensions>
1 change: 1 addition & 0 deletions tycho-its/projects/feature.dependency/.mvn/maven.config
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
-Dtycho-version=3.0.0-SNAPSHOT
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
bin.includes = feature.xml
10 changes: 10 additions & 0 deletions tycho-its/projects/feature.dependency/feature/feature.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<feature
id="test.include.feature"
version="1.0.0">

<requires>
<import plugin="com.google.guava"/>
</requires>

</feature>
39 changes: 39 additions & 0 deletions tycho-its/projects/feature.dependency/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>org.eclipse.tycho.it</groupId>
<version>1.0.0</version>
<artifactId>parent-898</artifactId>
<packaging>pom</packaging>
<properties>
<tycho-version>3.0.0-SNAPSHOT</tycho-version>
<orbit-url>https://download.eclipse.org/tools/orbit/downloads/2022-03/</orbit-url>
</properties>

<repositories>
<repository>
<id>repo</id>
<layout>p2</layout>
<url>${orbit-url}</url>
</repository>
</repositories>

<modules>
<module>feature</module>
<module>site</module>
</modules>

<build>
<plugins>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-maven-plugin</artifactId>
<version>${tycho-version}</version>
<extensions>true</extensions>
</plugin>
</plugins>
</build>
</project>
4 changes: 4 additions & 0 deletions tycho-its/projects/feature.dependency/site/category.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<site>
<feature id="test.include.feature"/>
</site>
Original file line number Diff line number Diff line change
@@ -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());
}
}

0 comments on commit a8f817e

Please sign in to comment.