diff --git a/tycho-its/projects/linked-resources/.project b/tycho-its/projects/linked-resources/.project new file mode 100644 index 0000000000..920f119665 --- /dev/null +++ b/tycho-its/projects/linked-resources/.project @@ -0,0 +1,11 @@ + + + linked-resources + + + + + + + + diff --git a/tycho-its/projects/linked-resources/.settings/org.eclipse.core.resources.prefs b/tycho-its/projects/linked-resources/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000000..99f26c0203 --- /dev/null +++ b/tycho-its/projects/linked-resources/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding/=UTF-8 diff --git a/tycho-its/projects/linked-resources/.settings/org.eclipse.jdt.core.prefs b/tycho-its/projects/linked-resources/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000000..9478cb1653 --- /dev/null +++ b/tycho-its/projects/linked-resources/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,15 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate +org.eclipse.jdt.core.compiler.codegen.targetPlatform=17 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=17 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning +org.eclipse.jdt.core.compiler.release=enabled +org.eclipse.jdt.core.compiler.source=17 diff --git a/tycho-its/projects/linked-resources/org.eclipse.tycho.test.linked.resources/.classpath b/tycho-its/projects/linked-resources/org.eclipse.tycho.test.linked.resources/.classpath new file mode 100644 index 0000000000..81fe078c20 --- /dev/null +++ b/tycho-its/projects/linked-resources/org.eclipse.tycho.test.linked.resources/.classpath @@ -0,0 +1,7 @@ + + + + + + + diff --git a/tycho-its/projects/linked-resources/org.eclipse.tycho.test.linked.resources/.project b/tycho-its/projects/linked-resources/org.eclipse.tycho.test.linked.resources/.project new file mode 100644 index 0000000000..6dbbd57497 --- /dev/null +++ b/tycho-its/projects/linked-resources/org.eclipse.tycho.test.linked.resources/.project @@ -0,0 +1,35 @@ + + + org.eclipse.tycho.test.linked.resources + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.pde.PluginNature + org.eclipse.jdt.core.javanature + + + + .settings + 2 + $%7BPARENT-1-PROJECT_LOC%7D/.settings + + + diff --git a/tycho-its/projects/linked-resources/org.eclipse.tycho.test.linked.resources/META-INF/MANIFEST.MF b/tycho-its/projects/linked-resources/org.eclipse.tycho.test.linked.resources/META-INF/MANIFEST.MF new file mode 100644 index 0000000000..9351cd72c4 --- /dev/null +++ b/tycho-its/projects/linked-resources/org.eclipse.tycho.test.linked.resources/META-INF/MANIFEST.MF @@ -0,0 +1,7 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: Resources +Bundle-SymbolicName: org.eclipse.tycho.test.linked.resources +Bundle-Version: 1.0.0.qualifier +Automatic-Module-Name: org.eclipse.tycho.test.linked.resources +Bundle-RequiredExecutionEnvironment: JavaSE-17 diff --git a/tycho-its/projects/linked-resources/org.eclipse.tycho.test.linked.resources/build.properties b/tycho-its/projects/linked-resources/org.eclipse.tycho.test.linked.resources/build.properties new file mode 100644 index 0000000000..34d2e4d2da --- /dev/null +++ b/tycho-its/projects/linked-resources/org.eclipse.tycho.test.linked.resources/build.properties @@ -0,0 +1,4 @@ +source.. = src/ +output.. = bin/ +bin.includes = META-INF/,\ + . diff --git a/tycho-its/projects/linked-resources/org.eclipse.tycho.test.linked.resources/pom.xml b/tycho-its/projects/linked-resources/org.eclipse.tycho.test.linked.resources/pom.xml new file mode 100644 index 0000000000..221a602813 --- /dev/null +++ b/tycho-its/projects/linked-resources/org.eclipse.tycho.test.linked.resources/pom.xml @@ -0,0 +1,16 @@ + + + 4.0.0 + linked-resources + org.eclipse.tycho.test.linked.resources + 1.0.0-SNAPSHOT + eclipse-plugin + + + linked-resources + linked-resources.build + 1.0.0-SNAPSHOT + + + diff --git a/tycho-its/projects/linked-resources/org.eclipse.tycho.test.linked.resources/src/org/eclipse/tycho/test/linked/resources/Dummy.java b/tycho-its/projects/linked-resources/org.eclipse.tycho.test.linked.resources/src/org/eclipse/tycho/test/linked/resources/Dummy.java new file mode 100644 index 0000000000..8d9d08369e --- /dev/null +++ b/tycho-its/projects/linked-resources/org.eclipse.tycho.test.linked.resources/src/org/eclipse/tycho/test/linked/resources/Dummy.java @@ -0,0 +1,5 @@ +package org.eclipse.tycho.test.linked.resources; + +public class Dummy { + +} diff --git a/tycho-its/projects/linked-resources/pom.xml b/tycho-its/projects/linked-resources/pom.xml new file mode 100644 index 0000000000..df8c21c91b --- /dev/null +++ b/tycho-its/projects/linked-resources/pom.xml @@ -0,0 +1,34 @@ + + + 4.0.0 + linked-resources + linked-resources.build + 1.0.0-SNAPSHOT + linked-resources.build + pom + + + org.eclipse.tycho.test.linked.resources + + + + + + org.eclipse.tycho + tycho-maven-plugin + ${tycho-version} + true + + + org.eclipse.tycho + tycho-compiler-plugin + ${tycho-version} + + true + + + + + + diff --git a/tycho-its/src/test/java/org/eclipse/tycho/test/linkedResources/LinkedResourcesTest.java b/tycho-its/src/test/java/org/eclipse/tycho/test/linkedResources/LinkedResourcesTest.java new file mode 100644 index 0000000000..a0b5b765a6 --- /dev/null +++ b/tycho-its/src/test/java/org/eclipse/tycho/test/linkedResources/LinkedResourcesTest.java @@ -0,0 +1,32 @@ +package org.eclipse.tycho.test.linkedResources; + +import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.Matchers.containsString; +import static org.hamcrest.Matchers.hasItem; +import static org.hamcrest.Matchers.not; + +import java.util.List; + +import org.apache.maven.it.VerificationException; +import org.apache.maven.it.Verifier; +import org.eclipse.tycho.test.AbstractTychoIntegrationTest; +import org.junit.jupiter.api.Test; + +public class LinkedResourcesTest extends AbstractTychoIntegrationTest { + + @Test + public void testLinkedSettingsFolder() throws Exception { + Verifier verifier = getVerifier("linked-resources", false); + verifier.executeGoals(List.of("verify")); + + verifyNoUseProjectSettingsWarning(verifier); + } + + private void verifyNoUseProjectSettingsWarning(Verifier verifier) throws VerificationException { + List lines = verifier.loadFile(verifier.getBasedir(), verifier.getLogFileName(), false); + + String warningMsg = "[WARNING] Parameter 'useProjectSettings' is set to true, but preferences file"; + + assertThat(lines, not(hasItem(containsString(warningMsg)))); + } +}