diff --git a/tycho-its/projects/TYCHO2983siteWithPubishedFeatures/helloworld.feature/build.properties b/tycho-its/projects/TYCHO2983siteWithPubishedFeatures/helloworld.feature/build.properties new file mode 100644 index 0000000000..0b6dc2b511 --- /dev/null +++ b/tycho-its/projects/TYCHO2983siteWithPubishedFeatures/helloworld.feature/build.properties @@ -0,0 +1,11 @@ +############################################################################### +# Copyright (c) 2010, 2011 SAP AG and others. +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Eclipse Public License v1.0 +# which accompanies this distribution, and is available at +# https://www.eclipse.org/legal/epl-v10.html +# +# Contributors: +# SAP AG - initial API and implementation +############################################################################### +bin.includes = feature.xml diff --git a/tycho-its/projects/TYCHO2983siteWithPubishedFeatures/helloworld.feature/feature.xml b/tycho-its/projects/TYCHO2983siteWithPubishedFeatures/helloworld.feature/feature.xml new file mode 100644 index 0000000000..da7e9188d1 --- /dev/null +++ b/tycho-its/projects/TYCHO2983siteWithPubishedFeatures/helloworld.feature/feature.xml @@ -0,0 +1,33 @@ + + + + + [Enter Feature Description here.] + + + + [Enter Copyright Description here.] + + + + [Enter License Description here.] + + + + + + + diff --git a/tycho-its/projects/TYCHO2983siteWithPubishedFeatures/helloworld.feature/pom.xml b/tycho-its/projects/TYCHO2983siteWithPubishedFeatures/helloworld.feature/pom.xml new file mode 100644 index 0000000000..b52b0de8a5 --- /dev/null +++ b/tycho-its/projects/TYCHO2983siteWithPubishedFeatures/helloworld.feature/pom.xml @@ -0,0 +1,14 @@ + + + 4.0.0 + + helloworld.feature + eclipse-feature + + + helloworld.parent + helloworld + 0.1.0-SNAPSHOT + + diff --git a/tycho-its/projects/TYCHO2983siteWithPubishedFeatures/helloworld.updatesite/category.xml b/tycho-its/projects/TYCHO2983siteWithPubishedFeatures/helloworld.updatesite/category.xml new file mode 100644 index 0000000000..9eab8a743e --- /dev/null +++ b/tycho-its/projects/TYCHO2983siteWithPubishedFeatures/helloworld.updatesite/category.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/tycho-its/projects/TYCHO2983siteWithPubishedFeatures/helloworld.updatesite/pom.xml b/tycho-its/projects/TYCHO2983siteWithPubishedFeatures/helloworld.updatesite/pom.xml new file mode 100644 index 0000000000..3d6eb08beb --- /dev/null +++ b/tycho-its/projects/TYCHO2983siteWithPubishedFeatures/helloworld.updatesite/pom.xml @@ -0,0 +1,45 @@ + + + 4.0.0 + + helloworld.updatesite + eclipse-repository + + + helloworld.parent + helloworld + 0.1.0-SNAPSHOT + + + + + eclipse-indigo + https://download.eclipse.org/releases/2024-03 + p2 + + + + + + + io.spring.javaformat + io.spring.javaformat.eclipse.feature + 0.0.41 + + + io.spring.javaformat + io.spring.javaformat.eclipse.feature + 0.0.41 + p2metadata + xml + + + io.spring.javaformat + io.spring.javaformat.eclipse.feature + 0.0.41 + p2artifacts + xml + + + diff --git a/tycho-its/projects/TYCHO2983siteWithPubishedFeatures/helloworld/META-INF/MANIFEST.MF b/tycho-its/projects/TYCHO2983siteWithPubishedFeatures/helloworld/META-INF/MANIFEST.MF new file mode 100644 index 0000000000..ab8feb1f61 --- /dev/null +++ b/tycho-its/projects/TYCHO2983siteWithPubishedFeatures/helloworld/META-INF/MANIFEST.MF @@ -0,0 +1,6 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-SymbolicName: helloworld +Bundle-Version: 0.1.0.qualifier +Bundle-Name: %pluginName +Bundle-Vendor: %pluginVendor \ No newline at end of file diff --git a/tycho-its/projects/TYCHO2983siteWithPubishedFeatures/helloworld/build.properties b/tycho-its/projects/TYCHO2983siteWithPubishedFeatures/helloworld/build.properties new file mode 100644 index 0000000000..d398a02404 --- /dev/null +++ b/tycho-its/projects/TYCHO2983siteWithPubishedFeatures/helloworld/build.properties @@ -0,0 +1,14 @@ +############################################################################### +# Copyright (c) 2010, 2011 SAP AG and others. +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Eclipse Public License v1.0 +# which accompanies this distribution, and is available at +# https://www.eclipse.org/legal/epl-v10.html +# +# Contributors: +# SAP AG - initial API and implementation +############################################################################### +source.. = src/ +output.. = target/classes +bin.includes = META-INF/,\ + . diff --git a/tycho-its/projects/TYCHO2983siteWithPubishedFeatures/helloworld/plugin.properties b/tycho-its/projects/TYCHO2983siteWithPubishedFeatures/helloworld/plugin.properties new file mode 100644 index 0000000000..c68d29ff15 --- /dev/null +++ b/tycho-its/projects/TYCHO2983siteWithPubishedFeatures/helloworld/plugin.properties @@ -0,0 +1,2 @@ +pluginName=Hello Plugin +pluginVendor=Hello Vendor \ No newline at end of file diff --git a/tycho-its/projects/TYCHO2983siteWithPubishedFeatures/helloworld/pom.xml b/tycho-its/projects/TYCHO2983siteWithPubishedFeatures/helloworld/pom.xml new file mode 100644 index 0000000000..7176da3f67 --- /dev/null +++ b/tycho-its/projects/TYCHO2983siteWithPubishedFeatures/helloworld/pom.xml @@ -0,0 +1,14 @@ + + + 4.0.0 + + helloworld + eclipse-plugin + + + helloworld.parent + helloworld + 0.1.0-SNAPSHOT + + diff --git a/tycho-its/projects/TYCHO2983siteWithPubishedFeatures/helloworld/src/helloworld/MessageProvider.java b/tycho-its/projects/TYCHO2983siteWithPubishedFeatures/helloworld/src/helloworld/MessageProvider.java new file mode 100644 index 0000000000..3aa1119c2b --- /dev/null +++ b/tycho-its/projects/TYCHO2983siteWithPubishedFeatures/helloworld/src/helloworld/MessageProvider.java @@ -0,0 +1,25 @@ +/******************************************************************************* + * Copyright (c) 2010, 2011 SAP AG 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: + * SAP AG - initial API and implementation + *******************************************************************************/ +package helloworld; + +public class MessageProvider { + + public String getGreeting() { + return getGreeting("World"); + } + + public String getGreeting(String receiver) { + return "Hello " + receiver + "!!"; + } + +} diff --git a/tycho-its/projects/TYCHO2983siteWithPubishedFeatures/pom.xml b/tycho-its/projects/TYCHO2983siteWithPubishedFeatures/pom.xml new file mode 100644 index 0000000000..60a785aade --- /dev/null +++ b/tycho-its/projects/TYCHO2983siteWithPubishedFeatures/pom.xml @@ -0,0 +1,58 @@ + + + 4.0.0 + + helloworld + helloworld.parent + 0.1.0-SNAPSHOT + pom + + + helloworld + helloworld.feature + helloworld.updatesite + + + + + + org.eclipse.tycho + tycho-maven-plugin + ${tycho-version} + true + + + org.eclipse.tycho + target-platform-configuration + ${tycho-version} + + p2 + + + + org.eclipse.tycho + tycho-packaging-plugin + ${tycho-version} + + true + + + + org.eclipse.tycho + tycho-source-plugin + ${tycho-version} + + + plugin-source + + plugin-source + + + + + + + + diff --git a/tycho-its/src/test/java/org/eclipse/tycho/test/TYCHO2983siteWithPubishedFeatures/TYCHO2983siteWithPubishedFeatures.java b/tycho-its/src/test/java/org/eclipse/tycho/test/TYCHO2983siteWithPubishedFeatures/TYCHO2983siteWithPubishedFeatures.java new file mode 100644 index 0000000000..a7787a3218 --- /dev/null +++ b/tycho-its/src/test/java/org/eclipse/tycho/test/TYCHO2983siteWithPubishedFeatures/TYCHO2983siteWithPubishedFeatures.java @@ -0,0 +1,49 @@ +/******************************************************************************* + * Copyright (c) 2010, 2023 SAP AG 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: + * - initial API and implementation + *******************************************************************************/ + +package org.eclipse.tycho.test.TYCHO2983siteWithPubishedFeatures; + +import org.apache.maven.it.Verifier; +import org.eclipse.tycho.TychoConstants; +import org.eclipse.tycho.test.AbstractTychoIntegrationTest; +import org.eclipse.tycho.test.util.XMLTool; +import org.junit.Test; + +import java.io.File; +import java.util.Arrays; + +import static org.junit.Assert.*; + +public class TYCHO2983siteWithPubishedFeatures extends AbstractTychoIntegrationTest { + + @Test + public void testCheckSiteFeatures() throws Exception { + Verifier verifier = getVerifier("/TYCHO2983siteWithPubishedFeatures", false); + verifier.executeGoal("verify"); + verifier.verifyErrorFreeLog(); + + File siteFeaturesFolder = new File(verifier.getBasedir(), "helloworld.updatesite/target/repository/features"); + + assertTrue(siteFeaturesFolder.exists()); + assertNotNull(Arrays.stream(siteFeaturesFolder.listFiles()).filter( + file -> file.getName().startsWith("helloworld.feature")) + .findAny() + .orElse(null) + ); + assertNotNull(Arrays.stream(siteFeaturesFolder.listFiles()).filter( + file -> file.getName().startsWith("io.spring.javaformat.eclipse.feature")) + .findAny() + .orElse(null) + ); + } +} \ No newline at end of file