This is an automated email from the ASF dual-hosted git repository.
kwin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-ide-tooling.git
The following commit(s) were added to refs/heads/master by this push:
new 4b58d513 SLING-12108 Do no longer manually start bundles
4b58d513 is described below
commit 4b58d513142ec29fe85e164660a8eb3045f8dd61
Author: Konrad Windszus <[email protected]>
AuthorDate: Wed Apr 30 16:02:16 2025 +0200
SLING-12108 Do no longer manually start bundles
Instead rely on Equinox's lazy-loading to prevent JDT bundles from being
loaded too early (i.e. when no workspace is selected yet).
---
.../apache/sling/ide/eclipse/core/internal/Activator.java | 12 ++----------
shared/parent/pom.xml | 14 ++++++++++++++
2 files changed, 16 insertions(+), 10 deletions(-)
diff --git
a/eclipse/eclipse-core/src/org/apache/sling/ide/eclipse/core/internal/Activator.java
b/eclipse/eclipse-core/src/org/apache/sling/ide/eclipse/core/internal/Activator.java
index 11f8ad97..13e51860 100644
---
a/eclipse/eclipse-core/src/org/apache/sling/ide/eclipse/core/internal/Activator.java
+++
b/eclipse/eclipse-core/src/org/apache/sling/ide/eclipse/core/internal/Activator.java
@@ -66,16 +66,8 @@ public class Activator extends Plugin {
public static final String BSN_ARTIFACTS =
"org.apache.sling.ide.artifacts";
public void start(BundleContext context) throws Exception {
- super.start(context);
- plugin = this;
-
- // the following bundles need to be explicitly started as no
class is directly referenced
- // and everything works via declarative services
- // compare with
https://github.com/eclipse-m2e/m2e-core/issues/945
- getFirstBundle(context, BSN_API).start();
- getFirstBundle(context, BSN_VAULT_IMPL).start();
- getFirstBundle(context, BSN_ARTIFACTS).start();
-
+ super.start(context);
+ plugin = this;
repositoryFactory = new ExtendedServiceTracker<>(context,
RepositoryFactory.class);
serializationManager = new ExtendedServiceTracker<>(context,
SerializationManager.class);
filterLocator = new ExtendedServiceTracker<>(context,
FilterLocator.class);
diff --git a/shared/parent/pom.xml b/shared/parent/pom.xml
index b395f03e..7e4c9bbc 100644
--- a/shared/parent/pom.xml
+++ b/shared/parent/pom.xml
@@ -37,6 +37,20 @@
<build>
<pluginManagement>
<plugins>
+ <plugin>
+ <groupId>biz.aQute.bnd</groupId>
+ <artifactId>bnd-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>bnd-process</id>
+ <configuration>
+ <!-- due to the non-Maven standard merging
this is effectively added to the config set in sling-bundle-parent -->
+ <!-- make sure to automatically start this
bundle in Equinox whenever some classes are referenced -->
+ <bnd>Bundle-ActivationPolicy: lazy</bnd>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
<plugin>
<groupId>biz.aQute.bnd</groupId>
<artifactId>bnd-baseline-maven-plugin</artifactId>