diff --git a/all/.gitignore b/all/.gitignore new file mode 100644 index 0000000..b83d222 --- /dev/null +++ b/all/.gitignore @@ -0,0 +1 @@ +/target/ diff --git a/all/bnd.bnd b/all/bnd.bnd new file mode 100644 index 0000000..e4ddfe6 --- /dev/null +++ b/all/bnd.bnd @@ -0,0 +1,27 @@ +#-conditionalpackage: org.eclipse.osgi.technology.command.* + +Bundle-Activator: org.eclipse.osgi.technology.command.all.Activator + +-includeresource: \ + converter.bundle-0.0.1-SNAPSHOT.jar;lib:=true,\ + converter.file-0.0.1-SNAPSHOT.jar;lib:=true,\ + diagnostics-0.0.1-SNAPSHOT.jar;lib:=true,\ + fs.navigate-0.0.1-SNAPSHOT.jar;lib:=true,\ + help-0.0.1-SNAPSHOT.jar;lib:=true,\ + mxbeans-0.0.1-SNAPSHOT.jar;lib:=true,\ + osgi.framework-0.0.1-SNAPSHOT.jar;lib:=true,\ + osgi.framework.modify-0.0.1-SNAPSHOT.jar;lib:=true,\ + osgi.service.jakartars-0.0.1-SNAPSHOT.jar;lib:=true,\ + osgi.service.scr-0.0.1-SNAPSHOT.jar;lib:=true,\ + osgi.service.servlet-0.0.1-SNAPSHOT.jar;lib:=true,\ + system.runtime-0.0.1-SNAPSHOT.jar;lib:=true + + +Import-Package: \ + org.osgi.service.jakartars.runtime;'resolution:'=optional,\ + org.osgi.service.jakartars.runtime.dto;'resolution:'=optional,\ + org.osgi.service.component.runtime;'resolution:'=optional,\ + org.osgi.service.component.runtime.dto;'resolution:'=optional,\ + org.osgi.service.servlet.runtime;'resolution:'=optional,\ + org.osgi.service.servlet.runtime.dto;'resolution:'=optional,\ + * diff --git a/all/pom.xml b/all/pom.xml new file mode 100644 index 0000000..11ccf69 --- /dev/null +++ b/all/pom.xml @@ -0,0 +1,197 @@ + + + + 4.0.0 + + org.eclipse.osgi-technology.command + command + 0.0.1-SNAPSHOT + + all + + + + + bnd-snapshots + https://bndtools.jfrog.io/bndtools/libs-snapshot/ + default + + false + + + + + + + org.eclipse.osgi-technology.command + converter.bundle + ${project.version} + provided + + + + + org.eclipse.osgi-technology.command + converter.file + ${project.version} + provided + + + + + org.eclipse.osgi-technology.command + diagnostics + ${project.version} + provided + + + + + org.eclipse.osgi-technology.command + fs.navigate + ${project.version} + provided + + + + + org.eclipse.osgi-technology.command + help + ${project.version} + provided + + + + + org.eclipse.osgi-technology.command + mxbeans + ${project.version} + provided + + + + + org.eclipse.osgi-technology.command + osgi.framework + ${project.version} + provided + + + + + org.eclipse.osgi-technology.command + osgi.framework.modify + ${project.version} + provided + + + + + org.eclipse.osgi-technology.command + osgi.service.jakartars + ${project.version} + provided + + + + org.eclipse.osgi-technology.command + osgi.service.scr + ${project.version} + provided + + + + + org.eclipse.osgi-technology.command + osgi.service.servlet + ${project.version} + provided + + + + org.eclipse.osgi-technology.command + system.runtime + ${project.version} + provided + + + + org.eclipse.osgi-technology.command + util + ${project.version} + provided + + + + + org.osgi + org.osgi.util.tracker + + + + org.apache.felix + org.apache.felix.gogo.runtime + provided + + + org.osgi + org.osgi.resource + + + org.osgi + org.osgi.dto + 1.1.1 + + + org.osgi + org.osgi.framework + + + + org.osgi + org.osgi.annotation.bundle + + + + org.osgi + org.osgi.annotation.versioning + 1.1.2 + + + org.eclipse.osgi-technology.console + plain + 0.0.1-SNAPSHOT + test + + + org.junit.jupiter + junit-jupiter + 5.12.1 + test + + + + + + + + biz.aQute.bnd + bnd-maven-plugin + 7.2.0-SNAPSHOT + + + + + \ No newline at end of file diff --git a/all/src/main/java/org/eclipse/osgi/technology/command/all/Activator.java b/all/src/main/java/org/eclipse/osgi/technology/command/all/Activator.java new file mode 100644 index 0000000..8af1112 --- /dev/null +++ b/all/src/main/java/org/eclipse/osgi/technology/command/all/Activator.java @@ -0,0 +1,68 @@ +/** + * Copyright (c) 2025 Contributors to the Eclipse Foundation + * All rights reserved. + * + * This program and the accompanying materials are made + * available under the terms of the Eclipse Public License 2.0 + * which is available at https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Stefan Bischof - initial + */ +package org.eclipse.osgi.technology.command.all; + +import java.util.List; + +import org.osgi.annotation.bundle.Header; +import org.osgi.framework.BundleActivator; +import org.osgi.framework.BundleContext; +import org.osgi.framework.Constants; + +@Header(name = Constants.BUNDLE_ACTIVATOR, value = "${@class}") +@org.osgi.annotation.bundle.Capability(namespace = "org.apache.felix.gogo", name = "command.implementation", version = "1.0.0") +@org.osgi.annotation.bundle.Requirement(effective = "active", namespace = "org.apache.felix.gogo", name = "runtime.implementation", version = "1.0.0") +public class Activator implements BundleActivator { + + private List activators = List.of( + new org.eclipse.osgi.technology.command.converter.bundle.Activator(), + new org.eclipse.osgi.technology.command.converter.file.Activator(), + new org.eclipse.osgi.technology.command.diagnostics.Activator(), + new org.eclipse.osgi.technology.command.fs.navigate.Activator(), + new org.eclipse.osgi.technology.command.help.Activator(), + new org.eclipse.osgi.technology.command.mxbean.Activator(), + new org.eclipse.osgi.technology.command.osgi.framework.Activator(), + new org.eclipse.osgi.technology.command.osgi.framework.modify.Activator(), + new org.eclipse.osgi.technology.command.osgi.service.jakartars.Activator(), + new org.eclipse.osgi.technology.command.osgi.service.scr.Activator(), + new org.eclipse.osgi.technology.command.osgi.service.servlet.Activator(), + new org.eclipse.osgi.technology.command.system.runtime.Activator()); + + @Override + public void start(BundleContext context) throws Exception { + + activators.forEach(a -> { + + try { + a.start(context); + } catch (Exception e) { + e.printStackTrace(); + } + + }); + } + + @Override + public void stop(BundleContext context) throws Exception { + activators.forEach(a -> { + + try { + a.stop(context); + } catch (Exception e) { + e.printStackTrace(); + } + + }); + } +} diff --git a/osgi.framework.modify/play.bndrun b/osgi.framework.modify/play.bndrun index 4b5007a..4303eff 100644 --- a/osgi.framework.modify/play.bndrun +++ b/osgi.framework.modify/play.bndrun @@ -15,5 +15,6 @@ org.eclipse.osgi-technology.console.plain;version='[0.0.1,0.0.2)',\ junit-platform-engine;version='[1.11.1,1.11.2)',\ org.eclipse.osgi-technology.command.osgi.framework.modify;version='[0.0.1,0.0.2)',\ - org.eclipse.osgi-technology.command.osgi.framework.modify-tests;version='[0.0.1,0.0.2)' + org.eclipse.osgi-technology.command.osgi.framework.modify-tests;version='[0.0.1,0.0.2)',\ + org.eclipse.osgi-technology.command.osgi.framework;version='[0.0.1,0.0.2)' -runee: JavaSE-17 \ No newline at end of file diff --git a/osgi.framework.modify/src/main/java/org/eclipse/osgi/technology/command/osgi/framework/Activator.java b/osgi.framework.modify/src/main/java/org/eclipse/osgi/technology/command/osgi/framework/modify/Activator.java similarity index 95% rename from osgi.framework.modify/src/main/java/org/eclipse/osgi/technology/command/osgi/framework/Activator.java rename to osgi.framework.modify/src/main/java/org/eclipse/osgi/technology/command/osgi/framework/modify/Activator.java index c8b90ff..ceceac5 100644 --- a/osgi.framework.modify/src/main/java/org/eclipse/osgi/technology/command/osgi/framework/Activator.java +++ b/osgi.framework.modify/src/main/java/org/eclipse/osgi/technology/command/osgi/framework/modify/Activator.java @@ -11,7 +11,7 @@ * Contributors: * Stefan Bischof - initial */ -package org.eclipse.osgi.technology.command.osgi.framework; +package org.eclipse.osgi.technology.command.osgi.framework.modify; import java.util.Map; diff --git a/osgi.framework.modify/src/main/java/org/eclipse/osgi/technology/command/osgi/framework/FrameworkModifyCommands.java b/osgi.framework.modify/src/main/java/org/eclipse/osgi/technology/command/osgi/framework/modify/FrameworkModifyCommands.java similarity index 99% rename from osgi.framework.modify/src/main/java/org/eclipse/osgi/technology/command/osgi/framework/FrameworkModifyCommands.java rename to osgi.framework.modify/src/main/java/org/eclipse/osgi/technology/command/osgi/framework/modify/FrameworkModifyCommands.java index f7007ae..0282eb4 100644 --- a/osgi.framework.modify/src/main/java/org/eclipse/osgi/technology/command/osgi/framework/FrameworkModifyCommands.java +++ b/osgi.framework.modify/src/main/java/org/eclipse/osgi/technology/command/osgi/framework/modify/FrameworkModifyCommands.java @@ -11,7 +11,7 @@ * Contributors: * Stefan Bischof - initial */ -package org.eclipse.osgi.technology.command.osgi.framework; +package org.eclipse.osgi.technology.command.osgi.framework.modify; import java.io.File; import java.io.IOException; diff --git a/osgi.framework.modify/src/test/java/org/eclipse/osgi/technology/command/osgi/framework/Test.java b/osgi.framework.modify/src/test/java/org/eclipse/osgi/technology/command/osgi/framework/modify/Test.java similarity index 87% rename from osgi.framework.modify/src/test/java/org/eclipse/osgi/technology/command/osgi/framework/Test.java rename to osgi.framework.modify/src/test/java/org/eclipse/osgi/technology/command/osgi/framework/modify/Test.java index 05fb73a..e7d2ba6 100644 --- a/osgi.framework.modify/src/test/java/org/eclipse/osgi/technology/command/osgi/framework/Test.java +++ b/osgi.framework.modify/src/test/java/org/eclipse/osgi/technology/command/osgi/framework/modify/Test.java @@ -11,7 +11,7 @@ * Contributors: * Stefan Bischof - initial */ -package org.eclipse.osgi.technology.command.osgi.framework; +package org.eclipse.osgi.technology.command.osgi.framework.modify; public class Test { diff --git a/osgi.framework/src/main/java/org/eclipse/osgi/technology/command/osgi/framework/package-info.java b/osgi.framework/src/main/java/org/eclipse/osgi/technology/command/osgi/framework/package-info.java new file mode 100644 index 0000000..893c46b --- /dev/null +++ b/osgi.framework/src/main/java/org/eclipse/osgi/technology/command/osgi/framework/package-info.java @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2025 Contributors to the Eclipse Foundation + * All rights reserved. + * + * This program and the accompanying materials are made + * available under the terms of the Eclipse Public License 2.0 + * which is available at https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Stefan Bischof - initial + */ +@org.osgi.annotation.bundle.Export +package org.eclipse.osgi.technology.command.osgi.framework; \ No newline at end of file diff --git a/osgi.service.scr/play.bndrun b/osgi.service.scr/play.bndrun index 9c0c8ae..95fe2b5 100644 --- a/osgi.service.scr/play.bndrun +++ b/osgi.service.scr/play.bndrun @@ -3,7 +3,8 @@ bnd.identity;id='org.eclipse.osgi-technology.command.${project.artifactId}-tests',\ bnd.identity;id='org.eclipse.osgi-technology.command.${project.artifactId}',\ bnd.identity;id='org.eclipse.osgi-technology.console.plain',\ - bnd.identity;id=junit-platform-engine + bnd.identity;id=junit-platform-engine,\ + bnd.identity;id='org.apache.felix.scr' -runfw: org.apache.felix.framework -runbundles: \ @@ -15,5 +16,9 @@ org.eclipse.osgi-technology.console.plain;version='[0.0.1,0.0.2)',\ junit-platform-engine;version='[1.11.1,1.11.2)',\ org.eclipse.osgi-technology.command.osgi.service.scr;version='[0.0.1,0.0.2)',\ - org.eclipse.osgi-technology.command.osgi.service.scr-tests;version='[0.0.1,0.0.2)' + org.eclipse.osgi-technology.command.osgi.service.scr-tests;version='[0.0.1,0.0.2)',\ + org.apache.felix.scr;version='[2.2.2,2.2.3)',\ + org.osgi.service.component;version='[1.5.1,1.5.2)',\ + org.osgi.util.function;version='[1.0.0,1.0.1)',\ + org.osgi.util.promise;version='[1.0.0,1.0.1)' -runee: JavaSE-17 \ No newline at end of file diff --git a/osgi.service.scr/src/main/java/org/eclipse/osgi/technology/command/osgi/service/scr/Activator.java b/osgi.service.scr/src/main/java/org/eclipse/osgi/technology/command/osgi/service/scr/Activator.java index 07de893..c2bf371 100644 --- a/osgi.service.scr/src/main/java/org/eclipse/osgi/technology/command/osgi/service/scr/Activator.java +++ b/osgi.service.scr/src/main/java/org/eclipse/osgi/technology/command/osgi/service/scr/Activator.java @@ -29,12 +29,12 @@ public class Activator extends AbstractActivator { @Override protected void init() { registerCommandService(new ScrCommands(context, formatter), "tech", Map.of()); - registerConverterService(new HttpWhiteboardConverter(formatter)); + registerConverterService(new ScrConverter(formatter)); } - private static class HttpWhiteboardConverter extends BaseDTOFormatterConverter { + private static class ScrConverter extends BaseDTOFormatterConverter { - public HttpWhiteboardConverter(DTOFormatter formatter) { + public ScrConverter(DTOFormatter formatter) { super(formatter); } } diff --git a/pom.xml b/pom.xml index dc15dae..dbee047 100644 --- a/pom.xml +++ b/pom.xml @@ -30,7 +30,6 @@ util - converter.file converter.bundle diagnostics @@ -45,6 +44,7 @@ mxbeans help system.runtime +