incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From build...@apache.org
Subject svn commit: r847468 - in /websites/staging/sling/trunk/content: ./ documentation/development/getting-and-building-sling.html
Date Mon, 21 Jan 2013 16:06:12 GMT
Author: buildbot
Date: Mon Jan 21 16:06:11 2013
New Revision: 847468

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 Jan 21 16:06:11 2013
@@ -1 +1 @@
-1436426
+1436439

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 Jan 21 16:06:11 2013
@@ -87,19 +87,25 @@
       
       <h1>Getting and Building Sling</h1>
       <p>A quick guide for getting the Sling source, then building and running the
resulting Sling instance; either without or with Eclipse.</p>
-<p>Sling can easily be built:
-<em> from the command line (using SVN and the Maven command line tool)
-</em> or using Eclipse</p>
+<p>Sling can easily be built:</p>
+<ul>
+<li>from the command line (using SVN and the Maven command line tool)</li>
+<li>or using Eclipse</li>
+</ul>
 <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</a>
page.</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>
 <h2 id="prerequisites">Prerequisites</h2>
-<p>Before you begin, you need to have the following tools installed on your system:
-<em> Java 5 or higher; Java 6 recommended
-</em> <a href="">Maven</a> 3.0.2 or later; enforced by the Sling parent
pom</p>
-<p>If you want to set up Eclipse (not required to build Sling) you'll also need the
following installed:
-<em> Eclipse (tested with 3.4.2 and 3.5.x on Win XP, SP3, 3.6.x on Win7, 3.7 on MacOS
X 10.6); just a plain installation of the platform runtime binary and the JDT will be adequate
(you can install the IDE for Java Developers for convenience) 
-</em> M2Eclipse plugin for Eclipse (sonatype) -&gt; <a href="">instructions</a>
-* <a href="">Subversive plugin</a> or [Subclipse-plugin|http://subclipse.tigris.org]
for Eclipse</p>
+<p>Before you begin, you need to have the following tools installed on your system:</p>
+<ul>
+<li>Java 6 or higher; Java 6 recommended</li>
+<li><a href="http://maven.apache.org">Maven</a> 3.0.2 or later; enforced
by the Sling parent pom</li>
+</ul>
+<p>If you want to set up Eclipse (not required to build Sling) you'll also need the
following installed:</p>
+<ul>
+<li>Eclipse (tested with 3.4.2 and 3.5.x on Win XP, SP3, 3.6.x on Win7, 3.7 on MacOS
X 10.6); just a plain installation of the platform runtime binary and the JDT will be adequate
(you can install the IDE for Java Developers for convenience) </li>
+<li>M2Eclipse plugin for Eclipse (sonatype) -&gt; <a href="http://m2eclipse.sonatype.org/installing-m2eclipse.html">instructions</a></li>
+<li><a href="http://www.polarion.com/products/svn/subversive.php">Subversive
plugin</a> or <a href="http://subclipse.tigris.org">Subclipse-plugin</a>
for Eclipse</li>
+</ul>
 <h2 id="environment-setup">Environment Setup</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</h3>
@@ -118,7 +124,7 @@
 </pre></div>
 
 
-<p>For more information see <a href="">SLING-443</a> and [SLING-1782|https://issues.apache.org/jira/browse/SLING-1782].</p>
+<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</h3>
 <ul>
 <li>
@@ -127,9 +133,11 @@
 <p>error=12, Not enough space</p>
 </li>
 </ul>
-<p>This problem is caused by insufficient swap space. When running the integration
tests in the <code>launchpad/testing</code> modules, a process is launched by
calling the <code>exec</code> 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.
-<em> </em>Platform<em> - OpenSolaris
-</em> <em>Fix</em> - If this issue persists you will need to check your
system requirements and configuration with regard to swap, before taking action - if necessary.</p>
+<p>This problem is caused by insufficient swap space. When running the integration
tests in the <code>launchpad/testing</code> modules, a process is launched by
calling the <code>exec</code> 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.</p>
+<ul>
+<li><em>Platform</em> - OpenSolaris</li>
+<li><em>Fix</em> - If this issue persists you will need to check your system
requirements and configuration with regard to swap, before taking action - if necessary.</li>
+</ul>
 <h2 id="configuring-maven">Configuring Maven</h2>
 <p>See <a href="/documentation/development/maventipsandtricks.html">MavenTipsAndTricks</a>.</p>
 <h2 id="getting-the-sling-source">Getting the Sling Source</h2>
@@ -145,14 +153,17 @@
 <p>If you use the Subversive plugin make sure you have installed the "Subversive Integration
for M2Eclipse Project" which can be found under the following Eclipse update site: <a href="">http://community.polarion.com/projects/subversive/download/integrations/update-site/</a>.</p>
 <p>Also, make sure that you have installed either the "Maven SCM handler for Subclipse"
or the "Maven SCM handler for Subversive".</p>
 <h4 id="create-a-new-workspace">Create a new workspace</h4>
-<p>It's best to create a new workspace for the sling project:
-1. Menu: File-&gt;Switch Workspace-&gt;Other...
-1. Enter a path for the new workspace and click OK
-1. When Eclipse has restarted it's time to adjust some configs
-1. Turn off automatic build (Menu: Project-&gt;Build Automatically)
-1. Go to menu: Eclipse-&gt;Preferences, in the preferences dialog select Java -&gt;
Compiler -&gt; Errors/Warnings
-1. Expand the "Deprecated and restricted API" and change "Forbidden references (access rules)"
from "Error" to "Warning"
-1. Click OK</p>
+<p>It's best to create a new workspace for the sling project:</p>
+<ol>
+<li>List item</li>
+<li>Menu: File-&gt;Switch Workspace-&gt;Other...</li>
+<li>Enter a path for the new workspace and click OK</li>
+<li>When Eclipse has restarted it's time to adjust some configs</li>
+<li>Turn off automatic build (Menu: Project-&gt;Build Automatically)</li>
+<li>Go to menu: Eclipse-&gt;Preferences, in the preferences dialog select Java
-&gt; Compiler -&gt; Errors/Warnings</li>
+<li>Expand the "Deprecated and restricted API" and change "Forbidden references (access
rules)" from "Error" to "Warning"</li>
+<li>Click OK</li>
+</ol>
 <h4 id="checkout-the-sling-source">Checkout the Sling source</h4>
 <ol>
 <li>Menu: File-&gt;Import</li>
@@ -162,10 +173,12 @@
 <li>Click Finish</li>
 </ol>
 <p>Eclipse will now start to download the source and import the Maven projects. You
might encounter some "Problem Occured" dialogs about "An internal error...", but just click
OK on those and let Eclipse continue with the import. Be warned: This could take some time
(it was 30 minutes on my laptop)!</p>
-<p>Possibly something in sling-builder might get a bit messed up (I didn't experience
that problem, but Pontus reported it) then you can simply fix it with revert:
-1. In the Project Explorer right-click on the "sling-builder" project and select the Team-&gt;Revert...
menu
-1. A couple of changes will be displayed
-1. Click OK</p>
+<p>Possibly something in sling-builder might get a bit messed up (I didn't experience
that problem, but Pontus reported it) then you can simply fix it with revert:</p>
+<ol>
+<li>In the Project Explorer right-click on the "sling-builder" project and select the
Team-&gt;Revert... menu</li>
+<li>A couple of changes will be displayed</li>
+<li>Click OK</li>
+</ol>
 <h2 id="building-sling">Building Sling</h2>
 <h3 id="with-the-maven-command-line-tool">With the Maven command line tool</h3>
 <ol>
@@ -176,20 +189,26 @@ $ export MAVEN_OPTS="-Xmx256m -XX:MaxPer
 $ 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).
