Author: buildbot
Date: Mon Nov 28 22:28:20 2016
New Revision: 1001791
Log:
Staging update by buildbot for sling
Modified:
websites/staging/sling/trunk/content/ (props changed)
websites/staging/sling/trunk/content/documentation/development/getting-and-building-sling.html
Propchange: websites/staging/sling/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Mon Nov 28 22:28:20 2016
@@ -1 +1 @@
-1771803
+1771822
Modified:
websites/staging/sling/trunk/content/documentation/development/getting-and-building-sling.html
==============================================================================
---
websites/staging/sling/trunk/content/documentation/development/getting-and-building-sling.html
(original)
+++
websites/staging/sling/trunk/content/documentation/development/getting-and-building-sling.html
Mon Nov 28 22:28:20 2016
@@ -118,23 +118,20 @@ h2:hover > .headerlink, h3:hover > .head
<p>Note that you don't <em>have</em> to build Sling yourself, if you don't
need the bleeding-edge stuff you can get prebuilt
binaries from the <a href="/downloads.cgi">Downloads</a> page. But those,
especially the launchpad runnable jar, are not released often
and can be outdated. In case of doubt, build it yourself as shown below or ask
on the Sling users mailing list.</p>
-<p>A full build of Sling takes 5-10 minutes on a recent computer once your
local Maven repository is up to date. The first build
-may take much longer than that if you start with an empty local Maven
repository, as Maven will then download its plugins and
-all the required dependencies.</p>
+<p>Rather than performing a full build of Sling, which can take 5-10 minutes
on a recent computer once your local Maven
+repository is up to date, it's recommended to build only the launchpad and the
modules you're interested in.</p>
<h2 id="tldr-short-form-build-run-instructions">tl:dr - Short form build + run
instructions<a class="headerlink"
href="#tldr-short-form-build-run-instructions" title="Permanent
link">¶</a></h2>
<p>If you already have the required svn (or Git, see below) client, JDK and
Maven installed, here's the short form recipe:</p>
-<div class="codehilite"><pre>$ <span class="n">svn</span> <span
class="n">co</span> <span class="n">http</span><span class="p">:</span><span
class="o">//</span><span class="n">svn</span><span class="p">.</span><span
class="n">apache</span><span class="p">.</span><span class="n">org</span><span
class="o">/</span><span class="n">repos</span><span class="o">/</span><span
class="n">asf</span><span class="o">/</span><span class="n">sling</span><span
class="o">/</span><span class="n">trunk</span> <span class="n">sling</span>
-$ <span class="n">cd</span> <span class="n">sling</span>
-$ <span class="n">export</span> <span class="n">MAVEN_OPTS</span><span
class="p">=</span> # <span class="p">(</span><span class="n">see</span> <span
class="n">below</span><span class="p">)</span>
-$ <span class="n">mvn</span> <span class="n">clean</span> <span
class="n">install</span> # <span class="p">(</span><span class="n">maybe</span>
<span class="n">with</span> <span class="o">-</span><span
class="n">DskipTests</span> <span class="k">if</span> <span
class="n">you</span> <span class="n">know</span> <span class="n">what</span>
<span class="n">you</span><span class="o">'</span><span class="n">re</span>
<span class="n">doing</span><span class="p">)</span>
+<div class="codehilite"><pre>$ <span class="n">svn</span> <span
class="n">co</span> <span class="n">http</span><span class="p">:</span><span
class="o">//</span><span class="n">svn</span><span class="p">.</span><span
class="n">apache</span><span class="p">.</span><span class="n">org</span><span
class="o">/</span><span class="n">repos</span><span class="o">/</span><span
class="n">asf</span><span class="o">/</span><span class="n">sling</span><span
class="o">/</span><span class="n">trunk</span> <span class="n">sling</span>
+$ <span class="n">cd</span> <span class="n">sling</span> # <span
class="n">you</span> <span class="n">are</span> <span class="n">now</span>
<span class="n">in</span> <span class="n">the</span> <span
class="n">Sling</span> <span class="n">SVN</span> <span
class="n">checkout</span>
$ <span class="n">cd</span> <span class="n">launchpad</span><span
class="o">/</span><span class="n">builder</span>
-$ <span class="n">rm</span> <span class="o">-</span><span class="n">rf</span>
<span class="p">.</span><span class="o">./</span><span
class="n">builder</span><span class="o">/</span><span class="n">sling</span> #
<span class="p">(</span><span class="k">if</span> <span
class="n">needed</span><span class="p">,</span> <span class="n">to</span> <span
class="n">cleanup</span> <span class="n">previous</span> <span
class="n">state</span><span class="p">)</span>
-$ <span class="n">export</span> <span class="n">DBG</span><span
class="p">=</span>"<span class="o">-</span><span class="n">Xmx384M</span>
<span class="o">-</span><span class="n">agentlib</span><span
class="p">:</span><span class="n">jdwp</span><span class="p">...</span>" #
<span class="p">(</span><span class="n">see</span> <span
class="n">below</span><span class="p">)</span>
+$ <span class="n">mvn</span> <span class="o">--</span><span
class="n">update</span><span class="o">-</span><span class="n">snapshots</span>
<span class="n">clean</span> <span class="n">install</span>
+$ <span class="n">export</span> <span class="n">DBG</span><span
class="p">=</span>"<span class="o">-</span><span class="n">Xmx384M</span>
<span class="o">-</span><span class="n">agentlib</span><span
class="p">:</span><span class="n">jdwp</span><span class="p">...</span>" #
<span class="p">(</span><span class="n">see</span> <span
class="n">below</span><span class="p">)</span>
$ <span class="n">java</span> $<span class="n">DBG</span> <span
class="o">-</span><span class="n">jar</span> <span class="n">target</span><span
class="o">/</span><span class="n">org</span><span class="p">.</span><span
class="n">apache</span><span class="p">.</span><span
class="n">sling</span><span class="p">.</span><span
class="n">launchpad</span><span class="p">...</span> # <span
class="p">(</span><span class="n">see</span> <span class="n">below</span><span
class="p">)</span>
</pre></div>
-<p>With this, Sling should be running at http://localhost:8080 with remote
debugging active as per the $DBG variable. </p>
+<p>With this, Sling should be running at http://localhost:8080 with remote
debugging active as per the $DBG variable.</p>
<h2 id="prerequisites">Prerequisites<a class="headerlink"
href="#prerequisites" title="Permanent link">¶</a></h2>
<p>Before you begin, you need to have the following tools installed on your
system:</p>
<ul>
@@ -149,23 +146,6 @@ $ <span class="n">java</span> $<span cla
</ul>
<h2 id="environment-setup">Environment Setup<a class="headerlink"
href="#environment-setup" title="Permanent link">¶</a></h2>
<p>The full build process requires quite a lot of resources, so you may run
into limits. The following hints should show you what to setup before building
Sling.</p>
-<h3 id="java-heap-space">Java Heap Space<a class="headerlink"
href="#java-heap-space" title="Permanent link">¶</a></h3>
-<ul>
-<li><em>Problem</em> - Build aborts with reports of
<code>java.lang.OutOfMemoryError: Java heap space</code>. Alternatively the
build may randomly fail during the integration tests.</li>
-<li><em>Platforms</em> - This happens on all platforms</li>
-<li><em>Fix</em> - Increase the values of the maximum heap and perm space for
the build by setting or extending the <code>MAVEN_OPTS</code> environment
variable.</li>
-</ul>
-<p>For 32bit platforms you should use</p>
-<div class="codehilite"><pre><span class="n">MAVEN_OPTS</span><span
class="p">=</span>"<span class="o">-</span><span class="n">Xmx256M</span>
<span class="o">-</span><span class="n">XX</span><span class="p">:</span><span
class="n">MaxPermSize</span><span class="p">=</span>256<span
class="n">m</span>"
-</pre></div>
-
-
-<p>For 64bit platforms, you should use</p>
-<div class="codehilite"><pre><span class="n">MAVEN_OPTS</span><span
class="p">=</span>"<span class="o">-</span><span class="n">Xmx512M</span>
<span class="o">-</span><span class="n">XX</span><span class="p">:</span><span
class="n">MaxPermSize</span><span class="p">=</span>512<span
class="n">m</span>"
-</pre></div>
-
-
-<p>For more information see <a
href="https://issues.apache.org/jira/browse/SLING-443">SLING-443</a> and <a
href="https://issues.apache.org/jira/browse/SLING-1782">SLING-1782</a>.</p>
<h3 id="environment-variable-space">Environment Variable Space<a
class="headerlink" href="#environment-variable-space" title="Permanent
link">¶</a></h3>
<ul>
<li>
@@ -234,20 +214,16 @@ $ <span class="n">java</span> $<span cla
<li>Click OK</li>
</ol>
<h2 id="building-sling">Building Sling<a class="headerlink"
href="#building-sling" title="Permanent link">¶</a></h2>
+<p>Note that while it's possible to build the full Sling reactor, using the
pom.xml file in the root of the SVN checkout, this should
+rarely be needed and it's almost always too slow to consider. Instead, it's
recommended to build the Sling launchpad and the module
+you're working on at the moment.</p>
<h3 id="with-the-maven-command-line-tool">With the Maven command line tool<a
class="headerlink" href="#with-the-maven-command-line-tool" title="Permanent
link">¶</a></h3>
<ol>
<li>
-<p>Enter the directory, then do a full build and local install (below are
unix/linux commands, slightly different under windows)</p>
+<p>Enter the directory, then do a build and local install of the launchpad
(below are unix/linux commands, slightly different under windows)</p>
<p>$ cd sling
-$ export MAVEN_OPTS="-Xmx256m -XX:MaxPermSize=128m"
-$ mvn -s /dev/null clean install</p>
-</li>
-</ol>
-<p>Note: On windows just leave out <code>/dev/null</code> and make sure you
have an empty settings.xml file for maven (located in your user directory under
.m2).</p>
-<ol>
-<li>
-<p>Enter the <code>launchpad/builder</code> directory and launch Sling for the
first time</p>
-<p>$ cd launchpad/builder
+$ cd launchpad/builder # you are now in the Sling SVN checkout
+$ mvn --update-snapshots clean install
$ java -jar target/org.apache.sling.launchpad-*.jar -c test -f -</p>
</li>
</ol>
@@ -263,6 +239,19 @@ When starting Sling inside the `launchpa
</ul>
<p>After all messages have been printed you should be able to open the Sling
Management Console by pointing your web browser at <a
href="http://localhost:8080/system/console">http://localhost:8080/system/console</a>.
You will be prompted for a user name and password. Enter <code>admin</code>
for both the user name and the password (this may be set on the
<em>Configuration</em> page later). From this console, you can manage the
installed bundles, modify configuration objects, dump a configuration status
and see some system information.</p>
<p>To stop Sling, just hit <code>Ctrl-C</code> in the console or click the
<em>Stop</em> button on the <em>System Information</em> page of the Sling
Management Console.</p>
+<ol>
+<li>
+<p>Enter the directory of the bundle you're working on, then do a build and
deploy the bundle to the running launchpad instance</p>
+<p>$ cd sling
+$ cd bundles/servlets/get
+$ mvn clean install sling:install</p>
+</li>
+</ol>
+<p>The Maven build command ensure that:</p>
+<ul>
+<li>the bundle is installed in the local repository so future builds of the
launchpad module will pick it up ( <code>install</code> goal )</li>
+<li>the bundle is deployed in the running launchpad instance (
<code>sling:install</code> goal )</li>
+</ul>
<h3 id="with-m2eclipse">With M2Eclipse<a class="headerlink"
href="#with-m2eclipse" title="Permanent link">¶</a></h3>
<ol>
<li>Make sure you're in the Java perspective (Menu: Window->Open
Perspective)</li>
@@ -329,7 +318,7 @@ For more information on this see the <a
</ul>
<p>If adding dependencies to the poms, run mvn eclipse:eclipse again and
refresh the project in Eclipse. Debugging works as described above.</p>
<div class="timestamp" style="margin-top: 30px; font-size: 80%;
text-align: right;">
- Rev. 1674837 by cziegeler on Mon, 20 Apr 2015 13:08:02 +0000
+ Rev. 1771822 by rombert on Mon, 28 Nov 2016 22:28:05 +0000
</div>
<div class="trademarkFooter">
Apache Sling, Sling, Apache, the Apache feather logo, and the Apache
Sling project