0

Am trying to create an aem workflow java process step, adding the below dependency in the pom.xml file dependencies list once i add the bundle build is fine but it is in Installed state only because of the below two errors.

        <dependency>
        <groupId>com.day.cq.workflow</groupId>
        <artifactId>cq-workflow-api</artifactId>
        <version>5.6.2</version>
        <scope>provided</scope>
    </dependency>

i have tried adding the dependency but still no use, the error remains same

<dependency>
<groupId>net.sf.ehcache</groupId>
<artifactId>ehcache</artifactId>
<version>2.8.3</version>
<scope>provided</scope>

And also i have tried to keep the imports as optional still no use

<Import-Package>net.sf.ehcache,net.spy.memcached,*;resolution:=optional</Import-Package>

Error Message: Error message in AEM Felix console

krish
  • 469
  • 1
  • 15
  • 34

1 Answers1

3

Simply add the build time dependencies to ehcache and memcached as <optional>true</optional> in the maven pom. bnd will then create the imports as optional and it should work. No need to have a Import-Package Element.

Christian Schneider
  • 19,420
  • 2
  • 39
  • 64
  • I have added in this way ` net.sf.ehcache ehcache 2.8.3 provided true net.spy spymemcached 2.12.1 provided true` Bundle in installed status and below error message shows in red. net.sf.ehcache,version=[2.8,3) -- Cannot be resolved but is not required net.spy.memcached -- Cannot be resolved but is not required – krish Aug 18 '16 at 09:29
  • Check the Manifest if the import is optional. If it is optional then the bundle should resolve. – Christian Schneider Aug 18 '16 at 09:49