-1. Enter the <code>launchpad/builder</code> directory and launch Sling for the
first time</p>
-<div class="codehilite"><pre><span class="nv">$</span> <span class="nv">cd</span>
<span class="n">launchpad</span><span class="o">/</span><span class="n">builder</span>
-<span class="nv">$</span> <span class="nv">java</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="o">.</span><span class="n">apache</span><span
class="o">.</span><span class="n">sling</span><span class="o">.</span><span
class="n">launchpad</span><span class="o">-*-</span><span class="n">standalone</span><span
class="o">.</span><span class="n">jar</span> <span class="o">-</span><span
class="n">c</span> <span class="n">test</span> <span class="o">-</span><span
class="n">f</span> <span class="o">-</span>
-</pre></div>
-
+<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
+$ java -jar target/org.apache.sling.launchpad-*-standalone.jar -c test -f -</p>
+</li>
+</ol>
+<div class="note">
+When starting Sling inside the `launchpad/builder` folder you should not use the default
Sling Home folder name `sling` because this folder is removed when running `mvn clean`.
+</div>
 
-<p>{note}
-When starting Sling inside the <code>launchpad/builder</code> folder you should
not use the default Sling Home folder name <code>sling</code> because this folder
is removed when running <code>mvn clean</code>.
-{note}</p>
-<p>Messages should now be printed to the console which is being used as the "log file";
the <code>\-f</code> command line option is set to <code>\-</code>,
indicating the use of standard output as the log file. The <code>\-c sling</code>
command line option instructs Sling to use the <code>sling</code> 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 <a href="/documentation/configuration.html">Configuration</a>
for more information). 
-Use the <code>-h</code> option to see the list of flags and options.
-After all messages have been printed you should be able to open the Sling Management Console
by pointing your web browser at <code>[http://localhost:8080/system/console]()</code>.
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.
-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>
+<p>Messages should now be printed to the console which is being used as the "log file";</p>
+<ul>
+<li>the <code>-f</code> command line option is set to <code>-</code>,
indicating the use of standard output as the log file. </li>
+<li>the <code>-c sling</code> command line option instructs Sling to use
the <code>sling</code> 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 <a href="/documentation/configuration.html">Configuration</a> for more information).
</li>
+<li>Use the <code>-h</code> option to see the list of flags and options.</li>
+</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>
 <h3 id="with-m2eclipse">With M2Eclipse</h3>
 <ol>
 <li>Make sure you're in the Java perspective (Menu: Window-&gt;Open Perspective)</li>
