Skip to content

Commit

Permalink
[SDK-Product] Add slf4j-simple and auto-start it and Aries spifly
Browse files Browse the repository at this point in the history
Add the slf4j-simple bundle instead of slf4j-nop, but disable all
logging by default. This allows users to configure logging at their
discretion in the eclipse.ini:
https://www.slf4j.org/api/org/slf4j/simple/SimpleLogger.html

Additionally auto-start Aries SPI-Fly bundle and slf4j-simple in SDK to
allow the slf4j-api bundle to find the simple provider and thus
prevents error messages about missing bindings.

Fixes #1094
Fixes #1226
  • Loading branch information
HannesWell committed Aug 11, 2023
1 parent 1ef09d0 commit b9cb479
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@
<!-- slf4j-api requires 1 impl, providing a dummy one... -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-nop</artifactId>
<artifactId>slf4j-simple</artifactId>
<version>2.0.7</version>
<type>jar</type>
</dependency>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<?pde version="3.5"?>

<product name="Eclipse Platform" uid="org.eclipse.platform.ide" id="org.eclipse.platform.ide" application="org.eclipse.ui.ide.workbench" version="4.29.0.qualifier" useFeatures="true" includeLaunchers="true" autoIncludeRequirements="true">
<product name="Eclipse Platform" uid="org.eclipse.platform.ide" id="org.eclipse.platform.ide" application="org.eclipse.ui.ide.workbench" version="4.29.0.qualifier" type="features" includeLaunchers="true" autoIncludeRequirements="true">

<configIni use="default">
</configIni>

<launcherArgs>
<programArgs>--launcher.defaultAction openFile --launcher.appendVmargs
</programArgs>
<vmArgs>-Dosgi.requiredJavaVersion=17 -Dosgi.dataAreaRequiresExplicitInit=true -Dorg.eclipse.swt.graphics.Resource.reportNonDisposed=true -Xms40m -Xmx512m --add-modules=ALL-SYSTEM
<vmArgs>-Dosgi.requiredJavaVersion=17 -Dosgi.dataAreaRequiresExplicitInit=true -Dorg.eclipse.swt.graphics.Resource.reportNonDisposed=true -Xms40m -Xmx512m --add-modules=ALL-SYSTEM -Dorg.slf4j.simpleLogger.defaultLogLevel=off
</vmArgs>
<vmArgsMac>-Xdock:icon=../Resources/Eclipse.icns -XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts
</vmArgsMac>
Expand Down Expand Up @@ -183,12 +183,14 @@ United States, other countries, or both.
</features>

<configurations>
<plugin id="org.apache.aries.spifly.dynamic.bundle" autoStart="true" startLevel="1" />
<plugin id="org.apache.felix.scr" autoStart="true" startLevel="2" />
<plugin id="org.eclipse.core.runtime" autoStart="true" startLevel="4" />
<plugin id="org.eclipse.equinox.common" autoStart="true" startLevel="2" />
<plugin id="org.eclipse.equinox.event" autoStart="true" startLevel="2" />
<plugin id="org.eclipse.equinox.p2.reconciler.dropins" autoStart="true" startLevel="4" />
<plugin id="org.eclipse.equinox.simpleconfigurator" autoStart="true" startLevel="1" />
<plugin id="slf4j.simple" autoStart="true" startLevel="1" />
<property name="org.eclipse.update.reconcile" value="false" />
<property name="eclipse.buildId" value="${unqualifiedVersion}.${buildQualifier}" />
<property name="osgi.bundles.defaultStartLevel" value="4" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<?pde version="3.5"?>

<product name="Eclipse Platform SDK" uid="org.eclipse.platform.sdk" id="org.eclipse.platform.sdk" application="org.eclipse.ui.ide.workbench" version="4.29.0.qualifier" useFeatures="true" includeLaunchers="true" autoIncludeRequirements="true">
<product name="Eclipse Platform SDK" uid="org.eclipse.platform.sdk" id="org.eclipse.platform.sdk" application="org.eclipse.ui.ide.workbench" version="4.29.0.qualifier" type="features" includeLaunchers="true" autoIncludeRequirements="true">

<configIni use="default">
</configIni>

