Hi Chetan,

If it's useful, what we do is (using maven):

1) Define two modules for producing the launchpad artifacts (war and standalone 
jar), one that includes our bundles (this module is built by our CI server, or 
for release), and one that excludes them producing a war (so containing all the 
uplifted sling/etc bundle versions). Both modules use the same list.xml.

2) The latter module has maven config to run using jetty:run-war

3) Our content/etc bundle modules are defined with maven profile for doing a 
maven-sling-plugin:install

4) In eclipse, run configurations defined for running the jetty war, cleaning 
and running the jetty war, and sling-installing each bundle.

For general development, we have the jetty war running in the background, then 
just run mvn -P doSlingInstall install on each bundle module as it changes (you 
don't have to clean sling for an updated module if no dependencies have 
changed). When list.xml is changed and you need to clean the sling home (the 
scenario you describe), you just run the mvn clean jetty:run-war run 
configuration, followed by the install for each development bundle.

HTH

Cheers,
James

-----Original Message-----
From: Chetan Mehrotra [mailto:[email protected]]
Sent: 20 August 2012 06:31
To: [email protected]
Subject: Launching Sling standalone in exploded format

For some work I have to frequently launch Sling standalone jar with clean 
start. The development flow is like

1. Start sling
2. Debug startup logic and initial installation 3. Shutdown 4. Update certain 
bundles in resources/install folder based on #2. For this install them in Maven 
first 5. Clean existing sling home directory 6. Repackage Sling standalone so 
that updated bundle from #4 gets picked up 7. Use the newly created standalone 
jar

In this flow step #6 takes some time (~30-40 sec). To reduce the turnaround 
time I would like to run the standalone jar in exploded format. So that I can 
bypass #6 and just update the jar in install folder directly. I tried to run 
Sling by exploding the standalone jar and explicitly passing Main class in 
startup. However this does not work as it uses ClassloaderResourceProvider and 
in that getChilderen() does not work.

Is there any other way I can simplify my development workflow such that I can 
bypass repackaging step #6?

Otherwise I was thinking to modify the MainDelgate to uses some sort 
FilesystemResourceProvider depending on startup mode.

Any thoughts/suggestions!!

Chetan Mehrotra



Information in this e-mail and any attachments is confidential, and may not be 
copied or used by anyone other than the addressee, nor disclosed to any third 
party without our permission. There is no intention to create any legally 
binding contract or other binding commitment through the use of this electronic 
communication unless it is issued in accordance with the Experian Limited 
standard terms and conditions of purchase or other express written agreement 
between Experian Limited and the recipient. Although Experian has taken 
reasonable steps to ensure that this communication and any attachments are free 
from computer virus, you are advised to take your own steps to ensure that they 
are actually virus free. 

Companies Act information: Registered name: Experian Limited. Registered 
office: Landmark House, Experian Way, NG2 Business Park, Nottingham, NG80 1ZZ, 
United Kingdom. Place of registration: England and Wales. Registered number: 
653331

Reply via email to