Skip to content

Commit

Permalink
Bug: 1052 Adding integration test
Browse files Browse the repository at this point in the history
  • Loading branch information
fipro78 committed Jun 28, 2022
1 parent c2e4619 commit dfca2f3
Show file tree
Hide file tree
Showing 27 changed files with 616 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<extensions>
<extension>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-build</artifactId>
<version>3.0.0-SNAPSHOT</version>
</extension>
</extensions>
83 changes: 83 additions & 0 deletions tycho-its/projects/product.pluginBased.mavenArtefacts/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
<?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>tycho-its-project.issue1052</groupId>
<artifactId>tycho-its-project.issue1052.parent</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>pom</packaging>

<pluginRepositories>
<pluginRepository>
<id>tycho-snapshots</id>
<url>https://repo.eclipse.org/content/repositories/tycho-snapshots/</url>
</pluginRepository>
</pluginRepositories>

<properties>
<bnd.version>6.3.0</bnd.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

<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>tycho-packaging-plugin</artifactId>
<version>${tycho-version}</version>
<configuration>
<archive>
<addMavenDescriptor>false</addMavenDescriptor>
</archive>
</configuration>
</plugin>

<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>target-platform-configuration</artifactId>
<version>${tycho-version}</version>
<configuration>
<environments>
<environment>
<os>win32</os>
<ws>win32</ws>
<arch>x86_64</arch>
</environment>
</environments>

<target>
<artifact>
<groupId>tycho-its-project.issue1052</groupId>
<artifactId>tycho-its-project.issue1052.target</artifactId>
<version>${project.version}</version>
</artifact>
</target>

</configuration>
</plugin>
</plugins>
</build>

<modules>
<!-- PDE Target Definition -->
<module>tycho-its-project.issue1052.target</module>

<!-- OSGi Services (API & Impl) -->
<module>tycho-its-project.issue1052.api</module>
<module>tycho-its-project.issue1052.impl</module>

<!-- JAX-RS Whiteboard Application -->
<module>tycho-its-project.issue1052.jaxrs.product</module>
</modules>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
</classpath>
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>tycho-its-project.issue1052.api</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
eclipse.preferences.version=1
encoding/<project>=UTF-8
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
org.eclipse.jdt.core.compiler.compliance=11
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=11
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Modifier API
Bundle-SymbolicName: tycho-its-project.issue1052.api
Bundle-Version: 1.0.0.qualifier
Automatic-Module-Name: tycho-its-project.issue1052.api
Bundle-RequiredExecutionEnvironment: JavaSE-11
Export-Package: issue1052.api;version="1.0.0"
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
source.. = src/
output.. = bin/
bin.includes = META-INF/,\
.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package issue1052.api;

public interface StringModifier {
String modify(String input);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
</classpath>
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>tycho-its-project.issue1052.impl</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ds.core.builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
eclipse.preferences.version=1
encoding/<project>=UTF-8
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
org.eclipse.jdt.core.compiler.compliance=11
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=11
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
classpath=true
dsVersion=V1_3
eclipse.preferences.version=1
enabled=true
generateBundleActivationPolicyLazy=true
path=OSGI-INF
validationErrorLevel=error
validationErrorLevel.missingImplicitUnbindMethod=error
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Modifier Implementations
Bundle-SymbolicName: tycho-its-project.issue1052.impl
Bundle-Version: 1.0.0.qualifier
Automatic-Module-Name: tycho-its-project.issue1052.impl
Bundle-RequiredExecutionEnvironment: JavaSE-11
Service-Component: OSGI-INF/issue1052.impl.StringInverter.xml
Bundle-ActivationPolicy: lazy
Import-Package: javax.ws.rs;version="2.1.0",
javax.ws.rs.core;version="2.1.0",
issue1052.api;version="1.0.0",
org.osgi.service.component.annotations;version="[1.3.0,2.0.0)";resolution:=optional
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" immediate="true" name="issue1052.impl.StringInverter">
<property name="osgi.jaxrs.resource" value="true"/>
<service>
<provide interface="issue1052.api.StringModifier"/>
</service>
<implementation class="issue1052.impl.StringInverter"/>
</scr:component>
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
source.. = src/
output.. = bin/
bin.includes = META-INF/,\
.,\
OSGI-INF/
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
package issue1052.impl;

import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;

import org.osgi.service.component.annotations.Component;

import issue1052.api.StringModifier;

//The JAX-RS path annotation for this service
@Path("/inverter")
@Component(
immediate = true,
property = {
// property to configure that the service must be processed by the JAX-RS Whiteboard
"osgi.jaxrs.resource=true"})
public class StringInverter implements StringModifier {

@GET
// The JAX-RS annotation to specify the result type
@Produces(MediaType.TEXT_PLAIN)
// The JAX-RS annotation to specify that the last part
// of the URL is used as method parameter
@Path("/{value}")
@Override
public String modify(@PathParam("value") String input) {
return (input != null)
? new StringBuilder(input).reverse().toString()
: "No input given";
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>tycho-its-project.issue1052.jaxrs.product</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
</natures>
<filteredResources>
<filter>
<id>1656398149664</id>
<name></name>
<type>30</type>
<matcher>
<id>org.eclipse.core.resources.regexFilterMatcher</id>
<arguments>node_modules|.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__</arguments>
</matcher>
</filter>
</filteredResources>
</projectDescription>
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
eclipse.preferences.version=1
encoding/<project>=UTF-8
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
index: target/index.xml;name="tycho-its-project.issue1052.jaxrs.product"

-standalone: ${index}

-runee: JavaSE-11
-runfw: org.eclipse.osgi
-runsystemcapabilities: ${native_capability}

-resolve.effective: active;skip:="osgi.service"

-runrequires: \
osgi.identity;filter:='(osgi.identity=tycho-its-project.issue1052.impl)'

-runbundles: \
tycho-its-project.issue1052..api,\
tycho-its-project.issue1052.impl,\
com.sun.activation.javax.activation,\
jakarta.annotation-api,\
jakarta.servlet-api,\
jakarta.xml.bind-api,\
org.apache.aries.javax.jax.rs-api,\
org.apache.aries.jax.rs.whiteboard,\
org.apache.felix.gogo.command,\
org.apache.felix.gogo.runtime,\
org.apache.felix.gogo.shell,\
org.apache.felix.http.jetty,\
org.apache.felix.http.servlet-api,\
org.apache.felix.scr,\
org.apache.servicemix.specs.annotation-api-1.3,\
org.apache.servicemix.specs.jaxws-api-2.2,\
org.apache.servicemix.specs.saaj-api-1.3,\
org.eclipse.equinox.console,\
org.eclipse.osgi,\
org.eclipse.osgi.services,\
org.osgi.service.jaxrs,\
org.osgi.util.function,\
org.osgi.util.promise,\
org.slf4j.api

-runproperties: \
osgi.console=,\
org.osgi.service.http.port=8282
Loading

0 comments on commit dfca2f3

Please sign in to comment.