How to use dependency classes in AEM as a cloud
I want to use org.apache.commons.beanutils.BeanUtils class so I added a below dependency in core module,
Parent POM-
<dependency>
<groupId>commons-beanutils</groupId>
<artifactId>commons-beanutils</artifactId>
<version>1.9.4</version>
<scope>compile</scope>
</dependency>
Core POM-
<dependency>
<groupId>commons-beanutils</groupId>
<artifactId>commons-beanutils</artifactId>
</dependency>
I am trying to access BeanUtils class within the same bundle but I could not build the code, it is giving below build error
[ERROR] com.adobe.aem.xyz:1.1.0-SNAPSHOT: Bundle xyz.core:1.1.0-SNAPSHOT is importing package(s) org.apache.commons.beanutils in start level 20 but no bundle is exporting these for that start level.
[ERROR] Analyser detected errors on feature 'com.adobe.aem.xyz:xyz.analyse:slingosgifeature:aggregated-publish.dev:1.1.0-SNAPSHOT'. See log output for error messages.
But I could not see any error in eclipse while importing the BeanUtils class but the code is getting failed. I thought it is expecting org.apache.commons.beanutils.BeanUtils to be set in Export-Package section, so I tried below config,
<plugin>
<groupId>biz.aQute.bnd</groupId>
<artifactId>bnd-maven-plugin</artifactId>
<executions>
<execution>
<id>bnd-process</id>
<goals>
<goal>bnd-process</goal>
</goals>
<configuration>
<bnd><![CDATA[Import-Package: javax.annotation;version=0.0.0, \
Export-Package: org.apache.commons;version=1.9.3, \
*]]></bnd>
</configuration>
</execution>
</executions>
</plugin>
But I ended up with same error. Can you please tell how dependencies are being managed and used in aem as cloud ?