sling api in use | Community
Skip to main content
mohanb
New Participant
May 11, 2016
Solved

sling api in use

  • May 11, 2016
  • 4 replies
  • 926 views

I am referring the javadoc https://docs.adobe.com/docs/en/aem/6-1/ref/javadoc/ here for JobManager API. Here it says there is a method addJob(String topic, Map<String,Object> properties). But acutal API doesn't have this method. I'm having following dependencies in the maven. Is this documentation error? Isn't recent version of sling used. If so, what's the version of sling used in 6.1.0?

        <dependency>

            <groupId>org.apache.sling</groupId>

            <artifactId>org.apache.sling.jcr.api</artifactId>

            <version>2.1.0</version>

            <scope>provided</scope>

        </dependency>

        <dependency>

            <groupId>org.apache.sling</groupId>

            <artifactId>org.apache.sling.api</artifactId>

            <version>2.4.0</version>

            <scope>provided</scope>

        </dependency>

        <dependency>

            <groupId>org.apache.sling</groupId>

            <artifactId>org.apache.sling.event</artifactId>

            <version>3.1.4</version>

            <scope>provided</scope>

        </dependency>

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Tuhin_Ghosh

Hi,

Its present in the interface JobManager.

https://sling.apache.org/apidocs/sling7/org/apache/sling/event/jobs/JobManager.html

Do not put the redundant entries in the pom. remove all and try with the below dependency in your pom.

<dependency>
    <groupId>org.apache.sling</groupId>
    <artifactId>org.apache.sling.event</artifactId>
    <version>4.0.0</version>
</dependency>

 

Thanks

Tuhin 

4 replies

Tuhin_Ghosh
New Participant
May 15, 2016

Yes there is something like this but as you know the number of opensource java library is huge. So sometime you might have to go to the java doc of the library and see for yourself.

https://docs.adobe.com/docs/en/aem/6-1/deploy/technical-requirements.html

Thanks

Tuhin

mohanb
mohanbAuthor
New Participant
May 15, 2016

Thanks. I was using 3.1.4. Is 4.0.0 compatible with aem 6.1.0 version? Where do you verify compatibility? is there any compatibility matrix published?

kautuk_sahni
Employee
May 12, 2016

Hi,

Its available since 3.0.

And yes as mentioned by Tuhin, do not use redundant dependency in pom file. 

Thanks and Regards

Kautuk Sahni

Kautuk Sahni
Tuhin_Ghosh
Tuhin_GhoshAccepted solution
New Participant
May 11, 2016

Hi,

Its present in the interface JobManager.

https://sling.apache.org/apidocs/sling7/org/apache/sling/event/jobs/JobManager.html

Do not put the redundant entries in the pom. remove all and try with the below dependency in your pom.

<dependency>
    <groupId>org.apache.sling</groupId>
    <artifactId>org.apache.sling.event</artifactId>
    <version>4.0.0</version>
</dependency>

 

Thanks

Tuhin