incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r761187 - in /incubator/sling/trunk/contrib: ./ jcr/compiler/ jcr/compiler/src/ jcr/compiler/src/main/ jcr/compiler/src/main/java/ jcr/compiler/src/main/java/org/ jcr/compiler/src/main/java/org/apache/ jcr/compiler/src/main/java/org/apache/...
Date Thu, 02 Apr 2009 07:03:40 GMT
Author: cziegeler
Date: Thu Apr  2 07:03:39 2009
New Revision: 761187

URL: http://svn.apache.org/viewvc?rev=761187&view=rev
Log:
SLING-886 : Add new JCR Java compiler bundle - apply patch from Stefan Guggisberg.

Added:
    incubator/sling/trunk/contrib/jcr/compiler/
    incubator/sling/trunk/contrib/jcr/compiler/LICENSE   (with props)
    incubator/sling/trunk/contrib/jcr/compiler/NOTICE   (with props)
    incubator/sling/trunk/contrib/jcr/compiler/README.txt   (with props)
    incubator/sling/trunk/contrib/jcr/compiler/pom.xml   (with props)
    incubator/sling/trunk/contrib/jcr/compiler/src/
    incubator/sling/trunk/contrib/jcr/compiler/src/main/
    incubator/sling/trunk/contrib/jcr/compiler/src/main/java/
    incubator/sling/trunk/contrib/jcr/compiler/src/main/java/org/
    incubator/sling/trunk/contrib/jcr/compiler/src/main/java/org/apache/
    incubator/sling/trunk/contrib/jcr/compiler/src/main/java/org/apache/sling/
    incubator/sling/trunk/contrib/jcr/compiler/src/main/java/org/apache/sling/jcr/
    incubator/sling/trunk/contrib/jcr/compiler/src/main/java/org/apache/sling/jcr/compiler/
    incubator/sling/trunk/contrib/jcr/compiler/src/main/java/org/apache/sling/jcr/compiler/JcrJavaCompiler.java   (with props)
    incubator/sling/trunk/contrib/jcr/compiler/src/main/java/org/apache/sling/jcr/compiler/impl/
    incubator/sling/trunk/contrib/jcr/compiler/src/main/java/org/apache/sling/jcr/compiler/impl/FileClassWriter.java   (with props)
    incubator/sling/trunk/contrib/jcr/compiler/src/main/java/org/apache/sling/jcr/compiler/impl/JcrClassWriter.java   (with props)
    incubator/sling/trunk/contrib/jcr/compiler/src/main/java/org/apache/sling/jcr/compiler/impl/JcrJavaCompilerImpl.java   (with props)
    incubator/sling/trunk/contrib/jcr/compiler/src/main/resources/
    incubator/sling/trunk/contrib/jcr/compiler/src/main/resources/META-INF/
    incubator/sling/trunk/contrib/jcr/compiler/src/main/resources/META-INF/DISCLAIMER
    incubator/sling/trunk/contrib/jcr/compiler/src/main/resources/META-INF/LICENSE   (with props)
    incubator/sling/trunk/contrib/jcr/compiler/src/main/resources/META-INF/NOTICE   (with props)
Modified:
    incubator/sling/trunk/contrib/pom.xml

Added: incubator/sling/trunk/contrib/jcr/compiler/LICENSE
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/contrib/jcr/compiler/LICENSE?rev=761187&view=auto
==============================================================================
--- incubator/sling/trunk/contrib/jcr/compiler/LICENSE (added)
+++ incubator/sling/trunk/contrib/jcr/compiler/LICENSE Thu Apr  2 07:03:39 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.

Propchange: incubator/sling/trunk/contrib/jcr/compiler/LICENSE
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/sling/trunk/contrib/jcr/compiler/NOTICE
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/contrib/jcr/compiler/NOTICE?rev=761187&view=auto
==============================================================================
--- incubator/sling/trunk/contrib/jcr/compiler/NOTICE (added)
+++ incubator/sling/trunk/contrib/jcr/compiler/NOTICE Thu Apr  2 07:03:39 2009
@@ -0,0 +1,9 @@
+Apache Sling Java Compiler
+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/).
+

