Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: CI

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up JDK 11
uses: actions/setup-java@v4
with:
java-version: '11'
distribution: 'temurin'

- name: Build with Gradle
run: ./gradlew build -x testOSGi
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.gradle/
build/
generated/
bin/
bin_test/
14 changes: 7 additions & 7 deletions bndtools.runtime.applaunch.eclipse3.test/.classpath
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="bin" path="src"/>
<classpathentry kind="con" path="aQute.bnd.classpath.container"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
<classpathentry kind="output" path="bin"/>
</classpath>
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="bin" path="src"/>
<classpathentry kind="con" path="aQute.bnd.classpath.container"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry kind="output" path="bin"/>
</classpath>
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.6
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.6
org.eclipse.jdt.core.compiler.source=1.8
1 change: 0 additions & 1 deletion bndtools.runtime.applaunch.eclipse3.test/bnd.bnd
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
Bundle-Version: 0.1.0.${tstamp}
Private-Package: \
bndtools.runtime.applaunch.eclipse3.test
Test-Cases: \
Expand Down
Original file line number Diff line number Diff line change
@@ -1,30 +1,42 @@
-runee: JavaSE-1.6
-runee: JavaSE-1.8
-runfw: org.eclipse.osgi;version='[3.8,4)'

-runfw: org.eclipse.osgi;version='[3.8.2.v20130124-134944,3.8.2.v20130124-134944]'
-runblacklist: bnd.identity;id='biz.aQute.launcher';version='[7.0.0,8)'

-runsystempackages: \
sun.reflect

-runvm: -ea\n\
-Dosgi.console

-include: \
${workspace}/cnf/lib/eclipse_3.8.x.lib,\
${workspace}/cnf/lib/develop.lib

-runbundles: \
bndtools.runtime.applaunch.eclipse3;version=latest,\
bndtools.runtime.applaunch.eclipse3.test;version=latest,\
${eclipse.core.runtime.bundles},\
\
${gogo.bundles},\
org.eclipse.equinox.console,\
\
example.equinox.headless;version='[0.1.0,0.1.1)'

-runproperties: \
launch.keep=false,\
launch.storage.dir=${project}/rt/cfg,\
osgi.instance.area=${project}/rt/data

-runprogramargs: -application example.equinox.headless.application
-runprogramargs: -application example.equinox.headless.application

-runrequires: \
${eclipse.core.runtime.bundles},\
${gogo.bundles},\
bnd.identity;id='example.equinox.headless',\
bnd.identity;id='bndtools.runtime.applaunch.eclipse3',\
bnd.identity;id='bndtools.runtime.applaunch.eclipse3.test'

