diff --git a/bundles/org.eclipse.passage.lbc.jetty/META-INF/MANIFEST.MF b/bundles/org.eclipse.passage.lbc.jetty/META-INF/MANIFEST.MF index 683caac25..6b42b6953 100644 --- a/bundles/org.eclipse.passage.lbc.jetty/META-INF/MANIFEST.MF +++ b/bundles/org.eclipse.passage.lbc.jetty/META-INF/MANIFEST.MF @@ -7,11 +7,12 @@ Bundle-Name: %Bundle-Name Bundle-Vendor: %Bundle-Vendor Bundle-Copyright: %Bundle-Copyright Bundle-RequiredExecutionEnvironment: JavaSE-11 -Require-Bundle: org.eclipse.passage.lic.net;bundle-version="0.0.0", - org.eclipse.passage.lic.jetty;bundle-version="0.0.0", - org.eclipse.core.runtime;bundle-version="0.0.0", +Require-Bundle: org.eclipse.core.runtime;bundle-version="0.0.0", + org.eclipse.passage.lbc.base;bundle-version="0.0.0", org.eclipse.passage.lic.equinox;bundle-version="0.0.0", - org.eclipse.passage.lbc.base;bundle-version="0.0.0" + org.eclipse.passage.lic.execute;bundle-version="0.0.0", + org.eclipse.passage.lic.jetty;bundle-version="0.0.0", + org.eclipse.passage.lic.net;bundle-version="0.0.0" Bundle-ActivationPolicy: lazy Bundle-Activator: org.eclipse.passage.lbc.internal.jetty.FlsJettyActivator Export-Package: org.eclipse.passage.lbc.jetty diff --git a/bundles/org.eclipse.passage.lbc.jetty/src/org/eclipse/passage/lbc/internal/jetty/FlsJettyActivator.java b/bundles/org.eclipse.passage.lbc.jetty/src/org/eclipse/passage/lbc/internal/jetty/FlsJettyActivator.java index 52dc09a15..e5c5c1c1b 100644 --- a/bundles/org.eclipse.passage.lbc.jetty/src/org/eclipse/passage/lbc/internal/jetty/FlsJettyActivator.java +++ b/bundles/org.eclipse.passage.lbc.jetty/src/org/eclipse/passage/lbc/internal/jetty/FlsJettyActivator.java @@ -19,6 +19,7 @@ import org.eclipse.passage.lbc.internal.base.api.FloatingStateFromGear; import org.eclipse.passage.lbc.jetty.FlsCommandScope; import org.eclipse.passage.lic.equinox.io.FileFromBundle; +import org.eclipse.passage.lic.internal.execute.Logging; import org.eclipse.passage.lic.internal.jetty.JettyHandler; import org.eclipse.passage.lic.internal.jetty.interaction.LicensedJettyActivator; import org.eclipse.passage.lic.internal.net.connect.Storage; @@ -47,7 +48,11 @@ protected JettyHandler handler() { } @Override - protected InputStream logConfig() throws Exception { + protected void configureLogging() { + new Logging(this::logConfig).configure(); + } + + private InputStream logConfig() throws Exception { Bundle bundle = FrameworkUtil.getBundle(getClass()); return new FileFromBundle(bundle, "config/log4j2.xml").get(); //$NON-NLS-1$ } diff --git a/bundles/org.eclipse.passage.lic.base/META-INF/MANIFEST.MF b/bundles/org.eclipse.passage.lic.base/META-INF/MANIFEST.MF index 99418f27f..a8162d4f5 100644 --- a/bundles/org.eclipse.passage.lic.base/META-INF/MANIFEST.MF +++ b/bundles/org.eclipse.passage.lic.base/META-INF/MANIFEST.MF @@ -27,9 +27,7 @@ Export-Package: org.eclipse.passage.lic.base, org.eclipse.passage.lic.internal.base.access;x-internal:=true, org.eclipse.passage.lic.internal.base.conditions;x-internal:=true, org.eclipse.passage.lic.internal.base.inspection.hardware;x-friends:="org.eclipse.passage.loc.licenses.core,org.eclipse.passage.lic.oshi", - org.eclipse.passage.lic.internal.base.logging;x-friends:="org.eclipse.passage.lic.jetty", org.eclipse.passage.lic.internal.base.observatory;x-internal:=true, org.eclipse.passage.lic.internal.base.requirements;x-internal:=true, org.eclipse.passage.lic.internal.base.time;x-friends:="org.eclipse.passage.lic.base.tests" -Import-Package: org.apache.logging.log4j;version="2.17.1", - org.apache.logging.log4j.core.config;version="2.17.1" +Import-Package: org.apache.logging.log4j;version="2.17.1" diff --git a/bundles/org.eclipse.passage.lic.execute/META-INF/MANIFEST.MF b/bundles/org.eclipse.passage.lic.execute/META-INF/MANIFEST.MF index 5fd8f6644..eccc7a841 100644 --- a/bundles/org.eclipse.passage.lic.execute/META-INF/MANIFEST.MF +++ b/bundles/org.eclipse.passage.lic.execute/META-INF/MANIFEST.MF @@ -16,5 +16,7 @@ Require-Bundle: org.eclipse.passage.lic.api;bundle-version="0.0.0", org.eclipse.passage.lic.licenses;bundle-version="0.0.0", org.eclipse.passage.lic.licenses.model;bundle-version="0.0.0", org.eclipse.passage.lic.oshi;bundle-version="0.0.0" -Export-Package: org.eclipse.passage.lic.execute -Import-Package: org.apache.logging.log4j +Export-Package: org.eclipse.passage.lic.execute, + org.eclipse.passage.lic.internal.execute;x-internal:=true +Import-Package: org.apache.logging.log4j;version="2.17.1", + org.apache.logging.log4j.core.config;version="2.17.1" diff --git a/bundles/org.eclipse.passage.lic.execute/src/org/eclipse/passage/lic/execute/DefaultFramework.java b/bundles/org.eclipse.passage.lic.execute/src/org/eclipse/passage/lic/execute/DefaultFramework.java index 03368b44e..6ed5c8e21 100644 --- a/bundles/org.eclipse.passage.lic.execute/src/org/eclipse/passage/lic/execute/DefaultFramework.java +++ b/bundles/org.eclipse.passage.lic.execute/src/org/eclipse/passage/lic/execute/DefaultFramework.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2020, 2021 ArSysOp + * Copyright (c) 2020, 2022 ArSysOp * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License 2.0 which is available at @@ -8,7 +8,7 @@ * SPDX-License-Identifier: EPL-2.0 * * Contributors: - * ArSysOp - initial API and implementation + * ArSysOp - initial API and implementation, further support *******************************************************************************/ package org.eclipse.passage.lic.execute; @@ -24,11 +24,10 @@ import org.eclipse.passage.lic.base.InvalidLicensedProduct; import org.eclipse.passage.lic.equinox.LicensedApplication; import org.eclipse.passage.lic.equinox.io.FileFromBundle; -import org.eclipse.passage.lic.internal.base.logging.Logging; +import org.eclipse.passage.lic.internal.execute.Logging; import org.osgi.framework.Bundle; import org.osgi.framework.FrameworkUtil; -@SuppressWarnings("restriction") public final class DefaultFramework extends BaseFramework { private final Logger log; @@ -65,7 +64,7 @@ private InputStream logConfig() throws Exception { return new FileFromBundle(// FrameworkUtil.getBundle(getClass()), // "config/log4j2.xml")//$NON-NLS-1$ - .get(); + .get(); } private void logConfiguration() { diff --git a/bundles/org.eclipse.passage.lic.base/src/org/eclipse/passage/lic/internal/base/logging/Logging.java b/bundles/org.eclipse.passage.lic.execute/src/org/eclipse/passage/lic/internal/execute/Logging.java similarity index 89% rename from bundles/org.eclipse.passage.lic.base/src/org/eclipse/passage/lic/internal/base/logging/Logging.java rename to bundles/org.eclipse.passage.lic.execute/src/org/eclipse/passage/lic/internal/execute/Logging.java index c73492f7e..c8f99589c 100644 --- a/bundles/org.eclipse.passage.lic.base/src/org/eclipse/passage/lic/internal/base/logging/Logging.java +++ b/bundles/org.eclipse.passage.lic.execute/src/org/eclipse/passage/lic/internal/execute/Logging.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2021 ArSysOp + * Copyright (c) 2021, 2022 ArSysOp * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License 2.0 which is available at @@ -8,9 +8,9 @@ * SPDX-License-Identifier: EPL-2.0 * * Contributors: - * ArSysOp - initial API and implementation + * ArSysOp - initial API and implementation, further support *******************************************************************************/ -package org.eclipse.passage.lic.internal.base.logging; +package org.eclipse.passage.lic.internal.execute; import java.io.InputStream; diff --git a/bundles/org.eclipse.passage.lic.jetty/src/org/eclipse/passage/lic/internal/jetty/interaction/LicensedJettyActivator.java b/bundles/org.eclipse.passage.lic.jetty/src/org/eclipse/passage/lic/internal/jetty/interaction/LicensedJettyActivator.java index b990fa2fd..5e0565aa5 100644 --- a/bundles/org.eclipse.passage.lic.jetty/src/org/eclipse/passage/lic/internal/jetty/interaction/LicensedJettyActivator.java +++ b/bundles/org.eclipse.passage.lic.jetty/src/org/eclipse/passage/lic/internal/jetty/interaction/LicensedJettyActivator.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2020, 2021 ArSysOp + * Copyright (c) 2020, 2022 ArSysOp * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License 2.0 which is available at @@ -8,13 +8,10 @@ * SPDX-License-Identifier: EPL-2.0 * * Contributors: - * ArSysOp - initial API and implementation + * ArSysOp - initial API and implementation, further support *******************************************************************************/ package org.eclipse.passage.lic.internal.jetty.interaction; -import java.io.InputStream; - -import org.eclipse.passage.lic.internal.base.logging.Logging; import org.eclipse.passage.lic.internal.jetty.JettyHandler; import org.eclipse.passage.lic.internal.jetty.JettyServer; import org.osgi.framework.BundleActivator; @@ -41,9 +38,7 @@ public final void stop(BundleContext context) throws Exception { server.stop(); } - private void configureLogging() { - new Logging(this::logConfig).configure(); - } + protected abstract void configureLogging(); private void registerCommands(BundleContext context) { Commands commands = new Commands(); @@ -56,8 +51,6 @@ private void registerCommands(BundleContext context) { protected abstract JettyHandler handler(); - protected abstract InputStream logConfig() throws Exception; - protected abstract void registerCustomCommands(BundleContext context); } diff --git a/bundles/org.eclipse.passage.loc.operator.seal/src/org/eclipse/passage/loc/operator/seal/OperatorFramework.java b/bundles/org.eclipse.passage.loc.operator.seal/src/org/eclipse/passage/loc/operator/seal/OperatorFramework.java index 46b47d349..96f6eac87 100644 --- a/bundles/org.eclipse.passage.loc.operator.seal/src/org/eclipse/passage/loc/operator/seal/OperatorFramework.java +++ b/bundles/org.eclipse.passage.loc.operator.seal/src/org/eclipse/passage/loc/operator/seal/OperatorFramework.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2021 ArSysOp + * Copyright (c) 2021, 2022 ArSysOp * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License 2.0 which is available at @@ -8,7 +8,7 @@ * SPDX-License-Identifier: EPL-2.0 * * Contributors: - * ArSysOp - initial API and implementation + * ArSysOp - initial API and implementation, further support *******************************************************************************/ package org.eclipse.passage.loc.operator.seal; @@ -25,7 +25,7 @@ import org.eclipse.passage.lic.equinox.LicensedApplication; import org.eclipse.passage.lic.equinox.io.FileFromBundle; import org.eclipse.passage.lic.execute.FocusedAccessCycleConfiguration; -import org.eclipse.passage.lic.internal.base.logging.Logging; +import org.eclipse.passage.lic.internal.execute.Logging; import org.osgi.framework.Bundle; import org.osgi.framework.FrameworkUtil;