Create a hello world bundle in eclipse and check t

2019-08-31 13:51发布

问题:

I am learning Adobe CQ5 on my own. I had pulled the folder structure of jcr_root to my eclipse workbench using vaultclipse. Now my request is can someone provide me some references wherein I can write a hello world bundle in eclipse, bundle it and then push the jar file onto CRX.? To be simple, Steps to achieve a working bundle on CRX which we have created on eclipse environment.

What ever I have been through the reference links of Adobe CQ5 blogs, I see most of them are on CRXDE environment rather than eclipse environment.

回答1:

I'd prefer you to use Eclipse IDE or InteliJ IDEA. For exlipse: Use maven command on bundle's pom.xml file

  1. rightclick on pom.xml file of bundle.
  2. Run as.
  3. Run configurations.
  4. In Base derictory field browse package of your bundle.
  5. In Goals field put:

    install org.apache.sling:maven-sling-plugin:install -Dsling.url=http://SERVERNAME/system/console/install -Dsling.user=admin -Dsling.password=admin

  6. Press Run button

and yours bundle will be installed to CRX

You can check if bundle installed using link

http://SERVENAME/system/console/bundles


标签: adobe osgi aem crx