-runbundles: \
bndtools.runtime.applaunch.eclipse3;version='[0.2.0,0.2.1)',\
bndtools.runtime.applaunch.eclipse3.test;version=snapshot,\
example.equinox.headless;version='[0.1.0,0.1.1)',\
org.apache.felix.gogo.command;version='[0.8.0,0.8.1)',\
org.apache.felix.gogo.runtime;version='[0.8.0,0.8.1)',\
org.apache.felix.gogo.shell;version='[0.8.0,0.8.1)',\
org.eclipse.core.contenttype;version='[3.7.200,3.7.201)',\
org.eclipse.core.jobs;version='[3.10.200,3.10.201)',\
org.eclipse.core.runtime;version='[3.8.0,3.8.1)',\
org.eclipse.equinox.app;version='[1.4.0,1.4.1)',\
org.eclipse.equinox.common;version='[3.10.200,3.10.201)',\
org.eclipse.equinox.preferences;version='[3.7.200,3.7.201)',\
org.eclipse.equinox.registry;version='[3.8.200,3.8.201)',\
org.eclipse.osgi.services;version='[3.3.100,3.3.101)',\
org.hamcrest.core;version='[1.3.0,1.3.1)',\
org.junit;version='[4.12.0,4.12.1)'
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ public void testVMarguments() throws Exception {

public void testArgumentsService() throws Exception {
assertNotNull(context);
ServiceReference srv = context
ServiceReference<?> srv = context
.getServiceReference(IApplicationContext.class.getName());
assertNotNull(srv);
IApplicationContext iac = (IApplicationContext) context.getService(srv);
Map arguments = iac.getArguments();
Map<?, ?> arguments = iac.getArguments();
assertEquals("example.equinox.headless.application",
arguments.get("eclipse.application"));
}
Expand Down
14 changes: 7 additions & 7 deletions bndtools.runtime.applaunch.eclipse3/.classpath
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
<classpathentry kind="con" path="aQute.bnd.classpath.container"/>
<classpathentry kind="output" path="bin"/>
</classpath>
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="bin" path="src"/>
<classpathentry kind="con" path="aQute.bnd.classpath.container"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry kind="output" path="bin"/>
</classpath>
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#Thu Apr 29 10:26:03 BST 2010
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.5
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.5
org.eclipse.jdt.core.compiler.source=1.8
3 changes: 1 addition & 2 deletions bndtools.runtime.applaunch.eclipse3/bnd.bnd
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
-buildpath: org.eclipse.osgi;version="[3.7,3.9)"

Private-Package: bndtools.runtime.applaunch.eclipse3

Bundle-Activator: bndtools.runtime.applaunch.eclipse3.Activator
Bundle-Version: 0.2.0.${tstamp;yyyyMMdd-HHmm}
Bundle-License: http://www.opensource.org/licenses/eclipse-1.0.php
Include-Resource: OSGI-OPT/license.html=epl-v10.html
Require-Bundle: org.eclipse.osgi;bundle-version="[3.7,3.9)"
7 changes: 0 additions & 7 deletions bndtools.runtime.applaunch.eclipse3/build.xml

This file was deleted.

24 changes: 24 additions & 0 deletions bndtools.runtime.applaunch.eclipse3/eclipse_3.8.2.bndrun
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
-runee: JavaSE-1.8

-runfw: org.eclipse.osgi;version='[3.8,4)'
-runsystempackages: \
sun.reflect
-runvm: -ea\n\
-DvmArg1

-runrequires: \
${eclipse.core.runtime.bundles},\
${gogo.bundles},\
bnd.identity;id='example.equinox.headless',\
bnd.identity;id='bndtools.runtime.applaunch.eclipse3'

-runproperties: \
launch.keep=false,\
launch.storage.dir=${project}/rt/cfg,\
osgi.instance.area=${project}/rt/data

-runprogramargs: -application example.equinox.headless.application

-runblacklist: bnd.identity;id='biz.aQute.launcher';version='[7.0.0,8)'

-runbundles: \

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ public void removedService(final ServiceReference reference, final Object servic
}

private String getBsn(final Bundle bundle) {
String bsn = bundle.getHeaders().get(Constants.BUNDLE_SYMBOLICNAME);
String bsn = (String) bundle.getHeaders().get(Constants.BUNDLE_SYMBOLICNAME);
int semiColonIndex = bsn.indexOf(';');
if (semiColonIndex > -1) {
bsn = bsn.substring(0, semiColonIndex);
Expand All @@ -157,7 +157,7 @@ private String getBsn(final Bundle bundle) {
private void prepareEnvService(final BundleContext context) {
String[] parameters = null;
try {
ServiceReference<?>[] serviceReferences = context.getServiceReferences("aQute.launcher.Launcher",
ServiceReference[] serviceReferences = context.getServiceReferences("aQute.launcher.Launcher",
"(launcher.arguments=*)");
if ( (serviceReferences != null) && (serviceReferences.length > 0)) {
Object property = serviceReferences[0].getProperty("launcher.arguments");
Expand Down
7 changes: 7 additions & 0 deletions bndtools.runtime.applaunch.eclipse4.test/.classpath
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="bin" path="src"/>
<classpathentry kind="con" path="aQute.bnd.classpath.container"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry kind="output" path="bin"/>
</classpath>
2 changes: 2 additions & 0 deletions bndtools.runtime.applaunch.eclipse4.test/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/bin/
/generated/
23 changes: 23 additions & 0 deletions bndtools.runtime.applaunch.eclipse4.test/.project
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>bndtools.runtime.applaunch.eclipse4.test</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>bndtools.core.bndbuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>bndtools.core.bndnature</nature>
</natures>
</projectDescription>
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.8
9 changes: 9 additions & 0 deletions bndtools.runtime.applaunch.eclipse4.test/bnd.bnd
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Private-Package: \
bndtools.runtime.applaunch.eclipse4.test
Test-Cases: \
${classes;CONCRETE;EXTENDS;junit.framework.TestCase}

-buildpath: \
org.eclipse.osgi;version='[3.10,4)',\
org.eclipse.equinox.app;version='[1.3,2)',\
${junit}
Loading
Loading