From 56061e24db5acb61319aafc5b6eb973b6d69c02b Mon Sep 17 00:00:00 2001 From: Jonathan Meier Date: Tue, 11 Oct 2022 18:22:53 +0200 Subject: [PATCH] Add integration test illustrating issue #1512 --- .../.settings/org.eclipse.jdt.core.prefs | 2 ++ .../issue1512/bundle/META-INF/MANIFEST.MF | 8 +++++ .../issue1512/bundle/build.properties | 4 +++ tycho-its/projects/issue1512/bundle/pom.xml | 35 +++++++++++++++++++ .../issue1512/bundle/src/bundle/A.java | 10 ++++++ .../issue1512/fragment/META-INF/MANIFEST.MF | 9 +++++ .../issue1512/fragment/build.properties | 4 +++ tycho-its/projects/issue1512/fragment/pom.xml | 11 ++++++ .../src/fragment/internal/Internal.java | 5 +++ .../issue1512/host/META-INF/MANIFEST.MF | 8 +++++ .../projects/issue1512/host/build.properties | 4 +++ tycho-its/projects/issue1512/host/pom.xml | 11 ++++++ tycho-its/projects/issue1512/pom.xml | 25 +++++++++++++ .../projects/issue1512/site/category.xml | 5 +++ tycho-its/projects/issue1512/site/pom.xml | 11 ++++++ .../tycho/test/issue1512/Issue1512Test.java | 22 ++++++++++++ 16 files changed, 174 insertions(+) create mode 100644 tycho-its/projects/issue1512/bundle/.settings/org.eclipse.jdt.core.prefs create mode 100644 tycho-its/projects/issue1512/bundle/META-INF/MANIFEST.MF create mode 100644 tycho-its/projects/issue1512/bundle/build.properties create mode 100644 tycho-its/projects/issue1512/bundle/pom.xml create mode 100644 tycho-its/projects/issue1512/bundle/src/bundle/A.java create mode 100644 tycho-its/projects/issue1512/fragment/META-INF/MANIFEST.MF create mode 100644 tycho-its/projects/issue1512/fragment/build.properties create mode 100644 tycho-its/projects/issue1512/fragment/pom.xml create mode 100644 tycho-its/projects/issue1512/fragment/src/fragment/internal/Internal.java create mode 100644 tycho-its/projects/issue1512/host/META-INF/MANIFEST.MF create mode 100644 tycho-its/projects/issue1512/host/build.properties create mode 100644 tycho-its/projects/issue1512/host/pom.xml create mode 100644 tycho-its/projects/issue1512/pom.xml create mode 100644 tycho-its/projects/issue1512/site/category.xml create mode 100644 tycho-its/projects/issue1512/site/pom.xml create mode 100644 tycho-its/src/test/java/org/eclipse/tycho/test/issue1512/Issue1512Test.java diff --git a/tycho-its/projects/issue1512/bundle/.settings/org.eclipse.jdt.core.prefs b/tycho-its/projects/issue1512/bundle/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000000..ffab3e2c62 --- /dev/null +++ b/tycho-its/projects/issue1512/bundle/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.problem.unusedWarningToken=error diff --git a/tycho-its/projects/issue1512/bundle/META-INF/MANIFEST.MF b/tycho-its/projects/issue1512/bundle/META-INF/MANIFEST.MF new file mode 100644 index 0000000000..9f647012c3 --- /dev/null +++ b/tycho-its/projects/issue1512/bundle/META-INF/MANIFEST.MF @@ -0,0 +1,8 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: Bundle +Bundle-SymbolicName: bundle +Bundle-Version: 0.0.1.qualifier +Automatic-Module-Name: bundle +Bundle-RequiredExecutionEnvironment: JavaSE-17 +Require-Bundle: host diff --git a/tycho-its/projects/issue1512/bundle/build.properties b/tycho-its/projects/issue1512/bundle/build.properties new file mode 100644 index 0000000000..41eb6ade2b --- /dev/null +++ b/tycho-its/projects/issue1512/bundle/build.properties @@ -0,0 +1,4 @@ +source.. = src/ +output.. = bin/ +bin.includes = META-INF/,\ + . diff --git a/tycho-its/projects/issue1512/bundle/pom.xml b/tycho-its/projects/issue1512/bundle/pom.xml new file mode 100644 index 0000000000..6408fa7590 --- /dev/null +++ b/tycho-its/projects/issue1512/bundle/pom.xml @@ -0,0 +1,35 @@ + + + 4.0.0 + org.eclipse.tycho.tycho-its.issue1512 + bundle + 0.0.1-SNAPSHOT + eclipse-plugin + + + + target + file:../site/target/repository + p2 + + + + + + + org.eclipse.tycho + tycho-maven-plugin + ${tycho-version} + true + + + org.eclipse.tycho + tycho-compiler-plugin + ${tycho-version} + + true + + + + + diff --git a/tycho-its/projects/issue1512/bundle/src/bundle/A.java b/tycho-its/projects/issue1512/bundle/src/bundle/A.java new file mode 100644 index 0000000000..80f479b369 --- /dev/null +++ b/tycho-its/projects/issue1512/bundle/src/bundle/A.java @@ -0,0 +1,10 @@ +package bundle; + +import fragment.internal.Internal; + +@SuppressWarnings("restriction") +public class A { + + public Internal internal; + +} diff --git a/tycho-its/projects/issue1512/fragment/META-INF/MANIFEST.MF b/tycho-its/projects/issue1512/fragment/META-INF/MANIFEST.MF new file mode 100644 index 0000000000..1dccf73954 --- /dev/null +++ b/tycho-its/projects/issue1512/fragment/META-INF/MANIFEST.MF @@ -0,0 +1,9 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: Fragment +Bundle-SymbolicName: fragment +Bundle-Version: 0.0.1.qualifier +Fragment-Host: host +Automatic-Module-Name: fragment +Bundle-RequiredExecutionEnvironment: JavaSE-17 +Export-Package: fragment.internal; x-internal:=true diff --git a/tycho-its/projects/issue1512/fragment/build.properties b/tycho-its/projects/issue1512/fragment/build.properties new file mode 100644 index 0000000000..41eb6ade2b --- /dev/null +++ b/tycho-its/projects/issue1512/fragment/build.properties @@ -0,0 +1,4 @@ +source.. = src/ +output.. = bin/ +bin.includes = META-INF/,\ + . diff --git a/tycho-its/projects/issue1512/fragment/pom.xml b/tycho-its/projects/issue1512/fragment/pom.xml new file mode 100644 index 0000000000..014d718f14 --- /dev/null +++ b/tycho-its/projects/issue1512/fragment/pom.xml @@ -0,0 +1,11 @@ + + + 4.0.0 + + org.eclipse.tycho.tycho-its.issue1512 + parent + 0.0.1-SNAPSHOT + + fragment + eclipse-plugin + diff --git a/tycho-its/projects/issue1512/fragment/src/fragment/internal/Internal.java b/tycho-its/projects/issue1512/fragment/src/fragment/internal/Internal.java new file mode 100644 index 0000000000..7ee6c48bc7 --- /dev/null +++ b/tycho-its/projects/issue1512/fragment/src/fragment/internal/Internal.java @@ -0,0 +1,5 @@ +package fragment.internal; + +public class Internal { + +} diff --git a/tycho-its/projects/issue1512/host/META-INF/MANIFEST.MF b/tycho-its/projects/issue1512/host/META-INF/MANIFEST.MF new file mode 100644 index 0000000000..7490751e55 --- /dev/null +++ b/tycho-its/projects/issue1512/host/META-INF/MANIFEST.MF @@ -0,0 +1,8 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: Host +Bundle-SymbolicName: host +Bundle-Version: 0.0.1.qualifier +Automatic-Module-Name: host +Bundle-RequiredExecutionEnvironment: JavaSE-17 +Eclipse-ExtensibleAPI: true diff --git a/tycho-its/projects/issue1512/host/build.properties b/tycho-its/projects/issue1512/host/build.properties new file mode 100644 index 0000000000..41eb6ade2b --- /dev/null +++ b/tycho-its/projects/issue1512/host/build.properties @@ -0,0 +1,4 @@ +source.. = src/ +output.. = bin/ +bin.includes = META-INF/,\ + . diff --git a/tycho-its/projects/issue1512/host/pom.xml b/tycho-its/projects/issue1512/host/pom.xml new file mode 100644 index 0000000000..599a7744f5 --- /dev/null +++ b/tycho-its/projects/issue1512/host/pom.xml @@ -0,0 +1,11 @@ + + + 4.0.0 + + org.eclipse.tycho.tycho-its.issue1512 + parent + 0.0.1-SNAPSHOT + + host + eclipse-plugin + diff --git a/tycho-its/projects/issue1512/pom.xml b/tycho-its/projects/issue1512/pom.xml new file mode 100644 index 0000000000..6fdea75c1d --- /dev/null +++ b/tycho-its/projects/issue1512/pom.xml @@ -0,0 +1,25 @@ + + + 4.0.0 + org.eclipse.tycho.tycho-its.issue1512 + parent + 0.0.1-SNAPSHOT + pom + + + fragment + host + site + + + + + + org.eclipse.tycho + tycho-maven-plugin + ${tycho-version} + true + + + + diff --git a/tycho-its/projects/issue1512/site/category.xml b/tycho-its/projects/issue1512/site/category.xml new file mode 100644 index 0000000000..ed77d40876 --- /dev/null +++ b/tycho-its/projects/issue1512/site/category.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/tycho-its/projects/issue1512/site/pom.xml b/tycho-its/projects/issue1512/site/pom.xml new file mode 100644 index 0000000000..bfdba6aed4 --- /dev/null +++ b/tycho-its/projects/issue1512/site/pom.xml @@ -0,0 +1,11 @@ + + + 4.0.0 + + org.eclipse.tycho.tycho-its.issue1512 + parent + 0.0.1-SNAPSHOT + + site + eclipse-repository + diff --git a/tycho-its/src/test/java/org/eclipse/tycho/test/issue1512/Issue1512Test.java b/tycho-its/src/test/java/org/eclipse/tycho/test/issue1512/Issue1512Test.java new file mode 100644 index 0000000000..a328b39e0e --- /dev/null +++ b/tycho-its/src/test/java/org/eclipse/tycho/test/issue1512/Issue1512Test.java @@ -0,0 +1,22 @@ +package org.eclipse.tycho.test.issue1512; + +import java.util.List; + +import org.apache.maven.it.Verifier; +import org.eclipse.tycho.test.AbstractTychoIntegrationTest; +import org.junit.Test; + +public class Issue1512Test extends AbstractTychoIntegrationTest { + + @Test + public void test() throws Exception { + Verifier verifierRepo = getVerifier("issue1512"); + verifierRepo.executeGoals(List.of("clean", "package")); + verifierRepo.verifyErrorFreeLog(); + + Verifier verifierBundle = getVerifier("issue1512/bundle"); + verifierBundle.executeGoals(List.of("clean", "compile")); + verifierBundle.verifyErrorFreeLog(); + } + +}