incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fmesc...@apache.org
Subject svn commit: r734113 [5/6] - in /incubator/sling/whiteboard/fmeschbe/launchpad: ./ app/ app/src/ app/src/main/ app/src/main/assembly/ app/src/main/dist/ app/src/main/dist/bin/ app/src/main/dist/dos/ app/src/main/dist/unix/ app/src/main/java/ app/src/mai...
Date Tue, 13 Jan 2009 12:06:20 GMT
Added: incubator/sling/whiteboard/fmeschbe/launchpad/base/src/main/resources/sling.properties
URL: http://svn.apache.org/viewvc/incubator/sling/whiteboard/fmeschbe/launchpad/base/src/main/resources/sling.properties?rev=734113&view=auto
==============================================================================
--- incubator/sling/whiteboard/fmeschbe/launchpad/base/src/main/resources/sling.properties (added)
+++ incubator/sling/whiteboard/fmeschbe/launchpad/base/src/main/resources/sling.properties Tue Jan 13 04:04:51 2009
@@ -0,0 +1,190 @@
+#
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you under the Apache License, Version 2.0 (the
+#  "License"); you may not use this file except in compliance
+#  with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing,
+#  software distributed under the License is distributed on an
+#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+#  KIND, either express or implied.  See the License for the
+#  specific language governing permissions and limitations
+#  under the License.
+#
+
+# The file contains default configuration for various framework settings. All
+# settings configured here may be ammended or overwritten either using the
+# FrameworkLauncherServlet.loadPropertiesOverride() method or web application
+# initialization paramneters.
+#
+# Property values may contain references to other properties using the standard
+# ${<prop-name>} syntax.
+
+#
+# Default home directory ("sling"). It is expected for this property to be
+# overwritten by the "sling.home" init-param of the web application.
+sling.home = sling
+
+#
+# Default sling.context. The name of the default sling.context to use in the
+# sling application. This value is mainly used to create default configurations
+# for factory services and will be used to set the "sling.context" configuration
+# property of such generated configurations.
+sling.context.default = default
+
+#
+# The name of the JCR repository. Default is "jackrabbit".
+# sling.repository.name = 
+
+#
+# The JCR repository home directory. Default is sling.home/sling.repository.name.
+# sling.repository.home = 
+
+#
+# The JCR repository url config file (repository.xml). Default is repository.xml in
+# bundle Embedded JCR Repository
+# sling.repository.config.file.url = 
+
+
+#
+# List of packages to append to the org.osgi.framework.system.packages property
+# NOTE: If this is set, it must start with a comma !
+# org.apache.sling.launcher.system.packages
+
+
+#
+# List of packages to append to the org.osgi.framework.bootdelegation property
+# NOTE: If this is set, it must start with a comma !
+# org.apache.sling.launcher.bootdelegation
+
+
+#
+# Include properties to install additional assemblies such as CRX support
+# Core Sling etc.
+sling.include.install = sling_install.properties
+
+
+#
+# Default Logging Configuration (see org.apache.sling.commons.log Bundle documentation)
+# org.apache.sling.commons.log.intialize = true
+org.apache.sling.commons.log.level = INFO
+org.apache.sling.commons.log.file = ${sling.home}/logs/error.log
+org.apache.sling.commons.log.file.number = 5
+org.apache.sling.commons.log.file.size = 10mb
+# org.apache.sling.commons.log.url = URL to logger configuration file
+
+
+#
+# To enable the current server side debugging in the Rhino interpreter
+# set the org.apache.sling.scripting.javascript.debug property to true.
+# This will open a Swing window for Rhino JavaScript debugging on the
+# server platform. Not setting this property or setting it to anything
+# but true will disable this server-side debugger.
+# org.apache.sling.scripting.javascript.debug = false
+
+# Logging configuration for the SCR (if installed)
+ds.loglevel = ${org.apache.sling.commons.log.level}
+
+#
+# Space separated list of URLs to the OSGi Bundle Repository files. If this
+# is left empty, the default value of "http://oscar-osgi.sf.net/obr2/repository.xml"
+# is assumed.
+# (see org.apache.felix.bundlerepository Bundle documentation)
+# obr.repository.url = http://some.host.com/path/repository.xml
+
+#
+# Felix Configuration Admin File Persistence Configuration file directory
+felix.cm.dir = ${sling.home}/config
+
+#
+# Felix Framework profile directory. This is by default the "felix" directory
+# below the application home directory.
+felix.cache.profiledir = ${sling.home}/felix
+
+ 
+#
+# Default initial Framework start level 
+felix.startlevel.framework=30
+
+
+#
+# Default start level for newly installed bundles not explicitly assigned
+# a start level
+felix.startlevel.bundle=20
+
+# Disable Felix URL handlers (see #FELIX-748)
+felix.service.urlhandlers=false
+
+#
+# Include JRE package list
+sling.include.jre = jre-${java.specification.version}.properties
+
+
+#
+# Framework system packages to be visible
+org.osgi.framework.system.packages= \
+ ${osgi-core-packages}, \
+ ${osgi-compendium-services}, \
+ ${jre-${java.specification.version}} \
+ ${org.apache.sling.launcher.system.packages}
+
+
+# Boot delegation packages never included anywhere (usually sun.*,com.sun.*)
+# We include com.yourkit here to allow profiling the servlet container in
+# which the web app is running
+# sun.* and/or com.sun.* may be included if there is code which - violating
+# specs by Sun - directly calls into these packages.
+# org.osgi.framework.bootdelegation=sun.*,com.sun.*
+org.osgi.framework.bootdelegation=com.yourkit.* \
+ ${org.apache.sling.launcher.bootdelegation}
+
+
+#
+# Package Specifications for org.osgi.framework.system.packages
+#    osgi-core-packages       : OSGi Core Specification packages
+#    osgi-compendium-services : OSGi Compendium Specification packages
+#    
+
+osgi-core-packages= \
+ org.osgi.framework; version=1.4.0, \
+ org.osgi.service.condpermadmin; version=1.0.0, \
+ org.osgi.service.packageadmin; version=1.2.0, \
+ org.osgi.service.permissionadmin; version=1.2.0, \
+ org.osgi.service.startlevel; version=1.1.0, \
+ org.osgi.service.url; version=1.0.0
+
+osgi-compendium-services= \
+ org.osgi.service.log; version=1.3, \
+ org.osgi.service.http; version=1.2, \
+ org.osgi.service.device; version=1.1, \
+ org.osgi.service.cm; version=1.2, \
+ org.osgi.service.metatype; version=1.1, \
+ org.osgi.service.prefs; version=1.1, \
+ org.osgi.service.useradmin; version=1.1, \
+ org.osgi.service.wireadmin; version=1.0, \
+ org.osgi.service.io; version=1.0, \
+ org.osgi.service.provisioning; version=1.1, \
+ org.osgi.service.upnp; version=1.1, \
+ org.osgi.service.component; version=1.0, \
+ org.osgi.service.event; version=1.1, \
+ org.osgi.service.deploymentadmin; version=1.0, \
+ org.osgi.service.deploymentadmin.spi; version=1.0, \
+ org.osgi.service.application; version=1.0, \
+ info.dmtree; version=1.0, \
+ info.dmtree.notification; version=1.0, \
+ info.dmtree.notification.spi; version=1.0, \
+ info.dmtree.registry; version=1.0, \
+ info.dmtree.security; version=1.0, \
+ info.dmtree.spi; version=1.0, \
+ org.osgi.service.monitor; version=1.0, \
+ org.osgi.application; version=1.0, \
+ org.osgi.util.tracker; version=1.3.2, \
+ org.osgi.util.xml; version=1.0, \
+ org.osgi.util.position; version=1.0, \
+ org.osgi.util.measurement; version=1.0
+ 

Propchange: incubator/sling/whiteboard/fmeschbe/launchpad/base/src/main/resources/sling.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/sling/whiteboard/fmeschbe/launchpad/webapp/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Tue Jan 13 04:04:51 2009
@@ -0,0 +1,5 @@
+.project
+.classpath
+.settings
+target
+sling

Added: incubator/sling/whiteboard/fmeschbe/launchpad/webapp/LICENSE
URL: http://svn.apache.org/viewvc/incubator/sling/whiteboard/fmeschbe/launchpad/webapp/LICENSE?rev=734113&view=auto
==============================================================================
--- incubator/sling/whiteboard/fmeschbe/launchpad/webapp/LICENSE (added)
+++ incubator/sling/whiteboard/fmeschbe/launchpad/webapp/LICENSE Tue Jan 13 04:04:51 2009
@@ -0,0 +1,202 @@
+
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.

Added: incubator/sling/whiteboard/fmeschbe/launchpad/webapp/NOTICE
URL: http://svn.apache.org/viewvc/incubator/sling/whiteboard/fmeschbe/launchpad/webapp/NOTICE?rev=734113&view=auto
==============================================================================
--- incubator/sling/whiteboard/fmeschbe/launchpad/webapp/NOTICE (added)
+++ incubator/sling/whiteboard/fmeschbe/launchpad/webapp/NOTICE Tue Jan 13 04:04:51 2009
@@ -0,0 +1,8 @@
+Apache Sling Launchpad Webapp
+Copyright 2008-2009 The Apache Software Foundation
+
+Apache Sling is based on source code originally developed 
+by Day Software (http://www.day.com/).
+
+This product includes software developed at
+The Apache Software Foundation (http://www.apache.org/).

Added: incubator/sling/whiteboard/fmeschbe/launchpad/webapp/README.txt
URL: http://svn.apache.org/viewvc/incubator/sling/whiteboard/fmeschbe/launchpad/webapp/README.txt?rev=734113&view=auto
==============================================================================
--- incubator/sling/whiteboard/fmeschbe/launchpad/webapp/README.txt (added)
+++ incubator/sling/whiteboard/fmeschbe/launchpad/webapp/README.txt Tue Jan 13 04:04:51 2009
@@ -0,0 +1,71 @@
+Apache Sling Launchpad Webapp
+
+This webapp contains the necessary bundles to run launchpad.
+
+See also the "Discover Sling in 15 minutes" page at
+http://incubator.apache.org/sling/site/discover-sling-in-15-minutes.html
+
+
+Disclaimer
+==========
+Apache Sling is an effort undergoing incubation at The Apache Software Foundation (ASF),
+sponsored by the Apache Jackrabbit PMC. Incubation is required of all newly accepted
+projects until a further review indicates that the infrastructure, communications,
+and decision making process have stabilized in a manner consistent with other
+successful ASF projects. While incubation status is not necessarily a reflection of
+the completeness or stability of the code, it does indicate that the project has yet
+to be fully endorsed by the ASF.
+
+Getting Started
+===============
+
+This component uses a Maven 2 (http://maven.apache.org/) build
+environment. It requires a Java 5 JDK (or higher) and Maven (http://maven.apache.org/)
+2.0.7 or later. We recommend to use the latest Maven version.
+
+If you have Maven 2 installed, you can compile and
+package the jar using the following command:
+
+    mvn package
+
+See the Maven 2 documentation for other build features.
+
+The latest source code for this component is available in the
+Subversion (http://subversion.tigris.org/) source repository of
+the Apache Software Foundation. If you have Subversion installed,
+you can checkout the latest source using the following command:
+
+    svn checkout http://svn.apache.org/repos/asf/incubator/sling/trunk/launchpad/webapp
+
+See the Subversion documentation for other source control features.
+
+
+How to run this
+---------------
+
+1) Build all Sling bundles
+
+  cd <top of the Sling source code tree>
+  mvn clean install
+  
+2) Build and run this
+
+  cd launchpad/webapp
+  mvn clean package jetty:run
+  
+Once the webapp starts, http://localhost:8888/system/console should display the Felix
+OSGi console.
+
+3) Test node creation and display
+To create a node with curl:
+
+	 curl -D - -Ftitle=something http://admin:admin@localhost:8888/testing/this
+	 
+Then, http://admin:admin@localhost:8888/testing/this should display a default HTML
+representation, including the value of the "title" property.
+
+Add a txt or json extension to see other output formats.
+
+For more info see the Sling website at http://incubator.apache.org/sling, and the
+"Sling in 15 minutes" tutorial 
+at http://incubator.apache.org/sling/site/discover-sling-in-15-minutes.html
\ No newline at end of file

Propchange: incubator/sling/whiteboard/fmeschbe/launchpad/webapp/README.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/sling/whiteboard/fmeschbe/launchpad/webapp/pom.xml
URL: http://svn.apache.org/viewvc/incubator/sling/whiteboard/fmeschbe/launchpad/webapp/pom.xml?rev=734113&view=auto
==============================================================================
--- incubator/sling/whiteboard/fmeschbe/launchpad/webapp/pom.xml (added)
+++ incubator/sling/whiteboard/fmeschbe/launchpad/webapp/pom.xml Tue Jan 13 04:04:51 2009
@@ -0,0 +1,254 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+    
+    http://www.apache.org/licenses/LICENSE-2.0
+    
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.apache.sling</groupId>
+        <artifactId>sling</artifactId>
+        <version>5-incubator-SNAPSHOT</version>
+        <relativePath>../../parent/pom.xml</relativePath>
+    </parent>
+
+    <artifactId>org.apache.sling.launchpad.webapp</artifactId>
+    <packaging>war</packaging>
+    <version>5-incubator-SNAPSHOT</version>
+
+    <name>Sling - Launchpad Web Application</name>
+    <description>
+        The launchpad webapp packages the standard launchpad components
+        in a Sling web application. See SLING-149.
+    </description>
+
+    <scm>
+        <connection>scm:svn:http://svn.apache.org/repos/asf/incubator/sling/trunk/launchpad/webapp</connection>
+        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/incubator/sling/trunk/launchpad/webapp</developerConnection>
+        <url>http://svn.apache.org/viewvc/incubator/sling/trunk/launchpad/webapp</url>
+    </scm>
+
+    <properties>
+        <!--
+            Jetty default port (override with -D)
+        -->
+        <http.port>8888</http.port>
+        
+        <!-- path suffix for HTTP access to Sling -->
+        <http.base.path />
+
+        <!-- path suffix for WebDAV access to the repository -->
+        <webdav.workspace.path />
+
+        <!-- hostname for integration tests -->
+        <test.host>localhost</test.host>
+
+        <!--
+            Disable Jetty webapp rescan (override with -D) 
+        -->
+        <jetty.scan.interval.seconds>0</jetty.scan.interval.seconds>
+
+        <!-- 
+            Sling home directory when starting with jetty:run
+        -->
+        <jetty.sling.home>target/sling</jetty.sling.home>
+
+    </properties>
+
+    <build>
+        <plugins>
+
+            <plugin>
+                <groupId>org.mortbay.jetty</groupId>
+                <artifactId>maven-jetty-plugin</artifactId>
+                <version>6.1.5</version>
+                <configuration>
+                    <contextPath>/</contextPath>
+                    <scanIntervalSeconds>
+                        ${jetty.scan.interval.seconds}
+                    </scanIntervalSeconds>
+
+                    <systemProperties>
+                        <systemProperty>
+                            <name>sling.home</name>
+                            <value>${jetty.sling.home}</value>
+                        </systemProperty>
+                    </systemProperties>
+
+                    <connectors>
+                        <connector implementation="org.mortbay.jetty.nio.SelectChannelConnector">
+                            <port>${http.port}</port>
+                            <maxIdleTime>60000</maxIdleTime>
+                        </connector>
+                    </connectors>
+
+                    <!-- 
+                        Use target/... as the webapp source, as we unpack stuff there from the
+                        Sling launcher modules
+                    -->
+                    <webAppSourceDirectory>
+                        target/${artifactId}-${pom.version}
+                    </webAppSourceDirectory>
+                </configuration>
+            </plugin>
+
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-dependency-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <!-- Unpack the sling-app launcher for inclusion in the web app -->
+                        <id>unpack-dependencies</id>
+                        <goals>
+                            <goal>unpack-dependencies</goal>
+                        </goals>
+                        <configuration>
+                            <includeArtifactIds>
+                                org.apache.sling.launchpad.app
+                            </includeArtifactIds>
+                            <excludeTransitive>true</excludeTransitive>
+                            <outputDirectory>
+                                ${project.build.directory}/launchpad-app
+                            </outputDirectory>
+                            <overWriteReleases>false</overWriteReleases>
+                            <overWriteSnapshots>
+                                true
+                            </overWriteSnapshots>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+
+            <!-- Include sling-webapp launcher classes and resources -->
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-war-plugin</artifactId>
+                <configuration>
+                    <webResources>
+                        <!-- the classes (except unneeded Main) -->
+                        <resource>
+                            <directory>
+                                ${basedir}/target/launchpad-app
+                            </directory>
+                            <targetPath>WEB-INF/classes</targetPath>
+                            <excludes>
+                                <exclude>
+                                    org/apache/sling/launcher/app/main/**
+                                </exclude>
+                            </excludes>
+                            <includes>
+                                <include>org/**</include>
+                                <include>info/**</include>
+                            </includes>
+                        </resource>
+                        <!-- the configuration resources -->
+                        <resource>
+                            <directory>
+                                ${basedir}/target/launchpad-app
+                            </directory>
+                            <targetPath>WEB-INF</targetPath>
+                            <includes>
+                                <include>resources/**</include>
+                                <include>sling.properties</include>
+                                <include>sling_install.properties</include>
+                                <include>jre-*.properties</include>
+                            </includes>
+                            <excludes>
+                                <exclude>
+                                    resources/*/org.apache.felix.http.jetty*.jar
+                                </exclude>
+                                <exclude>
+                                    resources/*/pax-web-service*.jar
+                                </exclude>
+                            </excludes>
+                        </resource>
+                        <!-- selected WEB-INF resources -->
+                        <resource>
+                            <directory>
+                                ${basedir}/target/launchpad-app
+                            </directory>
+                            <targetPath>/</targetPath>
+                            <includes>
+                                <include>WEB-INF/jcr-client.properties</include>
+                            </includes>
+                        </resource>
+                        <!-- Legal stuff -->
+                        <resource>
+                            <directory>${basedir}</directory>
+                            <targetPath>META-INF</targetPath>
+                            <includes>
+                                <include>LICENSE*</include>
+                                <include>NOTICE*</include>
+                                <include>DISCLAIMER</include>
+                            </includes>
+                        </resource>
+                    </webResources>
+                </configuration>
+            </plugin>
+
+            <plugin>
+                <artifactId>maven-assembly-plugin</artifactId>
+                <configuration>
+                    <descriptors>
+                        <descriptor>src/main/assembly/bin.xml</descriptor>
+                    </descriptors>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+    <reporting>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-javadoc-plugin</artifactId>
+                <configuration>
+                  <!-- No javadocs -->
+                    <excludePackageNames>
+                        org.apache.sling
+                    </excludePackageNames>
+                </configuration>
+            </plugin>
+        </plugins>
+    </reporting>
+
+    <dependencies>
+        <!--
+        <dependency>
+            <groupId>org.apache.sling</groupId>
+            <artifactId>org.apache.sling.launchpad.base</artifactId>
+            <version>2.0.3-incubator-SNAPSHOT</version>
+            <classifier>shared</classifier>
+            <scope>provided</scope>
+        </dependency>
+        -->
+        <dependency>
+            <groupId>javax.servlet</groupId>
+            <artifactId>servlet-api</artifactId>
+            <version>2.5</version>
+            <scope>provided</scope>
+        </dependency>
+        
+        <dependency>
+            <groupId>org.apache.sling</groupId>
+            <artifactId>org.apache.sling.launchpad.app</artifactId>
+            <version>5-incubator-SNAPSHOT</version>
+            <scope>provided</scope>
+            <optional>true</optional>
+        </dependency>
+    </dependencies>
+</project>

Propchange: incubator/sling/whiteboard/fmeschbe/launchpad/webapp/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/sling/whiteboard/fmeschbe/launchpad/webapp/src/main/assembly/bin.xml
URL: http://svn.apache.org/viewvc/incubator/sling/whiteboard/fmeschbe/launchpad/webapp/src/main/assembly/bin.xml?rev=734113&view=auto
==============================================================================
--- incubator/sling/whiteboard/fmeschbe/launchpad/webapp/src/main/assembly/bin.xml (added)
+++ incubator/sling/whiteboard/fmeschbe/launchpad/webapp/src/main/assembly/bin.xml Tue Jan 13 04:04:51 2009
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+    
+    http://www.apache.org/licenses/LICENSE-2.0
+    
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+-->
+<assembly>
+  <id>bin</id>
+  <formats>
+    <format>tar.gz</format>
+    <format>zip</format>
+  </formats>
+  <fileSets>
+    <fileSet>
+      <includes>
+        <include>README*</include>
+      </includes>
+    </fileSet>
+    <fileSet>
+      <directory>src/main/resources/META-INF</directory>
+      <outputDirectory></outputDirectory>
+      <includes>
+        <include>LICENSE*</include>
+        <include>NOTICE*</include>
+        <include>DISCLAIMER</include>
+      </includes>
+    </fileSet>
+    <fileSet>
+      <directory>target</directory>
+      <outputDirectory></outputDirectory>
+      <includes>
+        <include>*.jar</include>
+        <include>*.war</include>
+      </includes>
+    </fileSet>
+  </fileSets>
+</assembly>
\ No newline at end of file

Propchange: incubator/sling/whiteboard/fmeschbe/launchpad/webapp/src/main/assembly/bin.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/sling/whiteboard/fmeschbe/launchpad/webapp/src/main/java/org/apache/sling/launchpad/webapp/SlingServlet.java
URL: http://svn.apache.org/viewvc/incubator/sling/whiteboard/fmeschbe/launchpad/webapp/src/main/java/org/apache/sling/launchpad/webapp/SlingServlet.java?rev=734113&view=auto
==============================================================================
--- incubator/sling/whiteboard/fmeschbe/launchpad/webapp/src/main/java/org/apache/sling/launchpad/webapp/SlingServlet.java (added)
+++ incubator/sling/whiteboard/fmeschbe/launchpad/webapp/src/main/java/org/apache/sling/launchpad/webapp/SlingServlet.java Tue Jan 13 04:04:51 2009
@@ -0,0 +1,301 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.sling.launchpad.webapp;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import javax.servlet.GenericServlet;
+import javax.servlet.Servlet;
+import javax.servlet.ServletException;
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.sling.launchpad.base.shared.Launcher;
+import org.apache.sling.launchpad.base.shared.Loader;
+import org.apache.sling.launchpad.base.shared.Notifiable;
+
+public class SlingServlet extends GenericServlet implements Notifiable {
+
+    private static final String SLING_HOME = "sling.home";
+
+    /**
+     * The number times Sling will be tried to be started before giving up
+     * (value is 20). This number is chosen deliberately as generally Sling
+     * should start up smoothly. Whether any bundles within Sling start or not
+     * is not counted here.
+     */
+    private static final int MAX_START_FAILURES = 20;
+
+    private String slingHome;
+
+    private Servlet sling;
+
+    /**
+     * Field managed by the {@link #startSling(String)} method to indicate
+     * whether Sling is in the process of being started.
+     */
+    private Thread startingSling;
+
+    /**
+     * Counter to count the number of failed startups. After this number
+     * expires, the SlingServlet will not try to start Sling any more.
+     */
+    private int startFailureCounter = 0;
+
+    public void init() throws ServletException {
+
+        slingHome = getSlingHome(null);
+
+        if (slingHome != null) {
+            startSling();
+        } else {
+            log("Sling cannot be started yet, because sling.home is not defined yet");
+        }
+
+        log("Servlet " + getServletName() + " initialized");
+
+        /*
+         * // TODO: setup class loader ! ClassLoader loader = new
+         * URLClassLoader(new URL[0], getClass().getClassLoader()); try { Object
+         * tmp =
+         * loader.loadClass("org.apache.sling.launcher.webapp.SlingServlet"); if
+         * (tmp instanceof Servlet) { Servlet tmpServlet = (Servlet) tmp;
+         * tmpServlet.init(getServletConfig()); sling = tmpServlet; } } catch
+         * (ServletException se) { throw se; } catch (Throwable t) {
+         * config.getServletContext().log("Cannot create actual Servlet", t);
+         * throw new UnavailableException("Cannot create actual Servlet"); }
+         */
+    }
+
+    public String getServletInfo() {
+        if (sling != null) {
+            return sling.getServletInfo();
+        }
+
+        return "Sling Launchpad Proxy";
+    }
+
+    public void service(ServletRequest req, ServletResponse res)
+            throws ServletException, IOException {
+
+        // delegate the request to the registered delegatee servlet
+        Servlet delegatee = sling;
+        if (delegatee != null) {
+
+            delegatee.service(req, res);
+
+        } else if (startFailureCounter > MAX_START_FAILURES) {
+
+            // too many startup retries, fail for ever
+            ((HttpServletResponse) res).sendError(HttpServletResponse.SC_NOT_FOUND);
+
+        } else {
+
+            startSling(req);
+
+            ((HttpServletResponse) res).sendError(
+                HttpServletResponse.SC_SERVICE_UNAVAILABLE,
+                "Sling is currently starting up, please try again");
+        }
+    }
+
+    public void destroy() {
+        if (sling != null) {
+            sling.destroy();
+        }
+    }
+
+    // -----
+
+    private void startSling(final ServletRequest request) {
+        if (startingSling == null) {
+            slingHome = getSlingHome((HttpServletRequest) request);
+            Thread starter = new Thread("SlingStarter_"
+                + System.currentTimeMillis()) {
+                @Override
+                public void run() {
+                    startSling();
+                }
+            };
+
+            starter.setDaemon(true);
+            starter.start();
+        }
+    }
+
+    private void startSling() {
+        try {
+            URL launcherJar = getServletContext().getResource(
+                Loader.DEFAULT_SLING_LAUNCHER_JAR);
+            if (launcherJar == null) {
+                launcherJar = getServletContext().getResource(
+                    "/WEB-INF/" + Loader.DEFAULT_SLING_LAUNCHER_JAR);
+            }
+
+            startSling(launcherJar);
+        } catch (MalformedURLException mue) {
+            // TODO: handle ...
+        }
+    }
+
+    private void startSling(URL launcherJar) {
+        synchronized (this) {
+            if (sling != null) {
+                log("Sling already started, nothing to do");
+                return;
+            } else if (startingSling != null) {
+                log("Sling being started by Thread " + startingSling);
+                return;
+            }
+
+            startingSling = Thread.currentThread();
+        }
+
+        if (launcherJar != null) {
+            try {
+                Loader.installLauncherJar(launcherJar, slingHome);
+            } catch (IOException ioe) {
+                // TODO:LOG
+            }
+        }
+
+        Object object = Loader.loadLauncher(Loader.DEFAULT_SLING_SERVLET,
+            slingHome);
+        if (object instanceof Servlet) {
+            Servlet sling = (Servlet) object;
+
+            if (sling instanceof Launcher) {
+                Launcher slingLauncher = (Launcher) sling;
+                slingLauncher.setNotifiable(this);
+                slingLauncher.setSlingHome(slingHome);
+            }
+
+            try {
+                sling.init(getServletConfig());
+                this.sling = sling;
+
+            } catch (ServletException se) {
+                Throwable cause = se.getCause();
+                if (cause == null) {
+                    cause = se;
+                }
+
+                log("Failed to start Sling in " + slingHome, cause);
+                startFailureCounter++;
+            }
+        }
+
+        // reset the starting flag
+        synchronized (this) {
+            startingSling = null;
+        }
+    }
+
+    public void stopped() {
+        /**
+         * This method is called if the framework is stopped from within by
+         * calling stop on the system bundle or if the framework is stopped
+         * because the VM is going down and the shutdown hook has initated the
+         * shutdown In any case we ensure the reference to the framework is
+         * removed and remove the shutdown hook (but don't care if that fails).
+         */
+
+        System.out.println("Sling has been stopped");
+
+        // clear the reference to the framework
+        sling = null;
+    }
+
+    public void updated(File updateFile) {
+        
+        // drop the sling reference to be able to restart
+        synchronized (this) {
+            if (startingSling == null) {
+                sling = null;
+            }
+        }
+        
+        if (updateFile == null) {
+
+            System.out.println("Restarting ....");
+            startSling((URL) null);
+
+        } else {
+
+            System.out.println("Sling has been updated with " + updateFile);
+            try {
+                startSling(updateFile.toURL());
+            } catch (MalformedURLException mue) {
+                // TODO: Shout !
+            } finally {
+                updateFile.delete();
+            }
+
+        }
+    }
+
+    protected String getSlingHome(HttpServletRequest request) {
+
+        // 1. servlet config parameter
+        String slingHome = getServletConfig().getInitParameter(SLING_HOME);
+        if (slingHome == null) {
+
+            // 2. servlet context parameter
+            slingHome = getServletContext().getInitParameter(SLING_HOME);
+            if (slingHome == null) {
+
+                // 3. servlet context path (Servlet API 2.5 and later)
+                try {
+                    String contextPath = getServletContext().getContextPath();
+                    slingHome = toSlingHome(contextPath);
+                } catch (NoSuchMethodError nsme) {
+
+                    // 4.servlet context path (Servlet API 2.4 and earlier)
+                    if (request != null) {
+                        String contextPath = request.getContextPath();
+                        slingHome = toSlingHome(contextPath);
+
+                    } else {
+
+                        // TODO: log < 2.5 API and require request for this
+
+                    }
+                }
+
+            }
+        }
+
+        return slingHome;
+    }
+
+    protected String toSlingHome(String contextPath) {
+        String prefix = "sling/";
+        if (contextPath == null || contextPath.length() == 0) {
+            return prefix + "_";
+        }
+
+        return prefix + contextPath.replace('/', '_');
+    }
+
+}

Propchange: incubator/sling/whiteboard/fmeschbe/launchpad/webapp/src/main/java/org/apache/sling/launchpad/webapp/SlingServlet.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/sling/whiteboard/fmeschbe/launchpad/webapp/src/main/java/org/apache/sling/launchpad/webapp/SlingServlet.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision Rev Url

Added: incubator/sling/whiteboard/fmeschbe/launchpad/webapp/src/main/webapp/WEB-INF/DISCLAIMER
URL: http://svn.apache.org/viewvc/incubator/sling/whiteboard/fmeschbe/launchpad/webapp/src/main/webapp/WEB-INF/DISCLAIMER?rev=734113&view=auto
==============================================================================
--- incubator/sling/whiteboard/fmeschbe/launchpad/webapp/src/main/webapp/WEB-INF/DISCLAIMER (added)
+++ incubator/sling/whiteboard/fmeschbe/launchpad/webapp/src/main/webapp/WEB-INF/DISCLAIMER Tue Jan 13 04:04:51 2009
@@ -0,0 +1,7 @@
+Apache Sling is an effort undergoing incubation at The Apache Software Foundation (ASF),
+sponsored by the Apache Jackrabbit PMC. Incubation is required of all newly accepted
+projects until a further review indicates that the infrastructure, communications,
+and decision making process have stabilized in a manner consistent with other
+successful ASF projects. While incubation status is not necessarily a reflection of
+the completeness or stability of the code, it does indicate that the project has yet
+to be fully endorsed by the ASF.
\ No newline at end of file



Mime
View raw message