| # Test the crankstart launcher by setting up an HTTP |
| # server with a few servlets that require specific OSGi configurations |
| |
| # Default values for our variables |
| defaults single.path /single |
| defaults felix.http.jetty.version 2.2.0 |
| |
| # Bootstrap classpath (variables are not supported here) |
| classpath mvn:org.apache.felix/org.apache.felix.framework/4.4.0 |
| classpath mvn:org.slf4j/slf4j-api/1.6.2 |
| classpath mvn:org.apache.sling/org.apache.sling.crankstart.core/0.0.1-SNAPSHOT |
| classpath mvn:org.apache.sling/org.apache.sling.crankstart.api/0.0.1-SNAPSHOT |
| |
| # OSGi properties |
| osgi.property org.osgi.service.http.port ${http.port} |
| osgi.property org.osgi.framework.storage ${osgi.storage.path} |
| |
| # Start the framework |
| start.framework |
| |
| # Start ConfigAdmin, HTTP service and SCR |
| bundle mvn:org.apache.felix/org.apache.felix.http.jetty/${felix.http.jetty.version} |
| bundle mvn:org.apache.felix/org.apache.felix.eventadmin/1.3.2 |
| bundle mvn:org.apache.felix/org.apache.felix.scr/1.8.2 |
| bundle mvn:org.apache.felix/org.apache.felix.metatype/1.0.10 |
| bundle mvn:org.apache.sling/org.apache.sling.commons.osgi/2.2.1-SNAPSHOT |
| bundle mvn:org.apache.sling/org.apache.sling.commons.log/2.1.2 |
| bundle mvn:org.apache.felix/org.apache.felix.configadmin/1.6.0 |
| bundle mvn:org.apache.felix/org.apache.felix.webconsole/3.1.6 |
| |
| # The crankstart.api.fragment bundle makes the crankstart.api package available |
| # to bundles, required for bundles to provide crankstart extension commands like |
| # the test.system.property command below |
| bundle mvn:org.apache.sling/org.apache.sling.crankstart.api.fragment/0.0.1-SNAPSHOT |
| bundle mvn:org.apache.sling/org.apache.sling.crankstart.test.services/0.0.1-SNAPSHOT |
| |
| # Test our Sling extension commands, that add a bundle via the Sling installer |
| # (which requires commons.json and jcr-wrapper) |
| bundle mvn:org.apache.sling/org.apache.sling.installer.core/3.5.0 |
| bundle mvn:org.apache.sling/org.apache.sling.commons.json/2.0.6 |
| bundle mvn:org.apache.sling/org.apache.sling.jcr.jcr-wrapper/2.0.0 |
| bundle mvn:org.apache.sling/org.apache.sling.crankstart.sling.extensions/0.0.1-SNAPSHOT |
| bundle mvn:commons-io/commons-io/2.4 |
| |
| # Now start our bundles |
| start.all.bundles |
| |
| # OSGi configs that activate our test servlets |
| config org.apache.sling.crankstart.testservices.SingleConfigServlet |
| path=${single.path} |
| message=doesn't matter |
| |
| config.factory org.apache.sling.crankstart.testservices.ConfigFactoryServlet |
| path=/foo |
| message=Not used |
| |
| config.factory org.apache.sling.crankstart.testservices.ConfigFactoryServlet |
| path=/bar/test |
| message=Not used |
| |
| # Test Felix format configs |
| config felix.format.test FORMAT:felix.config |
| mongouri="mongodb://localhost:27017" |
| service.ranking.launcher.test=I"54321" |
| array=["foo","bar.from.launcher.test"] |
| |
| config empty.config.should.work FORMAT:felix.config |
| |
| # Test an extension command provided by our test-services bundle |
| test.system.property the.test.system.property was set by test-services bundle |
| |
| # Prepare additional resources for the Sling installer |
| sling.installer.resource mvn:org.apache.sling/org.apache.sling.junit.core/1.0.8 |
| sling.installer.resource mvn:org.apache.sling/org.apache.sling.commons.mime/2.1.4 |
| sling.installer.resource mvn:org.apache.sling/org.apache.sling.settings/1.3.0 |
| |
| # And register the installer resources |
| sling.installer.register crankstart |
| |
| # Informative log |
| log felix http service should come up at http://localhost:${http.port} |