Cloud server is throwing error with felix plugin | Community
Skip to main content
Level 2
December 20, 2024
Solved

Cloud server is throwing error with felix plugin

  • December 20, 2024
  • 2 replies
  • 839 views

I have added below snippet in the build part of my Project core but it is throwing me below error while deploying it to cloud environment:

Code Snippet:

<build>

<plugins>

<plugin>

<groupId>org.apache.felix</groupId>

<artifactId>maven-scr-plugin</artifactId>

<executions>

<execution>

<id>generate-scr-descriptor</id>

<goals>

<goal>scr</goal>

</goals>

</execution>

</executions>

</plugin>

<plugin>

<groupId>org.apache.felix</groupId>

<artifactId>maven-bundle-plugin</artifactId>

<extensions>true</extensions>

<configuration>

<instructions>

<Bundle-SymbolicName>myproject.core-businesslogic</Bundle-SymbolicName>

<Bundle-Name>My Project</Bundle-Name>

<Bundle-Description>AEM Project Classes

&amp; Utilities</Bundle-Description>

<Export-Package>com.myproject.project.*</Export-Package>

</instructions>

</configuration>

</plugin>

<plugin>

<groupId>org.apache.sling</groupId>

<artifactId>maven-sling-plugin</artifactId>

<configuration>

<slingUrl>http://${crx.host}:${crx.port}/apps/project/install</slingUrl>

<usePut>true</usePut>

</configuration>

</plugin>

<plugin>

<groupId>org.apache.maven.plugins</groupId>

<artifactId>maven-javadoc-plugin</artifactId>

<configuration>

<excludePackageNames>

*.impl

</excludePackageNames>

</configuration>

</plugin>

</plugins>

<finalName>${project.artifactId}</finalName>

</build>

 

Cloud server error:

Failed to execute goal org.apache.felix:maven-bundle-plugin:6.0.0:bundle (default-bundle) on project aem-acs-enterprise.core-businesslogic: Execution default-bundle of goal org.apache.felix:maven-bundle-plugin:6.0.0:bundle failed: An API incompatibility was encountered while executing org.apache.felix:maven-bundle-plugin:6.0.0:bundle: java.lang.UnsupportedClassVersionError: aQute/bnd/osgi/Analyzer has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 55.0

 

2 replies

arunpatidar
Community Advisor
arunpatidarCommunity AdvisorAccepted solution
Community Advisor
December 20, 2024
kautuk_sahni
Community Manager
Community Manager
January 7, 2025

@meghago Did you find the suggestion helpful? Please let us know if you require more information. Otherwise, please mark the answer as correct for posterity. If you've discovered a solution yourself, we would appreciate it if you could share it with the community. Thank you!

Kautuk Sahni