Propchange: incubator/sling/trunk/contrib/jcr/compiler/NOTICE
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/sling/trunk/contrib/jcr/compiler/README.txt
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/contrib/jcr/compiler/README.txt?rev=761187&view=auto
==============================================================================
--- incubator/sling/trunk/contrib/jcr/compiler/README.txt (added)
+++ incubator/sling/trunk/contrib/jcr/compiler/README.txt Thu Apr  2 07:03:39 2009
@@ -0,0 +1,38 @@
+Apache Sling Commons Java Compiler
+
+The Sling JCR Java Compiler bundle provides support for compiling
+Java source code stored in the repository and writing the class 
+files to the repository. 
+
+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/contrib/jcr/compiler
+
+See the Subversion documentation for other source control features.

Propchange: incubator/sling/trunk/contrib/jcr/compiler/README.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/sling/trunk/contrib/jcr/compiler/README.txt
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: incubator/sling/trunk/contrib/jcr/compiler/README.txt
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: incubator/sling/trunk/contrib/jcr/compiler/pom.xml
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/contrib/jcr/compiler/pom.xml?rev=761187&view=auto
==============================================================================
--- incubator/sling/trunk/contrib/jcr/compiler/pom.xml (added)
+++ incubator/sling/trunk/contrib/jcr/compiler/pom.xml Thu Apr  2 07:03:39 2009
@@ -0,0 +1,107 @@
+<?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.jcr.compiler</artifactId>
+    <version>0.9.0-incubator-SNAPSHOT</version>
+    <packaging>bundle</packaging>
+
+    <name>Apache Sling JCR Java Compiler</name>
+    <description>
+        The Sling JCR Java Compiler bundle provides support for compiling
+        Java source code stored in the repository and writing the class 
+        files to the repository. 
+    </description>
+
+    <scm>
+        <connection>scm:svn:http://svn.apache.org/repos/asf/incubator/sling/trunk/contrib/jcr/compiler</connection>
+        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/incubator/sling/trunk/contrib/jcr/compiler</developerConnection>
+        <url>http://svn.apache.org/viewvc/incubator/sling/trunk/contrib/jcr/compiler</url>
+    </scm>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-scr-plugin</artifactId>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <extensions>true</extensions>
+                <configuration>
+                    <instructions>
+                        <Export-Package>
+                            org.apache.sling.jcr.compiler;version=${pom.version}
+                        </Export-Package>
+                        <Private-Package>
+                            org.apache.sling.jcr.compiler.impl
+                        </Private-Package>
+                        <DynamicImport-Package>*</DynamicImport-Package>
+                    </instructions>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+    <dependencies>
+	    <dependency>
+	      <groupId>org.apache.sling</groupId>
+	      <artifactId>org.apache.sling.commons.compiler</artifactId>
+	      <version>0.9.0-incubator-SNAPSHOT</version>
+	    </dependency>
+	    <dependency>
+	        <groupId>org.apache.sling</groupId>
+	        <artifactId>org.apache.sling.jcr.classloader</artifactId>
+	        <version>2.0.2-incubator</version>
+	    </dependency>
+        <dependency>
+            <groupId>org.apache.sling</groupId>
+            <artifactId>org.apache.sling.jcr.api</artifactId>
+            <version>2.0.2-incubator</version>
+        </dependency>
+
+        <!-- logging -->
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-api</artifactId>
+        </dependency>
+
+        <!-- testing -->
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-simple</artifactId>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+</project>

Propchange: incubator/sling/trunk/contrib/jcr/compiler/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/sling/trunk/contrib/jcr/compiler/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: incubator/sling/trunk/contrib/jcr/compiler/pom.xml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: incubator/sling/trunk/contrib/jcr/compiler/src/main/java/org/apache/sling/jcr/compiler/JcrJavaCompiler.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/contrib/jcr/compiler/src/main/java/org/apache/sling/jcr/compiler/JcrJavaCompiler.java?rev=761187&view=auto
==============================================================================
--- incubator/sling/trunk/contrib/jcr/compiler/src/main/java/org/apache/sling/jcr/compiler/JcrJavaCompiler.java (added)
+++ incubator/sling/trunk/contrib/jcr/compiler/src/main/java/org/apache/sling/jcr/compiler/JcrJavaCompiler.java Thu Apr  2 07:03:39 2009
@@ -0,0 +1,29 @@
+/*
+ * 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.jcr.compiler;
+
+import org.apache.sling.commons.compiler.ErrorHandler;
+
+/**
+ * The <code>JcrJavaCompiler</code> compiles Java source code stored in the
+ * repository and writes the generated class files to the repository.
+ */
+public interface JcrJavaCompiler {
+    
+    boolean compile(String[] srcFiles, String outputDir, ErrorHandler errorHandler,
+            boolean generateDebug, String javaVersion) throws Exception;
+}

