Creating a one shot install for a project in AEM 5.6.1 | Community
Skip to main content
October 16, 2015
Solved

Creating a one shot install for a project in AEM 5.6.1

  • October 16, 2015
  • 5 replies
  • 848 views

Hi,

I am new to Adobe CQ now AEM, I have been struggling to implement a one shot install for an existing project but so far not been able to succeed.

This is what I have currently

  1. A package which basically has few configs, template and a component(I make changes to CRXDLite and build the package)
  2. 4 bundles which have the OSGi Services.(I make changes to the individual maven projects and upload the jar manually)

 

Now what I expect to do is to cutdown this two step process to one. Can someone explain the steps in an easy to understand way.

Appreciate any replies!!!

 

Regards,

Neha

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 Sham_HC

Make jar part of install (/apps/<projectname>/install) directory in repository.  Then create a package including jar file.

http://www.aemcasts.com/aem/episode-1.html

5 replies

Sham_HC
Sham_HCAccepted solution
Level 10
October 16, 2015

Make jar part of install (/apps/<projectname>/install) directory in repository.  Then create a package including jar file.

http://www.aemcasts.com/aem/episode-1.html

joerghoh
Adobe Employee
Adobe Employee
October 16, 2015

Hi,

I would advice to switch over a full mavenized workflow. If you use the archtetypes as described in the documentation [1], it will create a structure, where the code (one or multiple bundles) are embedded into a content package. It's build in a way, that you can compile, build and deploy in a single step.

Jörg

 

[1] http://docs.adobe.com/docs/en/cq/current/developing/developmenttools/how-to-build-aem-projects-using-apache-maven.html

October 16, 2015

Hi,

I followed the same link but doing so only allows me to package my code in one bundle..based on what I understand.

How do I have four bundles in the multi mode project, where do i place the code files apart from the one already in place.

Am I doing something wrong??

 

Regards,

Neha

October 16, 2015

Hi,

Thanks for a superb link, I actually have four bundles to package, how do i do that..?

 

Regards,

Neha

October 16, 2015

Hi,

I followed a different approach could anybody validate this as this behave in an erratic way.

  1. I create a “simple-content-package-archetype” project.
  2. I place all my bundle jars under install directory
  3. I install the package using the “autoInstallPackage” profile, the bundles get installed as expected.
  4. I create a page rendering component to make use of the “My" Services”
  5. I then create a template witch uses this component.
  6. The page works on a fresh installation, but if a failure occurs in any of the above steps, redoing the steps above does not guarantee its working e.g  say I did not install the bundles, the component does not render the page but throws error, re-installing the package with bundles does not solve the error.
  7. I try to sync the new package with the file system project using vlt.
  8.  I re-install the package using the “autoInstallPackage” profile.
  9. I see the same error in step 6.

ERROR(This usually occurs when the bundles do not get installed properly.)

org.apache.sling.api.scripting.ScriptEvaluationException: org.apache.sling.scripting.jsp.jasper.JasperException: Unable to compile class for JSP:

An error occurred at line: 8 in the generated java file

Only a type can be imported. org.apache.sling.hc.util.HealthCheckFilter resolves to a package

 

Can anybody help me understand whats happening here.