


Hi All,
I have created AEM a cloud project using below archtype
mvn -B archetype:generate -D archetypeGroupId=com.adobe.aem -D archetypeArtifactId=aem-project-archetype -D archetypeVersion=30 -D appTitle="Digital Site" -D appId="digitalsite" -D artifactId="aem-digital" -D groupId="com.digital" -D aemVersion=cloud -D includeDispatcherConfig="y"
I have added some project specific dependency
<dependency>
<groupId>com.fasterxml.jackson.dataformat</groupId>
<artifactId>jackson-dataformat-csv</artifactId>
<version>2.11.4</version>
</dependency>
But while building the project I am getting error
[WARNING] The analyser found the following warnings for author and publish :
[WARNING] [artifact-rules] artifact-rules: Artifact rules are not specified, unable to validate feature
[ERROR] The analyser found the following errors for author and publish :
[ERROR] [api-regions-exportsimports] com.digital:aem-digital.core:1.0.0-SNAPSHOT: Bundle aem-digital.core:1.0.0-SNAPSHOT is importing package(s) com.fasterxml.jackson.dataformat.csv in start level 20 but no bundle is exporting these for that start level. (com.digital:aem-digital.all:1.0.0-SNAPSHOT)
Can please help me here How I can resolve this error??
Views
Replies
Sign in to like this content
Total Likes
This is because of the aemanalyser-maven-plugin that gets executed in all module of the project which run the same checks locally as in the Cloud Manager deployment pipeline.
More about the plugin : https://github.com/adobe/aemanalyser-maven-plugin/blob/main/aemanalyser-maven-plugin/README.md
For the reported analyzer error,
Whole list of analyzers that are executed as part of this plugin : https://experienceleague.adobe.com/docs/experience-manager-core-components/using/developing/archetyp...
if you just add the dependency to the pom, this additional JAR is used while compilation and test. But it is not included into the runtime, and therefor this validation process fails.
You either need to embed this dependency into your own bundle, or you find an OSGI-version of that bundle and deploy it along with your core bundle.
Jörg_Hoh I have tried to add below in core pom.xml but still getting same error.
<plugin> <groupId>org.apache.felix</groupId> <artifactId>maven-bundle-plugin</artifactId> <version>4.2.1</version> <extensions>true</extensions> <configuration> <instructions> <Export-Package>com.fasterxml.jackson.*</Export-Package> <Embed-Dependency>jackson-dataformat-csv;scope=compile|runtime</Embed-Dependency> <Embed-Transitive>true</Embed-Transitive> <Import-Package> com.fasterxml.jackson.* </Import-Package> </instructions> </configuration> </plugin>
I would drop the Export-Package, because you don't want to re-export any jackson package. The Embed-Dependency looks ok, although you can probably omit the scope statement.
Can you check if the jackson-dataformat.csv jar is placed within the target/classes folder after the build?
Add the dependency to your core bundle and that should clean this error.
<dependency>
<groupId>com.fasterxml.jackson.dataformat</groupId>
<artifactId>jackson-dataformat-csv</artifactId>
</dependency>
I tried it too and the build is successful.
@B_Sravan I have already added dependency in main pom as well as in core pom gettig error while running below build command
mvn clean install -PautoInstallPackage
Main pom.
<dependency> <groupId>com.fasterxml.jackson.dataformat</groupId> <artifactId>jackson-dataformat-csv</artifactId> <version>2.11.4</version> </dependency>
Core pom
<dependency> <groupId>com.fasterxml.jackson.dataformat</groupId> <artifactId>jackson-dataformat-csv</artifactId> </dependency>
Hi,
This error type means
Checks if all OSGI bundles have their Import-Package declarations satisfied by the Export-package declaration of other included bundles in the Maven project. An error would look like this:
[ERROR] org.acme:mybundle:0.0.1-SNAPSHOT: Bundle org.acme:mybundle:0.0.1-SNAPSHOT is importing package(s) org.acme.foo in start level 20 but no bundle is exporting these for that start level.
To troubleshoot, see if the bundle providing the package is included in the deployment, or alternatively look at the manifest of the bundle that you would expect to be exporting to determine if the wrong name or wrong version was used.
@arunpatidar I am getting this just after adding below dependency which I am using on servlet class. And I am getting this error even run mvn clean install
This is because of the aemanalyser-maven-plugin that gets executed in all module of the project which run the same checks locally as in the Cloud Manager deployment pipeline.
More about the plugin : https://github.com/adobe/aemanalyser-maven-plugin/blob/main/aemanalyser-maven-plugin/README.md
For the reported analyzer error,
Whole list of analyzers that are executed as part of this plugin : https://experienceleague.adobe.com/docs/experience-manager-core-components/using/developing/archetyp...
[Webinar | AEM GEMs] Looking under the hood - Cloud Manager 2022 | Register: https://adobe.ly/3t4jfgp & Ask Questions related to this Webinar: https://adobe.ly/3O0rdzd
Date &Time: Wednesday, June 15, 2022 - 8 am PDT OR 5 pm CET OR 8.30 pm IST
Speakers: Remus Stratulat & Shankari Panchapakesan
Share this within your Organisation and with your AEM peers!!