Skip to content

Commit 269e53e

Browse files
aslakhellesoympkorstanje
authored andcommitted
Remove OSGi
[OSGi] Remove OSGi
1 parent 6da0cc2 commit 269e53e

File tree

25 files changed

+4
-984
lines changed

25 files changed

+4
-984
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ Please see [CONTRIBUTING.md](https://github.com/cucumber/cucumber/blob/master/CO
2323
### Deprecated
2424

2525
### Removed
26+
* [OSGi] Jars are no longer packaged as OSGi bundles. The `osgi` module and `pax-exam` examples have been removed as well.
27+
([#1404](https://github.com/cucumber/cucumber-jvm/pull/1404)
28+
[cucumber/cucumber#412](https://github.com/cucumber/cucumber/issues/412)
29+
Aslak Hellesøy)
2630
* [Core] Remove deprecated TestStep methods ([#1391](https://github.com/cucumber/cucumber-jvm/pull/1391) M.P. Korstanje)
2731

2832
### Fixed

core/pom.xml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@
7979
<artifactId>maven-jar-plugin</artifactId>
8080
<configuration>
8181
<archive>
82-
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
8382
<manifest>
8483
<mainClass>cucumber.api.cli.Main</mainClass>
8584
</manifest>
@@ -95,17 +94,6 @@
9594
</configuration>
9695
</plugin>
9796

98-
<plugin>
99-
<groupId>org.apache.felix</groupId>
100-
<artifactId>maven-bundle-plugin</artifactId>
101-
<configuration>
102-
<instructions>
103-
<Bundle-Description />
104-
<DynamicImport-Package>*</DynamicImport-Package>
105-
</instructions>
106-
</configuration>
107-
</plugin>
108-
10997
</plugins>
11098
</build>
11199
</project>

core/src/test/java/cucumber/runtime/UtilsTest.java

Lines changed: 0 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,12 @@
22

33
import org.junit.Test;
44

5-
import java.lang.reflect.Method;
65
import java.net.MalformedURLException;
76
import java.net.URL;
8-
import java.net.URLClassLoader;
97

108
import static cucumber.runtime.Utils.isInstantiable;
119
import static org.junit.Assert.assertEquals;
1210
import static org.junit.Assert.assertFalse;
13-
import static org.junit.Assert.assertNotEquals;
1411
import static org.junit.Assert.assertTrue;
1512

1613
public class UtilsTest {
@@ -36,69 +33,4 @@ public void test_url() throws MalformedURLException {
3633
URL url = new URL(dotCucumber, "stepdefs.json");
3734
assertEquals(new URL("file:foo/bar/.cucumber/stepdefs.json"), url);
3835
}
39-
40-
@Test
41-
public void testInvokeDefaultClassLoader() throws Throwable {
42-
// Sanity check to verify that MyClass was loaded by the default class loader/
43-
assertEquals(ClassLoader.getSystemClassLoader(), MyClass.class.getClassLoader());
44-
Object target = new MyClass();
45-
46-
Method publicInterfaceMethod = MyClass.class.getMethod("publicInterfaceMethod");
47-
assertEquals(Boolean.TRUE, Utils.invoke(target, publicInterfaceMethod, 1000));
48-
49-
Method protectedAbstractMethod = MyClass.class.getDeclaredMethod("protectedAbstractMethod");
50-
assertEquals(Boolean.TRUE, Utils.invoke(target, protectedAbstractMethod, 1000));
51-
52-
Method privateMethod = MyAbstractClass.class.getDeclaredMethod("privateMethod");
53-
assertEquals(Boolean.TRUE, Utils.invoke(target, privateMethod, 1000));
54-
}
55-
56-
@Test
57-
public void testInvokeOtherClassLoader() throws Throwable {
58-
// Create a new class loader using the same URLs as the system class loader
59-
URL[] urls = ((URLClassLoader) ClassLoader.getSystemClassLoader()).getURLs();
60-
ClassLoader myClassLoader = new URLClassLoader(urls, null);
61-
62-
// Load the test class MyClass using our newly create class loader and create an instance.
63-
Class<?> myClass = myClassLoader.loadClass(MyClass.class.getName());
64-
Object target = myClass.getConstructor().newInstance();
65-
66-
// Sanity check to verify that MyClass was loaded by the default class loader.
67-
assertEquals(ClassLoader.getSystemClassLoader(), MyClass.class.getClassLoader());
68-
// Verify that the class loader of our loaded class is different.
69-
assertNotEquals(MyClass.class.getClassLoader(), myClass.getClassLoader());
70-
71-
Method publicInterfaceMethod = MyClass.class.getMethod("publicInterfaceMethod");
72-
assertEquals(Boolean.TRUE, Utils.invoke(target, publicInterfaceMethod, 1000));
73-
74-
Method protectedAbstractMethod = MyClass.class.getDeclaredMethod("protectedAbstractMethod");
75-
assertEquals(Boolean.TRUE, Utils.invoke(target, protectedAbstractMethod, 1000));
76-
77-
Method privateMethod = MyAbstractClass.class.getDeclaredMethod("privateMethod");
78-
assertEquals(Boolean.TRUE, Utils.invoke(target, privateMethod, 1000));
79-
}
80-
81-
public static interface MyInterface {
82-
Boolean publicInterfaceMethod();
83-
}
84-
85-
public static abstract class MyAbstractClass implements MyInterface {
86-
protected abstract Boolean protectedAbstractMethod();
87-
88-
private Boolean privateMethod() {
89-
return Boolean.TRUE;
90-
}
91-
}
92-
93-
public static class MyClass extends MyAbstractClass {
94-
@Override
95-
public Boolean publicInterfaceMethod() {
96-
return Boolean.TRUE;
97-
}
98-
99-
@Override
100-
protected Boolean protectedAbstractMethod() {
101-
return Boolean.TRUE;
102-
}
103-
}
10436
}

examples/pax-exam/calculator-api/pom.xml

Lines changed: 0 additions & 28 deletions
This file was deleted.

examples/pax-exam/calculator-api/src/main/java/cucumber/examples/java/paxexam/CalculatorService.java

Lines changed: 0 additions & 7 deletions
This file was deleted.

examples/pax-exam/calculator-service/pom.xml

Lines changed: 0 additions & 42 deletions
This file was deleted.

examples/pax-exam/calculator-service/src/main/java/cucumber/examples/java/paxexam/service/Activator.java

Lines changed: 0 additions & 25 deletions
This file was deleted.

examples/pax-exam/calculator-service/src/main/java/cucumber/examples/java/paxexam/service/CalculatorServiceImpl.java

Lines changed: 0 additions & 12 deletions
This file was deleted.

examples/pax-exam/calculator-test/features/calculator.feature

Lines changed: 0 additions & 12 deletions
This file was deleted.

examples/pax-exam/calculator-test/pom.xml

Lines changed: 0 additions & 74 deletions
This file was deleted.

examples/pax-exam/calculator-test/src/test/java/cucumber/examples/java/paxexam/test/CalculatorSteps.java

Lines changed: 0 additions & 44 deletions
This file was deleted.

0 commit comments

Comments
 (0)