Upgrade from AEM 6.1 to 6.4 Maven run time errors

Avatar

Avatar

Eakambaram

Avatar

Eakambaram

Eakambaram

18-06-2018

I am trying to migrate my code base from AEM 6.1 to 6.4. When I do >mvn clean compile -Pauto-deploy. Build is success and able to see bundles in AEM System console.  But couple of bundles are in Installed state. I am seeing lot of "Cannot be resolved but is not required" errors.

But the same code is working as expected when deployed to AEM 6.1 instance.

Note : I have added below dependency for uber.

<dependency>

      <groupId>com.adobe.aem</groupId>

      <artifactId>uber-jar</artifactId>

      <version>6.4.0</version>

      <classifier>apis</classifier>

      <scope>provided</scope>

  </dependency>

I have solved majority of the them by adding corresponding maven dependencies in my pom file.  But not able to figure out how to solve the below errors. If I add one dependency it is showing lot of errors for other packages which are defined as part of that.

For example if add dependency in my pom for solving "com.google.appengine.api.urlfetch". I am getting lot of other not required errors within google app engine.

Can you please help me here.

com.google.appengine.api.urlfetch -- Cannot be resolved but is not required

com.google.javascript.jscomp -- Cannot be resolved but is not required

com.thoughtworks.xstream -- Cannot be resolved but is not required

javax.annotation,version=[1.2,2) -- Cannot be resolved but is not required

jline -- Cannot be resolved but is not required

junit.framework -- Cannot be resolved but is not required

junit.textui -- Cannot be resolved but is not required

nu.xom -- Cannot be resolved but is not required

oauth.signpost -- Cannot be resolved but is not required

oauth.signpost.basic -- Cannot be resolved but is not required

oauth.signpost.commonshttp -- Cannot be resolved but is not required

oauth.signpost.exception -- Cannot be resolved but is not required

oauth.signpost.http -- Cannot be resolved but is not required

org.apache.avalon.framework.logger -- Cannot be resolved but is not required

org.apache.bsf -- Cannot be resolved but is not required

org.apache.bsf.util -- Cannot be resolved but is not required

org.apache.commons.cli -- Cannot be resolved but is not required

View Entire Topic

Avatar

Avatar

sachinarora

Avatar

sachinarora

sachinarora

23-06-2018

You can keep that jar in local/central repository and embed it in maven-bundle-plugin in pom.xml of your project's bundle. It will be available with your project bundle. You might get import errors of few the packages which might not be needed in run time. You can neglect those packages as well. Refer this article for details.