Link to MavenTipsAndTricks
Getting and Building Sling
A short recount on the first step for getting a running Sling instance after checking out the source from the SVN repository
Note that you don't have to build Sling yourself, if you don't need the bleeding-edge stuff you can get prebuilt binaries from the Downloads page.
Prerequisites
Before you begin, you should have installed the following tools on your system:
- Java 5 or higher
- Maven 2.0.7 (or later)
Configuring Maven
See alsoMavenTipsAndTricks.
Many of the Sling modules have been released into the Apache Incubator Maven 2
repository. This repository is not visible by default to Maven 2. To enable its use, it is easiest if you configure it into your local maven settings found in $HOME/.m2/settings.xml by default:
<?xml version="1.0"?>
<settings>
<profiles>
<profile>
<id>apache-incubation</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<repositories>
<repository>
<id>apache.incubating</id>
<name>Apache Incubating Repository</name>
<url>http://people.apache.org/repo/m2-incubating-repository</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>apache.incubating.plugins</id>
<name>Apache Incubating Plugin Repository</name>
<url>http://people.apache.org/repo/m2-incubating-repository</url>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>
</settings>
Getting a Running Instance
- Checkout Sling from the Repository
- Enter the directory and do a full build and local install (below are unix/linux commands, slightly different under windows)
- Enter the launchpad/app directory and launch Sling for the first time
Messages should now be printed to the console which is used as the "log file" because the -f command line option is set to - indicating to use standard output as the log file. The -c sling command line option instructs Sling to use the sling directory in the current directory for its data store, which is the Apache Felix bundle archive, the Jackrabbit repository data and configuration. You may also specify another directory here, either a relative or absolute path name (See also Configuration for more information).
After all messages have been printed you should now be able to open the Sling Management Console by pointing your web browser at http://localhost:8080/system/console
. You will be prompted for a user name and password. Enter admin as both the user name and the password (this may be set on Configuration page later). From this console, you may manage the installed bundles, modify configuration objects, dump a configuration status and get some system information.
To stop Sling, just hit Ctrl-C at the console or click the Stop button on the System Information page of the Sling Management Console.
Congratulations ! You should now have a running Sling instance, which you may start playing around with.