Propchange: incubator/sling/trunk/contrib/jcr/compiler/src/main/java/org/apache/sling/jcr/compiler/JcrJavaCompiler.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/sling/trunk/contrib/jcr/compiler/src/main/java/org/apache/sling/jcr/compiler/JcrJavaCompiler.java
------------------------------------------------------------------------------
    svn:keywords = author date id revision rev url

Propchange: incubator/sling/trunk/contrib/jcr/compiler/src/main/java/org/apache/sling/jcr/compiler/JcrJavaCompiler.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: incubator/sling/trunk/contrib/jcr/compiler/src/main/java/org/apache/sling/jcr/compiler/impl/FileClassWriter.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/contrib/jcr/compiler/src/main/java/org/apache/sling/jcr/compiler/impl/FileClassWriter.java?rev=761187&view=auto
==============================================================================
--- incubator/sling/trunk/contrib/jcr/compiler/src/main/java/org/apache/sling/jcr/compiler/impl/FileClassWriter.java (added)
+++ incubator/sling/trunk/contrib/jcr/compiler/src/main/java/org/apache/sling/jcr/compiler/impl/FileClassWriter.java Thu Apr  2 07:03:39 2009
@@ -0,0 +1,65 @@
+/*
+ * 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.jcr.compiler.impl;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+
+import org.apache.sling.commons.compiler.ClassWriter;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+class FileClassWriter implements ClassWriter {
+    
+    /** Logger instance */
+    private static final Logger log = LoggerFactory.getLogger(FileClassWriter.class);
+
+    private File outputDir;
+    
+    FileClassWriter(File outputDir) {
+        this.outputDir = outputDir;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.sling.commons.compiler.ClassWriter#write(java.lang.String, byte[])
+     */
+    public void write(String className, byte[] data) throws Exception {
+        File classFile = new File(outputDir, className.replace('.', '/') + ".class");
+        if (!classFile.getParentFile().exists()) {
+            classFile.getParentFile().mkdirs();
+        }
+        FileOutputStream out = new FileOutputStream(classFile);
+        boolean succeeded = false;
+        try {
+            out.write(data);
+            succeeded = true;
+        } catch (IOException e) {
+            log.error("Failed to persist " + className + " at path " + classFile.getPath(), e);
+            // re-throw
+            throw e;
+        } finally {
+            try {
+                out.close();
+            } catch (IOException ignore) {
+            }
+            if (!succeeded) {
+                classFile.delete();
+            }
+        }
+    }
+}

Propchange: incubator/sling/trunk/contrib/jcr/compiler/src/main/java/org/apache/sling/jcr/compiler/impl/FileClassWriter.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/sling/trunk/contrib/jcr/compiler/src/main/java/org/apache/sling/jcr/compiler/impl/FileClassWriter.java
------------------------------------------------------------------------------
    svn:keywords = author date id revision rev url

