add info about EU SVN mirror
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, Java 6 recommended
- Maven 2.0.7 (or later), Maven 2.0.9 recommended
Environment Setup
The full build process requires quite some resources, so you may run into limits. The following hints should show you what to setup before building Sling
Java Heap Space
- Problem – Build aborts with report of java.lang.OutOfMemoryError: Java heap space. This mostly happens while building the Jackrabbit Server module jcr/jackrabbit-server.
- Platforms – Windows XP, Mac OSX, OpenSolaris
- Fix – Set the a higher value for the maximum heap space for the build by setting or extending the MAVEN_OPTS environment variable:
Environment Variable Space
- Problem – Build aborts when trying to launch the integration tests with message
- Platform – OpenSolaris
- Fix – This problem is caused by missing swap space. When running the integration tests in the launchpad/testing modules, a process is launched by calling the exec system call. This copies the process (copy-on-write, though) and thus allocates as much virtual memory as is owned by the parent process. This may fail if swap space is exhausted.
Configuring Maven
See also MavenTipsAndTricks.
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. The command to use depends on where you are located since ASF is running two SVN servers, the main one located in the USA and a slave in Europe (Netherlands). So if you happen to be located in Europe use svn.eu.apache.org.
- 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.