hi
So I fixed Sling annotations and now I get a xml file inside OSGI-INF folder inside the JAR
But the xml file name is not serviceComponets.xml but taking the Servlet Class name even with the package name .
How to get normal serviceComponets.xml ?
Solved! Go to Solution.
Views
Replies
Total Likes
Try following this AEM article - you will run a maven command that will produce a server-side OSGi bundle that has servicecomponent.xml:
https://helpx.adobe.com/experience-manager/using/creating-aem-project-using-eclipse.html
The OSGi bundle that has EchoService will contain this file. Also - you use the vault too to sync code between the JCR and AEM.
Views
Replies
Total Likes
Not sure what you mean by "I fixed Sling annotation" - can you provide more details.
Also - when using mvn:
mvn archetype:generate -DarchetypeRepository=http://repo.adobe.com/nexus/content/groups/public/ -DarchetypeGroupId=com.day.jcr.vault -DarchetypeArtifactId=multimodule-content-package-archetype -DarchetypeVersion=1.0.2 -DgroupId=com.adobe.cq -DartifactId=key61 -Dversion=1.0-SNAPSHOT -Dpackage=com.adobe.cq -DappsFolderName=myproject -DartifactName="My Project" -DcqVersion="5.6.1" -DpackageGroup="My Company"
the servicecomponent.xml file is located within the OSGi budle
[img]pic1.png[/img]
Views
Replies
Total Likes
Thank you,
for this project I always have been using this documentation to develop with Eclipse
https://docs.adobe.com/docs/en/cq/5-5/developing/developmenttools/developing_with_eclipse.html
There is an example POM file and then run Maven install. I didn't use any Maven command from command line.
For Logout Servlet that I need, I added annotations as below, so that OSGI-INF folder was created in Maven install
@Component(enabled = true)
@Service(Servlet.class)
@Properties({
@Property(name="resourceTypes", value="sling/servlet/default"),
@Property(name="methods", value="POST"),
@Property(name="selectors", value="ourlogout"),
@Property(name="extensions", value="html"),
@Property(name="service.pid", value="<package>.LogoutServlet",propertyPrivate=false),
})
public class LogoutServlet extends SlingAllMethodsServlet {
But the XML file doesn't have this name serrviceComponets.xm
Views
Replies
Total Likes
Try following this AEM article - you will run a maven command that will produce a server-side OSGi bundle that has servicecomponent.xml:
https://helpx.adobe.com/experience-manager/using/creating-aem-project-using-eclipse.html
The OSGi bundle that has EchoService will contain this file. Also - you use the vault too to sync code between the JCR and AEM.
Views
Replies
Total Likes
thank you, i will follow the documentation you provided
Views
Replies
Total Likes
Hi,
If you are using the latest maven archetype 10 to create the AEM project, it will create different XMLs for each of the service that are created.
Is there need to have a common servicecomponent xml ??
Views
Replies
Total Likes
hi @bsloki .
You might remember my questions, I am copying a project from Live to test server, the project jar in LIVE had this XML.
As I have to make changes in the source, and upload a new JAR , i thought I need that XML with the same name.
Views
Replies
Total Likes