Skip to content

Commit

Permalink
Fully rely on generated OSGi Declarative Services component-xml
Browse files Browse the repository at this point in the history
and remove the ones committed into git.
  • Loading branch information
HannesWell committed Oct 30, 2023
1 parent 947ff03 commit 00e9088
Show file tree
Hide file tree
Showing 16 changed files with 73 additions and 92 deletions.
1 change: 1 addition & 0 deletions runtime/tests/org.eclipse.e4.core.tests/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
OSGI-INF/*.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
dsVersion=V1_3
eclipse.preferences.version=1
enabled=true
generateBundleActivationPolicyLazy=true
path=OSGI-INF
validationErrorLevel=error
validationErrorLevel.missingImplicitUnbindMethod=error

This file was deleted.

This file was deleted.

8 changes: 0 additions & 8 deletions runtime/tests/org.eclipse.e4.core.tests/OSGI-INF/adder.xml

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

3 changes: 0 additions & 3 deletions runtime/tests/org.eclipse.e4.core.tests/build.properties
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,3 @@ bin.includes = META-INF/,\
about.html
src.includes = resources/,\
about.html

# Maven properties, see https://github.com/eclipse/tycho/wiki/Tycho-Pomless
pom.model.property.testClass = org.eclipse.e4.core.tests.CoreTestSuite
62 changes: 62 additions & 0 deletions runtime/tests/org.eclipse.e4.core.tests/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2023, 2023 Hannes Wellmann and others.
All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Distribution License v1.0
which accompanies this distribution, and is available at
http://www.eclipse.org/org/documents/edl-v10.php
Contributors:
Hannes Wellmann - initial implementation
-->
<project
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://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>
<parent>
<groupId>org.eclipse.platform</groupId>
<artifactId>eclipse.platform.runtime</artifactId>
<version>4.30.0-SNAPSHOT</version>
<relativePath>../..</relativePath>
</parent>
<artifactId>org.eclipse.e4.core.tests</artifactId>
<version>1.3.200-SNAPSHOT</version>
<packaging>eclipse-test-plugin</packaging>
<properties>
<testClass>org.eclipse.e4.core.tests.CoreTestSuite</testClass>
</properties>
<build>
<testSourceDirectory>src</testSourceDirectory>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<!-- The tycho-ds-plugin generates component-xml files into
target/classes/OSGI-INF, but when this Plugin is exected in a tycho-surefire
runtime, the bundle-root is this project's root directory and the
Service-Component-Runtime only searches for component-xml files only in
<bundle-root>/OSGI-INF and does not consider the classpath-->
<execution>
<id>copy-ds-component-xml</id>
<goals>
<goal>copy-resources</goal>
</goals>
<phase>process-test-resources</phase>
<configuration>
<resources>
<resource>
<directory>
${project.build.outputDirectory}/OSGI-INF</directory>
<include>*.xml</include>
</resource>
</resources>
<outputDirectory>${project.basedir}/OSGI-INF</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,15 @@
package org.eclipse.e4.core.internal.tests.contexts;

import org.eclipse.e4.core.contexts.ContextFunction;
import org.eclipse.e4.core.contexts.IContextFunction;
import org.eclipse.e4.core.contexts.IEclipseContext;
import org.osgi.service.component.annotations.Component;


/**
* A function provided as a declarative service. See OSGI-INF/adder.xml.
*/
@Component(service = IContextFunction.class, property = "service.context.key:String=sum")
public class AddContextFunction extends ContextFunction {

@Override
Expand Down

0 comments on commit 00e9088

Please sign in to comment.