@@ -204,11 +223,13 @@ To stop Sling, just hit <code>Ctrl-C</co
 <li>Click Run</li>
 </ol>
 <h3 id="alternative-setup-in-eclipse-without-m2eclipse-plugin">Alternative setup in
Eclipse without M2Eclipse plugin</h3>
-<p>In the case that you do not want to use the M2Eclipse plugin there's another setup
that lets you have the automatic build turned on:
-1. Checkout the whole sling trunk (with subversive or the subclipse plugin) from SVN to a
single project
-1. Then manually add all <code>src/main/java</code> and <code>src/test/java</code>
of the bundles to the project as source folders
-1. Add all required libraries to the build path
-1. Now you can build either in Eclipse or even better use "mvn clean install" on the command
line</p>
+<p>In the case that you do not want to use the M2Eclipse plugin there's another setup
that lets you have the automatic build turned on:</p>
+<ol>
+<li>Checkout the whole sling trunk (with subversive or the subclipse plugin) from SVN
to a single project</li>
+<li>Then manually add all <code>src/main/java</code> and <code>src/test/java</code>
of the bundles to the project as source folders</li>
+<li>Add all required libraries to the build path</li>
+<li>Now you can build either in Eclipse or even better use "mvn clean install" on the
command line</li>
+</ol>
 <p>If you use "mvn clean install" to build Sling be sure you have set MAVEN_OPTS to
"-Xmx384m -XX:PermSize=256m" otherwise you will probably get OutOfmemory errors.</p>
 <p>Congratulations ! You should now have a running Sling instance, that you can start
playing around with.</p>
 <h2 id="further-tips-and-tricks">Further Tips and Tricks</h2>
@@ -240,18 +261,20 @@ To stop Sling, just hit <code>Ctrl-C</co
 
 
 <p>The tests will automatically pause and await a remote debugger on port 5005. You
can then attach to the running tests using Eclipse. You can setup a "Remote Java Application"
launch configuration via the menu command "Run" &gt; "Open Debug Dialog..." (see above).
-For more information on this see the <a href="">Maven Surefire Docu</a>.</p>
+For more information on this see the <a href="http://maven.apache.org/plugins/maven-surefire-plugin/examples/debugging.html">Maven
Surefire Docu</a>.</p>
 <h3 id="simple-way-to-develop-new-bundle-in-eclipse-for-sling">Simple way to develop
new bundle in Eclipse for Sling</h3>
-<p>The easiest way that I found is to create a new folder in the existing Eclipse workspace.
After that you can follow these steps:
-<em> Start by copying and adapting an existing Sling pom.xml (eg. the pom.xml from
the espblog sample)
-</em> Generate the Eclipse project files using mvn eclipse:eclipse
-<em> Choose File/Import in Eclipse and select "Existing projects into workspace"
-</em> Now you can create, edit and compile the files in Eclipse
-<em> To create the bundle jar and install it, just use the command line "mvn clean
install" in the project directory
-</em> If you have a running Sling app you can install the bundle from the command line
with "mvn -P autoInstallBundle clean install -Dsling.url=<a href="">http://localhost:8080/system/console</a>"</p>
+<p>The easiest way that I found is to create a new folder in the existing Eclipse workspace.
After that you can follow these steps:</p>
+<ul>
+<li>Start by copying and adapting an existing Sling pom.xml (eg. the pom.xml from the
espblog sample)</li>
+<li>Generate the Eclipse project files using mvn eclipse:eclipse</li>
+<li>Choose File/Import in Eclipse and select "Existing projects into workspace"</li>
+<li>Now you can create, edit and compile the files in Eclipse</li>
+<li>To create the bundle jar and install it, just use the command line "mvn clean install"
in the project directory</li>
+<li>If you have a running Sling app you can install the bundle from the command line
with "mvn -P autoInstallBundle clean install -Dsling.url=<a href="">http://localhost:8080/system/console</a>"</li>
+</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. 1341376 by fmeschbe on Tue, 22 May 2012 09:41:06 +0000
+        Rev. 1436439 by ieb on Mon, 21 Jan 2013 16:06:06 +0000
       </div>
       <div class="trademarkFooter"> 
         Apache Sling, Sling, Apache, the Apache feather logo, and the Apache Sling project



Mime
View raw message