Propchange: incubator/sling/trunk/contrib/jcr/compiler/src/main/java/org/apache/sling/jcr/compiler/impl/FileClassWriter.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: incubator/sling/trunk/contrib/jcr/compiler/src/main/java/org/apache/sling/jcr/compiler/impl/JcrClassWriter.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/contrib/jcr/compiler/src/main/java/org/apache/sling/jcr/compiler/impl/JcrClassWriter.java?rev=761187&view=auto
==============================================================================
--- incubator/sling/trunk/contrib/jcr/compiler/src/main/java/org/apache/sling/jcr/compiler/impl/JcrClassWriter.java (added)
+++ incubator/sling/trunk/contrib/jcr/compiler/src/main/java/org/apache/sling/jcr/compiler/impl/JcrClassWriter.java Thu Apr  2 07:03:39 2009
@@ -0,0 +1,81 @@
+/*
+ * 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.jcr.compiler.impl;
+
+import java.io.ByteArrayInputStream;
+import java.util.Calendar;
+
+import javax.jcr.Node;
+import javax.jcr.RepositoryException;
+
+import org.apache.sling.commons.compiler.ClassWriter;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+class JcrClassWriter implements ClassWriter {
+    
+    /** Logger instance */
+    private static final Logger log = LoggerFactory.getLogger(JcrClassWriter.class);
+
+    private Node outputFolder;
+    
+    JcrClassWriter(Node outputFolder) {
+        this.outputFolder = outputFolder;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.sling.commons.compiler.ClassWriter#write(java.lang.String, byte[])
+     */
+    public void write(String className, byte[] data) throws Exception {
+        synchronized (outputFolder.getSession()) {
+            boolean succeeded = false;
+            try {
+                Node folder = outputFolder;
+                String[] names = className.split("\\.");
+                for (int i = 0; i < names.length - 1; i++) {
+                    if (folder.hasNode(names[i])) {
+                        folder = folder.getNode(names[i]);
+                    } else {
+                        folder = folder.addNode(names[i], "nt:folder");
+                    }
+                }
+                String classFileName = names[names.length - 1] + ".class";
+                if (folder.hasNode(classFileName)) {
+                    folder.getNode(classFileName).remove();
+                }
+                Node file = folder.addNode(classFileName, "nt:file");
+                Node content = file.addNode("jcr:content", "nt:resource");
+
+                content.setProperty("jcr:mimeType", "application/octet-stream");
+                content.setProperty("jcr:data", new ByteArrayInputStream(data));
+                content.setProperty("jcr:lastModified", Calendar.getInstance());
+                succeeded = true;
+            } catch (RepositoryException e) {
+                String p = outputFolder.getPath() + "/" + className.replace('.', '/') + ".class";
+                log.error("Failed to persist " + className + " at path " + p, e);
+                // re-throw
+                throw e;
+            } finally {
+                if (succeeded) {
+                    outputFolder.save();
+                } else {
+                    outputFolder.refresh(false);
+                }
+            }
+        }
+    }
+}

Propchange: incubator/sling/trunk/contrib/jcr/compiler/src/main/java/org/apache/sling/jcr/compiler/impl/JcrClassWriter.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/sling/trunk/contrib/jcr/compiler/src/main/java/org/apache/sling/jcr/compiler/impl/JcrClassWriter.java
------------------------------------------------------------------------------
    svn:keywords = author date id revision rev url

