-
Notifications
You must be signed in to change notification settings - Fork 193
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
276 additions
and
0 deletions.
There are no files selected for viewing
11 changes: 11 additions & 0 deletions
11
tycho-its/projects/TYCHO2983siteWithPubishedFeatures/helloworld.feature/build.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
33 changes: 33 additions & 0 deletions
33
tycho-its/projects/TYCHO2983siteWithPubishedFeatures/helloworld.feature/feature.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<feature | ||
id="helloworld.feature" | ||
label="OSGi Hello World Feature" | ||
version="0.1.0.qualifier"> | ||
|
||
<description url="http://www.example.com/description"> | ||
[Enter Feature Description here.] | ||
</description> | ||
|
||
<copyright url="http://www.example.com/copyright"> | ||
[Enter Copyright Description here.] | ||
</copyright> | ||
|
||
<license url="http://www.example.com/license"> | ||
[Enter License Description here.] | ||
</license> | ||
|
||
<plugin | ||
id="helloworld" | ||
download-size="0" | ||
install-size="0" | ||
version="0.0.0" | ||
unpack="false"/> | ||
|
||
<plugin | ||
id="helloworld.source" | ||
download-size="0" | ||
install-size="0" | ||
version="0.0.0" | ||
unpack="false"/> | ||
|
||
</feature> |
14 changes: 14 additions & 0 deletions
14
tycho-its/projects/TYCHO2983siteWithPubishedFeatures/helloworld.feature/pom.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?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 https://maven.apache.org/maven-v4_0_0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<artifactId>helloworld.feature</artifactId> | ||
<packaging>eclipse-feature</packaging> | ||
|
||
<parent> | ||
<artifactId>helloworld.parent</artifactId> | ||
<groupId>helloworld</groupId> | ||
<version>0.1.0-SNAPSHOT</version> | ||
</parent> | ||
</project> |
5 changes: 5 additions & 0 deletions
5
tycho-its/projects/TYCHO2983siteWithPubishedFeatures/helloworld.updatesite/category.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<site> | ||
<feature url="features/helloworld.feature_0.0.0.jar" id="helloworld.feature" version="0.0.0"/> | ||
<feature url="features/io.spring.javaformat.eclipse.feature_0.0.0.jar" id="io.spring.javaformat.eclipse.feature" version="0.0.0"/> | ||
</site> |
45 changes: 45 additions & 0 deletions
45
tycho-its/projects/TYCHO2983siteWithPubishedFeatures/helloworld.updatesite/pom.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
<?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 https://maven.apache.org/maven-v4_0_0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<artifactId>helloworld.updatesite</artifactId> | ||
<packaging>eclipse-repository</packaging> | ||
|
||
<parent> | ||
<artifactId>helloworld.parent</artifactId> | ||
<groupId>helloworld</groupId> | ||
<version>0.1.0-SNAPSHOT</version> | ||
</parent> | ||
|
||
<repositories> | ||
<repository> | ||
<id>eclipse-indigo</id> | ||
<url>https://download.eclipse.org/releases/2024-03</url> | ||
<layout>p2</layout> | ||
</repository> | ||
</repositories> | ||
|
||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>io.spring.javaformat</groupId> | ||
<artifactId>io.spring.javaformat.eclipse.feature</artifactId> | ||
<version>0.0.41</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>io.spring.javaformat</groupId> | ||
<artifactId>io.spring.javaformat.eclipse.feature</artifactId> | ||
<version>0.0.41</version> | ||
<classifier>p2metadata</classifier> | ||
<type>xml</type> | ||
</dependency> | ||
<dependency> | ||
<groupId>io.spring.javaformat</groupId> | ||
<artifactId>io.spring.javaformat.eclipse.feature</artifactId> | ||
<version>0.0.41</version> | ||
<classifier>p2artifacts</classifier> | ||
<type>xml</type> | ||
</dependency> | ||
</dependencies> | ||
</project> |
6 changes: 6 additions & 0 deletions
6
tycho-its/projects/TYCHO2983siteWithPubishedFeatures/helloworld/META-INF/MANIFEST.MF
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
14 changes: 14 additions & 0 deletions
14
tycho-its/projects/TYCHO2983siteWithPubishedFeatures/helloworld/build.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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/,\ | ||
. |
2 changes: 2 additions & 0 deletions
2
tycho-its/projects/TYCHO2983siteWithPubishedFeatures/helloworld/plugin.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
pluginName=Hello Plugin | ||
pluginVendor=Hello Vendor |
14 changes: 14 additions & 0 deletions
14
tycho-its/projects/TYCHO2983siteWithPubishedFeatures/helloworld/pom.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?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 https://maven.apache.org/maven-v4_0_0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<artifactId>helloworld</artifactId> | ||
<packaging>eclipse-plugin</packaging> | ||
|
||
<parent> | ||
<artifactId>helloworld.parent</artifactId> | ||
<groupId>helloworld</groupId> | ||
<version>0.1.0-SNAPSHOT</version> | ||
</parent> | ||
</project> |
25 changes: 25 additions & 0 deletions
25
...projects/TYCHO2983siteWithPubishedFeatures/helloworld/src/helloworld/MessageProvider.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 + "!!"; | ||
} | ||
|
||
} |
58 changes: 58 additions & 0 deletions
58
tycho-its/projects/TYCHO2983siteWithPubishedFeatures/pom.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" | ||
xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<groupId>helloworld</groupId> | ||
<artifactId>helloworld.parent</artifactId> | ||
<version>0.1.0-SNAPSHOT</version> | ||
<packaging>pom</packaging> | ||
|
||
<modules> | ||
<module>helloworld</module> | ||
<module>helloworld.feature</module> | ||
<module>helloworld.updatesite</module> | ||
</modules> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.eclipse.tycho</groupId> | ||
<artifactId>tycho-maven-plugin</artifactId> | ||
<version>${tycho-version}</version> | ||
<extensions>true</extensions> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.eclipse.tycho</groupId> | ||
<artifactId>target-platform-configuration</artifactId> | ||
<version>${tycho-version}</version> | ||
<configuration> | ||
<resolver>p2</resolver> | ||
</configuration> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.eclipse.tycho</groupId> | ||
<artifactId>tycho-packaging-plugin</artifactId> | ||
<version>${tycho-version}</version> | ||
<configuration> | ||
<archiveSite>true</archiveSite> | ||
</configuration> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.eclipse.tycho</groupId> | ||
<artifactId>tycho-source-plugin</artifactId> | ||
<version>${tycho-version}</version> | ||
<executions> | ||
<execution> | ||
<id>plugin-source</id> | ||
<goals> | ||
<goal>plugin-source</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
|
||
</project> |
49 changes: 49 additions & 0 deletions
49
...lipse/tycho/test/TYCHO2983siteWithPubishedFeatures/TYCHO2983siteWithPubishedFeatures.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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) | ||
); | ||
} | ||
} |