Expand my Community achievements bar.

SOLVED

i'm getting this error while build for AEMaaCs

Avatar

Level 4

[ERROR] The analyser found the following errors for author and publish :
[ERROR] [api-regions-exportsimports] test.mock.cole.aem:core-aemaacs.core:1.0.0-SNAPSHOT: Bundle core-aemaacs.core:1.0.0-SNAPSHOT is importing package(s) [org.jsoup.select
, org.jsoup, org.jsoup.nodes] in start level 20 but no bundle is exporting these for that start level. ( test.mock.cole.aem.core-aemaacs.all:1.0.0-SNAPSHOT)

 

 

anyone faced this issue?

1 Accepted Solution

Avatar

Correct answer by
Level 4

Embeding the dependency in all pom.xml resloved this issue.

<embedded>
<groupId>org.jsoup</groupId>
<artifactId>jsoup</artifactId>
<type>jar</type>
<target>/apps/aem-vendor-packages/install</target>
</embedded>

View solution in original post

5 Replies

Avatar

Level 6

Hi,

Have you added any jsoup dependency in your pom.xml ? When 3rd party dependency is not getting resolved then you can face above kind of errors. Below links may help you to understand the issue and resolve the same .

1) https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/getting-error-while-buildi...

2) https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/jsoup-jar-does-not-install...

 

Thanks,

Somen

Avatar

Community Advisor

Hi,

 

This jsoup depedency need to be resolved by converting jar into OSGI bundle fragment. Please have a look at a similar thread.

https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/jsoup-jar-does-not-install...

Avatar

Level 6

@vkarthick 

This error could mean that classes from your core bundle are trying to import jsoup packages but jsoup bundle does not export them. So you need to explicitly export those packages to make them available for other bundles to use.

In order to do that, in your core pom.xml in maven-bundle-plugin configuration export these packages like below.

<plugins>
    <plugin>
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-bundle-plugin</artifactId>
        <extensions>true</extensions>
        <configuration>
            <instructions>
                <Export-Package>
                    org.jsoup.*
                </Export-Package>
                <Embed-Dependency>*</Embed-Dependency>
                <Embed-Transitive>true</Embed-Transitive>
            </instructions>
        </configuration>
    </plugin>
</plugins>

 

Avatar

Correct answer by
Level 4

Embeding the dependency in all pom.xml resloved this issue.

<embedded>
<groupId>org.jsoup</groupId>
<artifactId>jsoup</artifactId>
<type>jar</type>
<target>/apps/aem-vendor-packages/install</target>
</embedded>