Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Dietrich <christian.dietrich@itemis.de>
  • Loading branch information
cdietrich committed Aug 25, 2022
1 parent abac7fe commit b99b3ee
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
1 change: 1 addition & 0 deletions tycho-its/projects/feature.dependency/feature/feature.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

<requires>
<import plugin="com.google.guava"/>
<import feature="org.eclipse.emf.sdk" version="2.29.0" match="greaterOrEqual"/>
</requires>

</feature>
2 changes: 2 additions & 0 deletions tycho-its/projects/feature.dependency/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
<tycho-version>3.0.0-SNAPSHOT</tycho-version>
<orbit-url>https://download.eclipse.org/tools/orbit/downloads/2022-03/</orbit-url>
<includePlugins>false</includePlugins>
<includeFeatures>false</includeFeatures>
</properties>

<repositories>
Expand Down Expand Up @@ -44,6 +45,7 @@
<version>${tycho-version}</version>
<configuration>
<includeRequiredPlugins>${includePlugins}</includeRequiredPlugins>
<includeRequiredFeatures>${includeFeatures}</includeRequiredFeatures>
</configuration>
</plugin>
</plugins>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,31 @@ public void testFeatureRestrictionWithIncludePluginsEnabled() throws Exception {
verifier.verifyErrorFreeLog();
File targetdir = new File(verifier.getBasedir(), "site/target");
assertFileExists(targetdir, "repository/plugins/com.google.guava_*.jar");
assertFileDoesNotExist(targetdir, "repository/plugins/org.eclipse.emf.common_2*.jar");
assertFileDoesNotExist(targetdir, "repository/features/org.eclipse.emf.sdk_*.jar");
}

@Test
public void testFeatureRestrictionWithIncludePluginsDisabled() throws Exception {
public void testFeatureRestrictionWithIncludeFeaturesEnabled() throws Exception {
Verifier verifier = getVerifier("feature.dependency", false, true);
verifier.setSystemProperty("includePlugins", "false");
verifier.setSystemProperty("includeFeatures", "true");
verifier.executeGoals(List.of("clean", "package"));
verifier.verifyErrorFreeLog();
File targetdir = new File(verifier.getBasedir(), "site/target");
assertFileDoesNotExist(targetdir, "repository/plugins/com.google.guava_*.jar");
assertFileExists(targetdir, "repository/plugins/org.eclipse.emf.common_2*.jar");
assertFileExists(targetdir, "repository/features/org.eclipse.emf.sdk_*.jar");
}

@Test
public void testFeatureRestrictionWithIncludePluginsAndFeaturesDisabled() throws Exception {
Verifier verifier = getVerifier("feature.dependency", false, true);
verifier.executeGoals(List.of("clean", "package"));
verifier.verifyErrorFreeLog();
File targetdir = new File(verifier.getBasedir(), "site/target");
assertFileDoesNotExist(targetdir, "repository/plugins/com.google.guava_*.jar");
assertFileDoesNotExist(targetdir, "repository/plugins/org.eclipse.emf.common_2.*.jar");
assertFileDoesNotExist(targetdir, "repository/features/org.eclipse.emf.sdk_*.jar");
}
}

0 comments on commit b99b3ee

Please sign in to comment.