<launcherArgs>
<programArgs>--launcher.defaultAction openFile --launcher.appendVmargs
</programArgs>
<vmArgs>-Dosgi.requiredJavaVersion=17 -Xms40m -Xmx384m --add-modules=ALL-SYSTEM
<vmArgs>-Dosgi.requiredJavaVersion=17 -Xms40m -Xmx384m --add-modules=ALL-SYSTEM -Dorg.slf4j.simpleLogger.defaultLogLevel=off
</vmArgs>
<vmArgsMac>-Xdock:icon=../Resources/Eclipse.icns -XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts
</vmArgsMac>
Expand Down Expand Up @@ -185,12 +185,14 @@ United States, other countries, or both.
</features>

<configurations>
<plugin id="org.apache.aries.spifly.dynamic.bundle" autoStart="true" startLevel="1" />
<plugin id="org.apache.felix.scr" autoStart="true" startLevel="2" />
<plugin id="org.eclipse.core.runtime" autoStart="true" startLevel="4" />
<plugin id="org.eclipse.equinox.common" autoStart="true" startLevel="2" />
<plugin id="org.eclipse.equinox.event" autoStart="true" startLevel="2" />
<plugin id="org.eclipse.equinox.p2.reconciler.dropins" autoStart="true" startLevel="4" />
<plugin id="org.eclipse.equinox.simpleconfigurator" autoStart="true" startLevel="1" />
<plugin id="slf4j.simple" autoStart="true" startLevel="1" />
</configurations>

</product>
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<?pde version="3.5"?>

<product name="Eclipse SDK" uid="org.eclipse.sdk.ide" id="org.eclipse.sdk.ide" application="org.eclipse.ui.ide.workbench" version="4.29.0.qualifier" useFeatures="true" includeLaunchers="true" autoIncludeRequirements="true">
<product name="Eclipse SDK" uid="org.eclipse.sdk.ide" id="org.eclipse.sdk.ide" application="org.eclipse.ui.ide.workbench" version="4.29.0.qualifier" type="features" includeLaunchers="true" autoIncludeRequirements="true">

<configIni use="default">
</configIni>

<launcherArgs>
<programArgs>--launcher.defaultAction openFile --launcher.appendVmargs
</programArgs>
<vmArgs>-Dosgi.requiredJavaVersion=17 -Dosgi.dataAreaRequiresExplicitInit=true -Dorg.eclipse.swt.graphics.Resource.reportNonDisposed=true -Xms256m -Xmx2048m --add-modules=ALL-SYSTEM
<vmArgs>-Dosgi.requiredJavaVersion=17 -Dosgi.dataAreaRequiresExplicitInit=true -Dorg.eclipse.swt.graphics.Resource.reportNonDisposed=true -Xms256m -Xmx2048m --add-modules=ALL-SYSTEM -Dorg.slf4j.simpleLogger.defaultLogLevel=off
</vmArgs>
<vmArgsMac>-Xdock:icon=../Resources/Eclipse.icns -XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts
</vmArgsMac>
Expand Down Expand Up @@ -188,12 +188,14 @@ United States, other countries, or both.
</features>

<configurations>
<plugin id="org.apache.aries.spifly.dynamic.bundle" autoStart="true" startLevel="1" />
<plugin id="org.apache.felix.scr" autoStart="true" startLevel="2" />
<plugin id="org.eclipse.core.runtime" autoStart="true" startLevel="4" />
<plugin id="org.eclipse.equinox.common" autoStart="true" startLevel="2" />
<plugin id="org.eclipse.equinox.event" autoStart="true" startLevel="2" />
<plugin id="org.eclipse.equinox.p2.reconciler.dropins" autoStart="true" startLevel="4" />
<plugin id="org.eclipse.equinox.simpleconfigurator" autoStart="true" startLevel="1" />
<plugin id="slf4j.simple" autoStart="true" startLevel="1" />
<property name="osgi.bundles.defaultStartLevel" value="4" />
<property name="eclipse.buildId" value="${unqualifiedVersion}.${buildQualifier}" />
<property name="org.eclipse.update.reconcile" value="false" />
Expand Down

0 comments on commit b9cb479

Please sign in to comment.