Propchange: incubator/sling/trunk/contrib/jcr/compiler/src/main/java/org/apache/sling/jcr/compiler/impl/JcrClassWriter.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: incubator/sling/trunk/contrib/jcr/compiler/src/main/java/org/apache/sling/jcr/compiler/impl/JcrJavaCompilerImpl.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/contrib/jcr/compiler/src/main/java/org/apache/sling/jcr/compiler/impl/JcrJavaCompilerImpl.java?rev=761187&view=auto
==============================================================================
--- incubator/sling/trunk/contrib/jcr/compiler/src/main/java/org/apache/sling/jcr/compiler/impl/JcrJavaCompilerImpl.java (added)
+++ incubator/sling/trunk/contrib/jcr/compiler/src/main/java/org/apache/sling/jcr/compiler/impl/JcrJavaCompilerImpl.java Thu Apr  2 07:03:39 2009
@@ -0,0 +1,285 @@
+/*
+ * 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.jcr.compiler.impl;
+
+import java.io.ByteArrayOutputStream;
+import java.io.CharArrayWriter;
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.Reader;
+
+import javax.jcr.Item;
+import javax.jcr.Node;
+import javax.jcr.RepositoryException;
+import javax.jcr.Session;
+
+import org.apache.sling.commons.compiler.ClassWriter;
+import org.apache.sling.commons.compiler.CompileUnit;
+import org.apache.sling.commons.compiler.CompilerEnvironment;
+import org.apache.sling.commons.compiler.ErrorHandler;
+import org.apache.sling.commons.compiler.JavaCompiler;
+import org.apache.sling.commons.compiler.Options;
+import org.apache.sling.jcr.api.SlingRepository;
+import org.apache.sling.jcr.classloader.RepositoryClassLoaderProvider;
+import org.apache.sling.jcr.compiler.JcrJavaCompiler;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * <code>JcrJavaCompilerImpl</code> ...
+ * 
+ * @scr.component metatype="no"
+ * @scr.service interface="org.apache.sling.jcr.compiler.JcrJavaCompiler"
+ */
+public class JcrJavaCompilerImpl implements JcrJavaCompiler, CompilerEnvironment {
+
+    /** Logger instance */
+    private static final Logger log = LoggerFactory.getLogger(JcrJavaCompilerImpl.class);
+
+    private static final String CLASSLOADER_NAME = "admin";
+
+    /** @scr.reference */
+    protected JavaCompiler compiler;
+    
+    /** @scr.reference */
+    protected RepositoryClassLoaderProvider clp;
+
+    /** @scr.reference */
+    protected SlingRepository rep;
+    
+    // only accessed locally within scope of compile() method
+    private ClassLoader cl;
+
+    // only accessed locally within scope of compile() method
+    private Session session;
+
+    public JcrJavaCompilerImpl() {
+    }
+
+    //------------------------------------------------------< JcrJavaCompiler >
+    /* (non-Javadoc)
+     * @see org.apache.sling.jcr.compiler.JcrJavaCompiler#compile(java.lang.String[], java.lang.String, org.apache.sling.commons.compiler.ErrorHandler, boolean, java.lang.String)
+     */
+    public boolean compile(String[] srcFiles, String outputDir,
+            ErrorHandler errorHandler, boolean generateDebug, String javaVersion)
+            throws Exception {
+        
+        if (javaVersion == null) {
+            javaVersion = System.getProperty("java.specification.version");
+        }
+
+        if (outputDir == null) {
+            throw new Exception("outputDir can not be null");
+        }
+        
+        ErrorHandlerWrapper handler = new ErrorHandlerWrapper(errorHandler);
+
+        cl = clp.getClassLoader(CLASSLOADER_NAME);
+        try {
+            session = rep.loginAdministrative(null);
+            
+            ClassWriter classWriter;
+            if (outputDir.startsWith("file://")) {
+                // write class files to local file system;
+                // only subdirectories of the system temp dir 
+                // will be accepted
+                File tempDir = new File(System.getProperty("java.io.tmpdir"));
+                File outDir = new File(outputDir.substring("file://".length()));
+                if (!outDir.isAbsolute()) {
+                    outDir = new File(tempDir, outputDir.substring("file://".length()));
+                } 
+                if (!outDir.getCanonicalPath().startsWith(tempDir.getCanonicalPath())) {
+                    throw new Exception("illegal outputDir (not a temp dir): " + outputDir);
+                }
+                outDir.mkdir();
+                classWriter = new FileClassWriter(outDir);
+            } else {
+                // write class files to the repository  (default)
+                if (!session.itemExists(outputDir)) {
+                    throw new Exception("outputDir does not exist: " + outputDir);
+                }
+                
+                Item item = session.getItem(outputDir);
+                if (item.isNode()) {
+                    Node folder = (Node) item;
+                    if (!folder.isNodeType("nt:folder")) {
+                        throw new Exception("outputDir must be a node of type nt:folder");
+                    }
+                    classWriter = new JcrClassWriter(folder);
+                } else {
+                    throw new Exception("outputDir must be a node of type nt:folder");
+                }
+            }
+
+            CompileUnit[] units = new CompileUnit[srcFiles.length];
+            for (int i = 0; i < units.length; i++) {
+                units[i] = createCompileUnit(srcFiles[i]);
+            }
+            compiler.compile(units, this, classWriter, handler, 
+                    new Options(javaVersion, generateDebug));
+        } finally {
+            // cleanup
+            clp.ungetClassLoader(cl);
+            if (session != null) {
+                session.logout();
+                session = null;
+            }
+        }
+        
+        return handler.getNumErrors() == 0;
+    }
+
+    //--------------------------------------------------< CompilerEnvironment >
+    /* (non-Javadoc)
+     * @see org.apache.sling.commons.compiler.CompilerEnvironment#findClass(java.lang.String)
+     */
+    public byte[] findClass(String className) throws Exception {
+        InputStream in = cl.getResourceAsStream(className.replace('.', '/') + ".class");
+        if (in == null) {
+            return null;
+        }
+        ByteArrayOutputStream out = new ByteArrayOutputStream(0x7fff);
+
+        try {
+            byte[] buffer = new byte[0x1000];
+            int read = 0;
+            while ((read = in.read(buffer)) > 0) {
+                out.write(buffer, 0, read);
+            }
+        } finally {
+            //out.close();
+            in.close();
+        }
+
+        return out.toByteArray();
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.sling.commons.compiler.CompilerEnvironment#isPackage(java.lang.String)
+     */
+    public boolean isPackage(String packageName) {
+        InputStream in = cl.getResourceAsStream(packageName.replace('.', '/') + ".class");
+        if (in != null) {
+            try {
+                in.close();
+            } catch (IOException ignore) {
+            }
+            return false;
+        }
+        // FIXME need a better way to determine whether a name resolves 
+        // to a package
+        int pos = packageName.lastIndexOf('.');
+        if (pos != -1) {
+            if (Character.isUpperCase(packageName.substring(pos + 1).charAt(0))) {
+                return false;
+            }
+        }
+        return true;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.sling.commons.compiler.CompilerEnvironment#cleanup()
+     */
+    public void cleanup() {
+    }
+
+    //--------------------------------------------------------< misc. helpers >
+
+    private CompileUnit createCompileUnit(final String sourceFile) throws Exception {
+        final char[] chars = readTextResource(sourceFile);
+
+        return new CompileUnit() {
+
+            public String getSourceFileName() {
+                return sourceFile;
+            }
+
+            public char[] getSourceFileContents() {
+                return chars;
+            }
+
+            public String getMainTypeName() {
+                String className;
+                int pos = sourceFile.lastIndexOf(".java");
+                if (pos != -1) {
+                    className = sourceFile.substring(0, pos).trim();
+                } else {
+                    className = sourceFile.trim();
+                }
+                pos = className.lastIndexOf('/');
+                return (pos == -1) ? className : className.substring(pos + 1);
+            }
+        };
+    }
+
+    private char[] readTextResource(String resourcePath) 
+            throws RepositoryException, IOException {
+        String relPropPath = resourcePath.substring(1) 
+                + "/jcr:content/jcr:data";
+        InputStream in = session.getRootNode().getProperty(relPropPath).getStream();
+        Reader reader = new InputStreamReader(in);
+        CharArrayWriter writer = new CharArrayWriter(0x7fff);
+        try {
+            char[] buffer = new char[0x1000];
+            int read = 0;
+            while ((read = reader.read(buffer)) > 0) {
+                writer.write(buffer, 0, read);
+            }
+            return writer.toCharArray();
+        } finally {
+            //writer.close();
+            reader.close();
+        }
+    }
+
+    //--------------------------------------------------------< inner classes >
+
+    class ErrorHandlerWrapper implements ErrorHandler {
+
+        ErrorHandler handler;
+        int errors;
+        int warnings;
+
+        ErrorHandlerWrapper(ErrorHandler handler) {
+            this.handler = handler;
+            errors = 0;
+            warnings = 0;
+        }
+
+        int getNumErrors() {
+            return errors;
+        }
+
+        int getNumWarnings() {
+            return warnings;
+        }
+
+        public void onError(String msg, String sourceFile, int line, int position) {
+            log.debug("Error in " + sourceFile + ", line " + line + ", pos. " + position + ": " + msg);
+            errors++;
+            handler.onError(msg, sourceFile, line, position);
+        }
+
+        public void onWarning(String msg, String sourceFile, int line, int position) {
+            log.debug("Warning in " + sourceFile + ", line " + line + ", pos. " + position + ": " + msg);
+            warnings++;
+            handler.onWarning(msg, sourceFile, line, position);
+        }
+    }
+}

Propchange: incubator/sling/trunk/contrib/jcr/compiler/src/main/java/org/apache/sling/jcr/compiler/impl/JcrJavaCompilerImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/sling/trunk/contrib/jcr/compiler/src/main/java/org/apache/sling/jcr/compiler/impl/JcrJavaCompilerImpl.java
------------------------------------------------------------------------------
    svn:keywords = author date id revision rev url

Propchange: incubator/sling/trunk/contrib/jcr/compiler/src/main/java/org/apache/sling/jcr/compiler/impl/JcrJavaCompilerImpl.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: incubator/sling/trunk/contrib/jcr/compiler/src/main/resources/META-INF/DISCLAIMER
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/contrib/jcr/compiler/src/main/resources/META-INF/DISCLAIMER?rev=761187&view=auto
==============================================================================
--- incubator/sling/trunk/contrib/jcr/compiler/src/main/resources/META-INF/DISCLAIMER (added)
+++ incubator/sling/trunk/contrib/jcr/compiler/src/main/resources/META-INF/DISCLAIMER Thu Apr  2 07:03:39 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

Added: incubator/sling/trunk/contrib/jcr/compiler/src/main/resources/META-INF/LICENSE
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/contrib/jcr/compiler/src/main/resources/META-INF/LICENSE?rev=761187&view=auto
==============================================================================
--- incubator/sling/trunk/contrib/jcr/compiler/src/main/resources/META-INF/LICENSE (added)
+++ incubator/sling/trunk/contrib/jcr/compiler/src/main/resources/META-INF/LICENSE Thu Apr  2 07:03:39 2009
@@ -0,0 +1,233 @@
+
+                                 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.
+
+
+APACHE SLING SUBCOMPONENTS:
+
+Apache Sling includes subcomponents with separate copyright notices and
+license terms. Your use of these subcomponents is subject to the terms
+and conditions of the following licenses.
+
+SLF4J logging libraries
+
+   Copyright (c) 2004-2007 QOS.ch
+   All rights reserved.
+
+   Permission is hereby granted, free of charge, to any person obtaining
+   a copy of this software and associated documentation files (the
+   "Software"), to deal in the Software without restriction, including
+   without limitation the rights to use, copy, modify, merge, publish,
+   distribute, sublicense, and/or sell copies of the Software, and to
+   permit persons to whom the Software is furnished to do so, subject to
+   the following conditions:
+
+   The above copyright notice and this permission notice shall be
+   included in all copies or substantial portions of the Software.
+
+   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+   EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+   MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+   NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+   LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+   OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+   WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Propchange: incubator/sling/trunk/contrib/jcr/compiler/src/main/resources/META-INF/LICENSE
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/sling/trunk/contrib/jcr/compiler/src/main/resources/META-INF/NOTICE
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/contrib/jcr/compiler/src/main/resources/META-INF/NOTICE?rev=761187&view=auto
==============================================================================
--- incubator/sling/trunk/contrib/jcr/compiler/src/main/resources/META-INF/NOTICE (added)
+++ incubator/sling/trunk/contrib/jcr/compiler/src/main/resources/META-INF/NOTICE Thu Apr  2 07:03:39 2009
@@ -0,0 +1,8 @@
+Apache Sling Java Compiler
+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/).

Propchange: incubator/sling/trunk/contrib/jcr/compiler/src/main/resources/META-INF/NOTICE
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/sling/trunk/contrib/pom.xml
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/contrib/pom.xml?rev=761187&r1=761186&r2=761187&view=diff
==============================================================================
--- incubator/sling/trunk/contrib/pom.xml (original)
+++ incubator/sling/trunk/contrib/pom.xml Thu Apr  2 07:03:39 2009
@@ -68,6 +68,7 @@
           <module>extensions/obr</module>
           <module>extensions/runmode</module>
           <module>jcr/jackrabbit-client</module>
+          <module>jcr/compiler</module>
           <module>scripting/freemarker</module>
           <module>scripting/java</module>
           <module>scripting/jst</module>



Mime
View raw message