[ 
https://issues.apache.org/jira/browse/SLING-12173?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17792762#comment-17792762
 ] 

Robert Munteanu commented on SLING-12173:
-----------------------------------------

Good point [~cziegeler]. I have made the following change to the POM

{noformat}
diff --git a/pom.xml b/pom.xml
index 1172d97..d308a5b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -190,14 +190,13 @@
         <dependency>
             <groupId>jakarta.json</groupId>
             <artifactId>jakarta.json-api</artifactId>
-            <version>2.0.2</version>
+            <version>2.1.3</version>
             <scope>compile</scope>
         </dependency>
         <dependency>
-            <groupId>org.apache.johnzon</groupId>
-            <artifactId>johnzon-core</artifactId>
-            <classifier>jakarta</classifier>
-            <version>1.2.21</version>
+            <groupId>org.eclipse.parsson</groupId>
+            <artifactId>parsson</artifactId>
+            <version>1.1.5</version>
             <scope>compile</scope>
         </dependency>
         <dependency>
{noformat}

and it seems to work fine in Eclipse now. It did not work with jakata.json-api 
2.0.2 and parssson 1.0.3. I will keep working with this change locally for a 
while to make sure the problem does not reappear.

> Configuration errors in Eclipse for projects using the 
> slingfeature-maven-plugin
> --------------------------------------------------------------------------------
>
>                 Key: SLING-12173
>                 URL: https://issues.apache.org/jira/browse/SLING-12173
>             Project: Sling
>          Issue Type: Bug
>          Components: Maven Plugins and Archetypes
>            Reporter: Robert Munteanu
>            Assignee: Robert Munteanu
>            Priority: Major
>             Fix For: OSGi Feature Maven Plugin 1.8.2
>
>
> The slingfeature-maven-plugin currently uses the Jakarta JSON implementation 
> of the Apache Johnzon parser. 
> I have noticed problems in the Eclipse IDE, where projects fail to update 
> with hard to isolate errors (see below).
> {noformat}java.util.ServiceConfigurationError: jakarta.json.spi.JsonProvider: 
> org.apache.johnzon.core.JsonProviderImpl not a subtype
>       at java.base/java.util.ServiceLoader.fail(ServiceLoader.java:593)
>       at 
> java.base/java.util.ServiceLoader$LazyClassPathLookupIterator.hasNextService(ServiceLoader.java:1244)
>       at 
> java.base/java.util.ServiceLoader$LazyClassPathLookupIterator.hasNext(ServiceLoader.java:1273)
>       at java.base/java.util.ServiceLoader$2.hasNext(ServiceLoader.java:1309)
>       at java.base/java.util.ServiceLoader$3.hasNext(ServiceLoader.java:1393)
>       at jakarta.json.spi.JsonProvider.provider(JsonProvider.java:69)
>       at jakarta.json.Json.createReader(Json.java:189)
>       at 
> org.apache.sling.feature.maven.JSONFeatures.read(JSONFeatures.java:64)
>       at 
> org.apache.sling.feature.maven.ProjectHelper.readFeatureFile(ProjectHelper.java:622)
>       at 
> org.apache.sling.feature.maven.Preprocessor.readProjectFeatures(Preprocessor.java:304)
>       at 
> org.apache.sling.feature.maven.Preprocessor.process(Preprocessor.java:145)
>       at 
> org.apache.sling.feature.maven.Preprocessor.process(Preprocessor.java:110)
>       at 
> org.apache.sling.feature.maven.extensions.DependencyLifecycleParticipant.afterProjectsRead(DependencyLifecycleParticipant.java:87)
>       at 
> org.eclipse.m2e.core.internal.project.registry.ProjectRegistryManager.executeParticipants(ProjectRegistryManager.java:824)
>       at 
> org.eclipse.m2e.core.internal.project.registry.ProjectRegistryManager.lambda$15(ProjectRegistryManager.java:791)
>       at 
> org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:394)
>       at 
> org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:275)
>       at 
> org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:214)
>       at 
> org.eclipse.m2e.core.internal.project.registry.ProjectRegistryManager.lambda$14(ProjectRegistryManager.java:790)
>       at java.base/java.util.HashMap$Values.forEach(HashMap.java:1065)
>       at 
> org.eclipse.m2e.core.internal.project.registry.ProjectRegistryManager.lambda$11(ProjectRegistryManager.java:788)
>       at 
> org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:394)
>       at 
> org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:275)
>       at 
> org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:214)
>       at 
> org.eclipse.m2e.core.internal.project.registry.ProjectRegistryManager.readMavenProjectFacades(ProjectRegistryManager.java:760)
>       at 
> org.eclipse.m2e.core.internal.project.registry.ProjectRegistryManager.refresh(ProjectRegistryManager.java:392)
>       at 
> org.eclipse.m2e.core.internal.project.registry.ProjectRegistryManager.refresh(ProjectRegistryManager.java:366)
>       at 
> org.eclipse.m2e.core.internal.project.registry.ProjectRegistryManager.refresh(ProjectRegistryManager.java:318)
>       at 
> org.eclipse.m2e.core.internal.builder.MavenBuilder$BuildMethod.getProjectFacade(MavenBuilder.java:146)
>       at 
> org.eclipse.m2e.core.internal.builder.MavenBuilder$BuildMethod.lambda$0(MavenBuilder.java:84)
>       at 
> org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:394)
>       at 
> org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:275)
>       at 
> org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:214)
>       at 
> org.eclipse.m2e.core.internal.builder.MavenBuilder$BuildMethod.execute(MavenBuilder.java:83)
>       at 
> org.eclipse.m2e.core.internal.builder.MavenBuilder.build(MavenBuilder.java:192)
>       at 
> org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:1079)
>       at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
>       at 
> org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:296)
>       at 
> org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:352)
>       at 
> org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:441)
>       at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
>       at 
> org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:444)
>       at 
> org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:555)
>       at 
> org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:503)
>       at 
> org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:585)
>       at 
> org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:207)
>       at 
> org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:300)
>       at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63){noformat}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to