You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ro...@apache.org on 2017/11/07 09:20:13 UTC

[sling-org-apache-sling-commons-compiler] annotated tag org.apache.sling.commons.compiler-1.0.0 created (now 6314cb8)

This is an automated email from the ASF dual-hosted git repository.

rombert pushed a change to annotated tag org.apache.sling.commons.compiler-1.0.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-commons-compiler.git.


      at 6314cb8  (tag)
 tagging 5ee88b2c2bc7704b6bacf095dae15d8605b8266d (commit)
      by Carsten Ziegeler
      on Thu Nov 26 15:31:13 2009 +0000

- Log -----------------------------------------------------------------
org.apache.sling.commons.compiler-1.0.0
-----------------------------------------------------------------------

This annotated tag includes the following new commits:

     new f497e80  SLING-873 : Add new commons compiler bundle. Applied patch from Stefan Guggisberg.
     new 71a6b19  Ignore the target directory.
     new 715e761  SLING-874 - Use correct header.
     new 640e371  Add missing private package and correct javadoc generation.
     new 8d54570  SLING-884 : Apply patch from Stefan Guggisberg for pom fixing and code cleanup.
     new c9002db  Use release parent pom
     new 06372a8  Use new dev parent pom for contrib.
     new c59c885  Set parent pom to released version.
     new a999f86  Ignore hidden files (Eclipse .project, etc.)
     new 2006f88  Move Sling to new TLP location
     new 4f017a9  SLING-1011 : Remove disclaimer file.
     new dfde97a  SLING-1011 : Adjust svn location
     new f08f2f4  SLING-1011 : Remove disclaimer from readme's, adjust links to webite, fix versions in poms.
     new 348cc49  SLING-1033 Upgrade to Sling parent POM 6 (and ensure web app has the leglize stuff, too)
     new f5c7f26  Remove empty code and prints to system out.
     new 9176bc6  Update to latest release.
     new c80f3f0  [maven-release-plugin] prepare release org.apache.sling.commons.compiler-1.0.0
     new 5ee88b2  [maven-scm] copy for tag org.apache.sling.commons.compiler-1.0.0

The 18 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


-- 
To stop receiving notification emails like this one, please contact
['"commits@sling.apache.org" <co...@sling.apache.org>'].

[sling-org-apache-sling-commons-compiler] 10/18: Move Sling to new TLP location

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.commons.compiler-1.0.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-commons-compiler.git

commit 2006f886aac2f81feefe46260208153378318e65
Author: Felix Meschberger <fm...@apache.org>
AuthorDate: Thu Jun 18 09:21:02 2009 +0000

    Move Sling to new TLP location
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/contrib/commons/compiler@785979 13f79535-47bb-0310-9956-ffa450edef68

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-org-apache-sling-commons-compiler] 13/18: SLING-1011 : Remove disclaimer from readme's, adjust links to webite, fix versions in poms.

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.commons.compiler-1.0.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-commons-compiler.git

commit f08f2f48f7c2dd6a96129e87fa8fd5a86fccbb29
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Thu Jun 18 10:47:55 2009 +0000

    SLING-1011 : Remove disclaimer from readme's, adjust links to webite, fix versions in poms.
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/contrib/commons/compiler@786012 13f79535-47bb-0310-9956-ffa450edef68
---
 README.txt | 10 ----------
 pom.xml    |  2 +-
 2 files changed, 1 insertion(+), 11 deletions(-)

diff --git a/README.txt b/README.txt
index 02dcfde..b76d37e 100644
--- a/README.txt
+++ b/README.txt
@@ -3,16 +3,6 @@ Apache Sling Commons Java Compiler
 The Sling Commons Java Compiler bundle provides platform independant Java Compilation 
 support using the Eclipse Java Compiler (org.eclipse.jdt).
 
-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
 ===============
 
diff --git a/pom.xml b/pom.xml
index b8904ba..7c48828 100644
--- a/pom.xml
+++ b/pom.xml
@@ -28,7 +28,7 @@
     </parent>
 
     <artifactId>org.apache.sling.commons.compiler</artifactId>
-    <version>0.9.0-incubator-SNAPSHOT</version>
+    <version>0.9.0-SNAPSHOT</version>
     <packaging>bundle</packaging>
 
     <name>Apache Sling Commons Java Compiler</name>

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-org-apache-sling-commons-compiler] 16/18: Update to latest release.

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.commons.compiler-1.0.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-commons-compiler.git

commit 9176bc67e0f22238a72845159670352f77998687
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Wed Oct 14 06:39:29 2009 +0000

    Update to latest release.
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/contrib/commons/compiler@825023 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index 8bcb3c9..7f35f41 100644
--- a/pom.xml
+++ b/pom.xml
@@ -23,7 +23,7 @@
     <parent>
         <groupId>org.apache.sling</groupId>
         <artifactId>sling</artifactId>
-        <version>6</version>
+        <version>7</version>
         <relativePath>../../../parent/pom.xml</relativePath>
     </parent>
 

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-org-apache-sling-commons-compiler] 04/18: Add missing private package and correct javadoc generation.

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.commons.compiler-1.0.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-commons-compiler.git

commit 640e371baef84a0cb76889b3cd0923033e8b9b2e
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Fri Mar 13 07:00:41 2009 +0000

    Add missing private package and correct javadoc generation.
    
    git-svn-id: https://svn.apache.org/repos/asf/incubator/sling/trunk/contrib/commons/compiler@753138 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index 4a09993..de63b07 100644
--- a/pom.xml
+++ b/pom.xml
@@ -56,8 +56,11 @@
                 <configuration>
                     <instructions>
                         <Export-Package>
-                            org.apache.sling.commons.compiler;version=${pom.version},
+                            org.apache.sling.commons.compiler;version=${pom.version}
                         </Export-Package>
+                        <Private-Package>
+                            org.apache.sling.commons.compiler.impl
+                        </Private-Package>
                         <Embed-Dependency>
                             core
                         </Embed-Dependency>
@@ -66,6 +69,19 @@
             </plugin>
         </plugins>
     </build>
+    <reporting>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-javadoc-plugin</artifactId>
+                <configuration>
+                    <excludePackageNames>
+                        org.apache.sling.commons.compiler.impl
+                    </excludePackageNames>
+                </configuration>
+            </plugin>
+        </plugins>
+    </reporting>
 
     <dependencies>
         <dependency>

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-org-apache-sling-commons-compiler] 08/18: Set parent pom to released version.

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.commons.compiler-1.0.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-commons-compiler.git

commit c59c8859a16b73daa0a34cbc9ce98ea1746c3056
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Thu May 14 14:49:51 2009 +0000

    Set parent pom to released version.
    
    git-svn-id: https://svn.apache.org/repos/asf/incubator/sling/trunk/contrib/commons/compiler@774798 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index cbcc0f3..62bdbca 100644
--- a/pom.xml
+++ b/pom.xml
@@ -23,7 +23,7 @@
     <parent>
         <groupId>org.apache.sling</groupId>
         <artifactId>sling</artifactId>
-        <version>6-incubator-SNAPSHOT</version>
+        <version>5-incubator</version>
         <relativePath>../../../parent/pom.xml</relativePath>
     </parent>
 

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-org-apache-sling-commons-compiler] 03/18: SLING-874 - Use correct header.

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.commons.compiler-1.0.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-commons-compiler.git

commit 715e76114f29ed5bc6d323ed141be7a51988a8d7
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Wed Feb 25 18:05:17 2009 +0000

    SLING-874 - Use correct header.
    
    git-svn-id: https://svn.apache.org/repos/asf/incubator/sling/trunk/contrib/commons/compiler@747874 13f79535-47bb-0310-9956-ffa450edef68
---
 .../apache/sling/commons/compiler/ClassWriter.java | 24 ++++++++++++----------
 1 file changed, 13 insertions(+), 11 deletions(-)

diff --git a/src/main/java/org/apache/sling/commons/compiler/ClassWriter.java b/src/main/java/org/apache/sling/commons/compiler/ClassWriter.java
index 7ab2da0..46dc92a 100644
--- a/src/main/java/org/apache/sling/commons/compiler/ClassWriter.java
+++ b/src/main/java/org/apache/sling/commons/compiler/ClassWriter.java
@@ -1,16 +1,18 @@
 /*
- * $URL$
- * $Id$
+ * 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
  *
- * Copyright 1997-2007 Day Management AG
- * Barfuesserplatz 6, 4001 Basel, Switzerland
- * All Rights Reserved.
+ *      http://www.apache.org/licenses/LICENSE-2.0
  *
- * This software is the confidential and proprietary information of
- * Day Management AG, ("Confidential Information"). You shall not
- * disclose such Confidential Information and shall use it only in
- * accordance with the terms of the license agreement you entered into
- * with Day.
+ * 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.commons.compiler;
 
@@ -20,7 +22,7 @@ package org.apache.sling.commons.compiler;
 public interface ClassWriter {
 
     /**
-     * 
+     *
      * @param className
      * @param data
      * @throws Exception

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-org-apache-sling-commons-compiler] 18/18: [maven-scm] copy for tag org.apache.sling.commons.compiler-1.0.0

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.commons.compiler-1.0.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-commons-compiler.git

commit 5ee88b2c2bc7704b6bacf095dae15d8605b8266d
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Thu Nov 26 15:31:13 2009 +0000

    [maven-scm] copy for tag org.apache.sling.commons.compiler-1.0.0
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/tags/org.apache.sling.commons.compiler-1.0.0@884581 13f79535-47bb-0310-9956-ffa450edef68

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-org-apache-sling-commons-compiler] 11/18: SLING-1011 : Remove disclaimer file.

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.commons.compiler-1.0.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-commons-compiler.git

commit 4f017a9f3cfe9a79edd705a4cf5a15b6a5918eda
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Thu Jun 18 09:57:04 2009 +0000

    SLING-1011 : Remove disclaimer file.
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/contrib/commons/compiler@785993 13f79535-47bb-0310-9956-ffa450edef68
---
 src/main/resources/META-INF/DISCLAIMER | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/src/main/resources/META-INF/DISCLAIMER b/src/main/resources/META-INF/DISCLAIMER
deleted file mode 100644
index 90850c2..0000000
--- a/src/main/resources/META-INF/DISCLAIMER
+++ /dev/null
@@ -1,7 +0,0 @@
-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

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-org-apache-sling-commons-compiler] 17/18: [maven-release-plugin] prepare release org.apache.sling.commons.compiler-1.0.0

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.commons.compiler-1.0.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-commons-compiler.git

commit c80f3f0e37a02e0307c8c81ab5889d993347c378
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Thu Nov 26 15:30:52 2009 +0000

    [maven-release-plugin] prepare release org.apache.sling.commons.compiler-1.0.0
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/contrib/commons/compiler@884580 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/pom.xml b/pom.xml
index 7f35f41..bea9649 100644
--- a/pom.xml
+++ b/pom.xml
@@ -28,7 +28,7 @@
     </parent>
 
     <artifactId>org.apache.sling.commons.compiler</artifactId>
-    <version>0.9.0-SNAPSHOT</version>
+    <version>1.0.0</version>
     <packaging>bundle</packaging>
 
     <name>Apache Sling Commons Java Compiler</name>
@@ -38,9 +38,9 @@
     </description>
 
     <scm>
-        <connection>scm:svn:http://svn.apache.org/repos/asf/sling/trunk/contrib/commons/compiler</connection>
-        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/trunk/contrib/commons/compiler</developerConnection>
-        <url>http://svn.apache.org/viewvc/sling/trunk/contrib/commons/compiler</url>
+        <connection>scm:svn:http://svn.apache.org/repos/asf/sling/tags/org.apache.sling.commons.compiler-1.0.0</connection>
+        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/tags/org.apache.sling.commons.compiler-1.0.0</developerConnection>
+        <url>http://svn.apache.org/viewvc/sling/tags/org.apache.sling.commons.compiler-1.0.0</url>
     </scm>
 
     <build>

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-org-apache-sling-commons-compiler] 05/18: SLING-884 : Apply patch from Stefan Guggisberg for pom fixing and code cleanup.

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.commons.compiler-1.0.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-commons-compiler.git

commit 8d5457076cad1333e736fa01fb34c69fc2910dec
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Wed Apr 1 16:40:11 2009 +0000

    SLING-884 : Apply patch from Stefan Guggisberg for pom fixing and code cleanup.
    
    git-svn-id: https://svn.apache.org/repos/asf/incubator/sling/trunk/contrib/commons/compiler@760958 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml                                            |  3 ++
 .../commons/compiler/CompilerEnvironment.java      |  8 ----
 .../commons/compiler/impl/EclipseJavaCompiler.java |  2 +-
 .../compiler/impl/EclipseJavaCompilerTest.java     | 45 ----------------------
 4 files changed, 4 insertions(+), 54 deletions(-)

diff --git a/pom.xml b/pom.xml
index de63b07..2bea15a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -55,6 +55,9 @@
                 <extensions>true</extensions>
                 <configuration>
                     <instructions>
+                        <Import-Package>
+                            !org.eclipse.*,*
+                        </Import-Package>
                         <Export-Package>
                             org.apache.sling.commons.compiler;version=${pom.version}
                         </Export-Package>
diff --git a/src/main/java/org/apache/sling/commons/compiler/CompilerEnvironment.java b/src/main/java/org/apache/sling/commons/compiler/CompilerEnvironment.java
index b8c827b..26f6f7d 100644
--- a/src/main/java/org/apache/sling/commons/compiler/CompilerEnvironment.java
+++ b/src/main/java/org/apache/sling/commons/compiler/CompilerEnvironment.java
@@ -30,14 +30,6 @@ public interface CompilerEnvironment {
     byte[] findClass(String className) throws Exception;
 
     /**
-     *
-     * @param className
-     * @return
-     * @throws Exception
-     */
-    char[] findSource(String className) throws Exception;
-
-    /**
      *  
      * @param packageName
      * @return
diff --git a/src/main/java/org/apache/sling/commons/compiler/impl/EclipseJavaCompiler.java b/src/main/java/org/apache/sling/commons/compiler/impl/EclipseJavaCompiler.java
index 7a49601..1d3035e 100644
--- a/src/main/java/org/apache/sling/commons/compiler/impl/EclipseJavaCompiler.java
+++ b/src/main/java/org/apache/sling/commons/compiler/impl/EclipseJavaCompiler.java
@@ -56,7 +56,7 @@ import java.io.IOException;
 public class EclipseJavaCompiler implements JavaCompiler {
 
     /** Logger instance */
-    private static final Logger log = LoggerFactory.getLogger(JavaCompiler.class);
+    private static final Logger log = LoggerFactory.getLogger(EclipseJavaCompiler.class);
 
     // the static problem factory
     private static IProblemFactory PROBLEM_FACTORY =
diff --git a/src/test/java/org/apache/sling/commons/compiler/impl/EclipseJavaCompilerTest.java b/src/test/java/org/apache/sling/commons/compiler/impl/EclipseJavaCompilerTest.java
deleted file mode 100644
index f27b4c5..0000000
--- a/src/test/java/org/apache/sling/commons/compiler/impl/EclipseJavaCompilerTest.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * 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.commons.compiler.impl;
-
-import org.apache.sling.commons.compiler.JavaCompiler;
-
-import junit.framework.TestCase;
-
-public class EclipseJavaCompilerTest extends TestCase {
-
-    private JavaCompiler compiler;
-    
-    @Override
-    protected void setUp() throws Exception {
-        compiler = new EclipseJavaCompiler();
-        
-        super.setUp();
-    }
-
-    @Override
-    protected void tearDown() throws Exception {
-        compiler = null;
-        
-        super.tearDown();
-    }
-    
-    public void testCompileJava5() throws Exception {
-        
-    }
-
-}

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-org-apache-sling-commons-compiler] 09/18: Ignore hidden files (Eclipse .project, etc.)

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.commons.compiler-1.0.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-commons-compiler.git

commit a999f86a36911fc1bba2a351cb9598b869c2ffb1
Author: Jukka Zitting <ju...@apache.org>
AuthorDate: Wed Jun 10 14:42:37 2009 +0000

    Ignore hidden files (Eclipse .project, etc.)
    
    git-svn-id: https://svn.apache.org/repos/asf/incubator/sling/trunk/contrib/commons/compiler@783372 13f79535-47bb-0310-9956-ffa450edef68

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-org-apache-sling-commons-compiler] 12/18: SLING-1011 : Adjust svn location

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.commons.compiler-1.0.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-commons-compiler.git

commit dfde97a4875f1c6072ebc46d06743920c65a38f9
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Thu Jun 18 10:26:35 2009 +0000

    SLING-1011 : Adjust svn location
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/contrib/commons/compiler@786008 13f79535-47bb-0310-9956-ffa450edef68
---
 README.txt | 2 +-
 pom.xml    | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/README.txt b/README.txt
index 30d5a38..02dcfde 100644
--- a/README.txt
+++ b/README.txt
@@ -32,6 +32,6 @@ 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/commons/compiler
+    svn checkout http://svn.apache.org/repos/asf/sling/trunk/contrib/commons/compiler
 
 See the Subversion documentation for other source control features.
diff --git a/pom.xml b/pom.xml
index 62bdbca..b8904ba 100644
--- a/pom.xml
+++ b/pom.xml
@@ -38,9 +38,9 @@
     </description>
 
     <scm>
-        <connection>scm:svn:http://svn.apache.org/repos/asf/incubator/sling/trunk/contrib/commons/compiler</connection>
-        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/incubator/sling/trunk/contrib/commons/compiler</developerConnection>
-        <url>http://svn.apache.org/viewvc/incubator/sling/trunk/contrib/commons/compiler</url>
+        <connection>scm:svn:http://svn.apache.org/repos/asf/sling/trunk/contrib/commons/compiler</connection>
+        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/trunk/contrib/commons/compiler</developerConnection>
+        <url>http://svn.apache.org/viewvc/sling/trunk/contrib/commons/compiler</url>
     </scm>
 
     <build>

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-org-apache-sling-commons-compiler] 14/18: SLING-1033 Upgrade to Sling parent POM 6 (and ensure web app has the leglize stuff, too)

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.commons.compiler-1.0.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-commons-compiler.git

commit 348cc4933946b7e3e1436ecfdc972125b2d3b624
Author: Felix Meschberger <fm...@apache.org>
AuthorDate: Sun Jul 5 11:27:40 2009 +0000

    SLING-1033 Upgrade to Sling parent POM 6 (and ensure web app has the leglize stuff, too)
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/contrib/commons/compiler@791223 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index 7c48828..8bcb3c9 100644
--- a/pom.xml
+++ b/pom.xml
@@ -23,7 +23,7 @@
     <parent>
         <groupId>org.apache.sling</groupId>
         <artifactId>sling</artifactId>
-        <version>5-incubator</version>
+        <version>6</version>
         <relativePath>../../../parent/pom.xml</relativePath>
     </parent>
 

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-org-apache-sling-commons-compiler] 07/18: Use new dev parent pom for contrib.

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.commons.compiler-1.0.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-commons-compiler.git

commit 06372a88a44c7becf2502f15e5e920b341aae3e6
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Tue May 5 15:08:36 2009 +0000

    Use new dev parent pom for contrib.
    
    git-svn-id: https://svn.apache.org/repos/asf/incubator/sling/trunk/contrib/commons/compiler@771769 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index 62bdbca..cbcc0f3 100644
--- a/pom.xml
+++ b/pom.xml
@@ -23,7 +23,7 @@
     <parent>
         <groupId>org.apache.sling</groupId>
         <artifactId>sling</artifactId>
-        <version>5-incubator</version>
+        <version>6-incubator-SNAPSHOT</version>
         <relativePath>../../../parent/pom.xml</relativePath>
     </parent>
 

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-org-apache-sling-commons-compiler] 01/18: SLING-873 : Add new commons compiler bundle. Applied patch from Stefan Guggisberg.

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.commons.compiler-1.0.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-commons-compiler.git

commit f497e80243d4791b4189800a18a2dabea25a224a
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Wed Feb 25 16:54:01 2009 +0000

    SLING-873 : Add new commons compiler bundle. Applied patch from Stefan Guggisberg.
    
    git-svn-id: https://svn.apache.org/repos/asf/incubator/sling/trunk/contrib/commons/compiler@747859 13f79535-47bb-0310-9956-ffa450edef68
---
 LICENSE                                            | 202 ++++++++++++++
 NOTICE                                             |   9 +
 README.txt                                         |  37 +++
 pom.xml                                            |  93 +++++++
 .../apache/sling/commons/compiler/ClassWriter.java |  29 ++
 .../apache/sling/commons/compiler/CompileUnit.java |  42 +++
 .../commons/compiler/CompilerEnvironment.java      |  51 ++++
 .../sling/commons/compiler/ErrorHandler.java       |  41 +++
 .../sling/commons/compiler/JavaCompiler.java       |  38 +++
 .../org/apache/sling/commons/compiler/Options.java |  56 ++++
 .../commons/compiler/impl/EclipseJavaCompiler.java | 303 +++++++++++++++++++++
 src/main/resources/META-INF/DISCLAIMER             |   7 +
 src/main/resources/META-INF/LICENSE                | 233 ++++++++++++++++
 src/main/resources/META-INF/NOTICE                 |   8 +
 .../commons/compiler/impl/CompilerJava5Test.java   | 159 +++++++++++
 .../compiler/impl/EclipseJavaCompilerTest.java     |  45 +++
 src/test/resources/Java5Test                       |  31 +++
 17 files changed, 1384 insertions(+)

diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..d645695
--- /dev/null
+++ b/LICENSE
@@ -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.
diff --git a/NOTICE b/NOTICE
new file mode 100644
index 0000000..3341854
--- /dev/null
+++ b/NOTICE
@@ -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/).
+
diff --git a/README.txt b/README.txt
new file mode 100644
index 0000000..30d5a38
--- /dev/null
+++ b/README.txt
@@ -0,0 +1,37 @@
+Apache Sling Commons Java Compiler
+
+The Sling Commons Java Compiler bundle provides platform independant Java Compilation 
+support using the Eclipse Java Compiler (org.eclipse.jdt).
+
+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/commons/compiler
+
+See the Subversion documentation for other source control features.
diff --git a/pom.xml b/pom.xml
new file mode 100644
index 0000000..4a09993
--- /dev/null
+++ b/pom.xml
@@ -0,0 +1,93 @@
+<?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.commons.compiler</artifactId>
+    <version>0.9.0-incubator-SNAPSHOT</version>
+    <packaging>bundle</packaging>
+
+    <name>Apache Sling Commons Java Compiler</name>
+    <description>
+        The Sling Commons Java Compiler bundle provides platform independant Java Compilation 
+        support using the Eclipse Java Compiler (org.eclipse.jdt).
+    </description>
+
+    <scm>
+        <connection>scm:svn:http://svn.apache.org/repos/asf/incubator/sling/trunk/contrib/commons/compiler</connection>
+        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/incubator/sling/trunk/contrib/commons/compiler</developerConnection>
+        <url>http://svn.apache.org/viewvc/incubator/sling/trunk/contrib/commons/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.commons.compiler;version=${pom.version},
+                        </Export-Package>
+                        <Embed-Dependency>
+                            core
+                        </Embed-Dependency>
+                    </instructions>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.eclipse.jdt</groupId>
+            <artifactId>core</artifactId>
+            <version>3.2.0.666</version>
+        </dependency>
+        <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>
diff --git a/src/main/java/org/apache/sling/commons/compiler/ClassWriter.java b/src/main/java/org/apache/sling/commons/compiler/ClassWriter.java
new file mode 100644
index 0000000..7ab2da0
--- /dev/null
+++ b/src/main/java/org/apache/sling/commons/compiler/ClassWriter.java
@@ -0,0 +1,29 @@
+/*
+ * $URL$
+ * $Id$
+ *
+ * Copyright 1997-2007 Day Management AG
+ * Barfuesserplatz 6, 4001 Basel, Switzerland
+ * All Rights Reserved.
+ *
+ * This software is the confidential and proprietary information of
+ * Day Management AG, ("Confidential Information"). You shall not
+ * disclose such Confidential Information and shall use it only in
+ * accordance with the terms of the license agreement you entered into
+ * with Day.
+ */
+package org.apache.sling.commons.compiler;
+
+/**
+ *
+ */
+public interface ClassWriter {
+
+    /**
+     * 
+     * @param className
+     * @param data
+     * @throws Exception
+     */
+    void write(String className, byte[] data) throws Exception;
+}
diff --git a/src/main/java/org/apache/sling/commons/compiler/CompileUnit.java b/src/main/java/org/apache/sling/commons/compiler/CompileUnit.java
new file mode 100644
index 0000000..9fbd2f0
--- /dev/null
+++ b/src/main/java/org/apache/sling/commons/compiler/CompileUnit.java
@@ -0,0 +1,42 @@
+/*
+ * 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.commons.compiler;
+
+/**
+ *
+ */
+public interface CompileUnit {
+
+    /**
+     *
+     * @return
+     */
+    String getSourceFileName();
+
+    /**
+     *
+     * @return
+     */
+    char[] getSourceFileContents();
+
+    /**
+     * Returns the name of the top level public type.
+     *
+     * @return the name of the top level public type.
+     */
+    String getMainTypeName();
+}
diff --git a/src/main/java/org/apache/sling/commons/compiler/CompilerEnvironment.java b/src/main/java/org/apache/sling/commons/compiler/CompilerEnvironment.java
new file mode 100644
index 0000000..b8c827b
--- /dev/null
+++ b/src/main/java/org/apache/sling/commons/compiler/CompilerEnvironment.java
@@ -0,0 +1,51 @@
+/*
+ * 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.commons.compiler;
+
+/**
+ *
+ */
+public interface CompilerEnvironment {
+
+    /**
+     *
+     * @param className
+     * @return
+     * @throws Exception
+     */
+    byte[] findClass(String className) throws Exception;
+
+    /**
+     *
+     * @param className
+     * @return
+     * @throws Exception
+     */
+    char[] findSource(String className) throws Exception;
+
+    /**
+     *  
+     * @param packageName
+     * @return
+     */
+    boolean isPackage(String packageName);
+
+    /**
+     *
+     */
+    void cleanup();
+}
diff --git a/src/main/java/org/apache/sling/commons/compiler/ErrorHandler.java b/src/main/java/org/apache/sling/commons/compiler/ErrorHandler.java
new file mode 100644
index 0000000..40cf544
--- /dev/null
+++ b/src/main/java/org/apache/sling/commons/compiler/ErrorHandler.java
@@ -0,0 +1,41 @@
+/*
+ * 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.commons.compiler;
+
+/**
+ *
+ */
+public interface ErrorHandler {
+
+    /**
+     *
+     * @param msg
+     * @param sourceFile
+     * @param line
+     * @param position
+     */
+    void onError(String msg, String sourceFile, int line, int position);
+
+    /**
+     *
+     * @param msg
+     * @param sourceFile
+     * @param line
+     * @param position
+     */
+    void onWarning(String msg, String sourceFile, int line, int position);
+}
diff --git a/src/main/java/org/apache/sling/commons/compiler/JavaCompiler.java b/src/main/java/org/apache/sling/commons/compiler/JavaCompiler.java
new file mode 100644
index 0000000..a92b9ed
--- /dev/null
+++ b/src/main/java/org/apache/sling/commons/compiler/JavaCompiler.java
@@ -0,0 +1,38 @@
+/*
+ * 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.commons.compiler;
+
+/**
+ * The <code>JavaCompiler</code> provides platform independant Java Compilation 
+ * support.
+ */
+public interface JavaCompiler {
+
+	/**
+     *
+     * @param units
+     * @param env
+     * @param classWriter
+     * @param errorHandler
+     * @param generateDebugInfo
+     * @param sourceVersion
+     * @return
+     */
+    boolean compile(CompileUnit[] units, CompilerEnvironment env,
+                        ClassWriter classWriter, ErrorHandler errorHandler,
+                        Options options);
+}
diff --git a/src/main/java/org/apache/sling/commons/compiler/Options.java b/src/main/java/org/apache/sling/commons/compiler/Options.java
new file mode 100644
index 0000000..23b0625
--- /dev/null
+++ b/src/main/java/org/apache/sling/commons/compiler/Options.java
@@ -0,0 +1,56 @@
+/*
+ * 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.commons.compiler;
+
+public class Options {
+
+    public static final String VERSION_RUNTIME = null;
+    public static final String VERSION_1_1 = "1.1";
+    public static final String VERSION_1_2 = "1.2";
+    public static final String VERSION_1_3 = "1.3";
+    public static final String VERSION_1_4 = "1.4";
+    public static final String VERSION_1_5 = "1.5";
+    public static final String VERSION_1_6 = "1.6"; 
+
+    protected String sourceVersion;
+    protected boolean generateDebugInfo;
+
+    public Options() {
+        this(VERSION_RUNTIME, true);
+    }
+    
+    public Options(String sourceVersion, boolean generateDebugInfo) {
+        this.sourceVersion = sourceVersion;
+        this.generateDebugInfo = generateDebugInfo;
+    }
+
+    public String getSourceVersion() {
+        return sourceVersion;
+    }
+
+    public void setSourceVersion(String sourceVersion) {
+        this.sourceVersion = sourceVersion;
+    }
+
+    public boolean isGenerateDebugInfo() {
+        return generateDebugInfo;
+    }
+
+    public void setGenerateDebugInfo(boolean generateDebugInfo) {
+        this.generateDebugInfo = generateDebugInfo;
+    }
+}
diff --git a/src/main/java/org/apache/sling/commons/compiler/impl/EclipseJavaCompiler.java b/src/main/java/org/apache/sling/commons/compiler/impl/EclipseJavaCompiler.java
new file mode 100644
index 0000000..7a49601
--- /dev/null
+++ b/src/main/java/org/apache/sling/commons/compiler/impl/EclipseJavaCompiler.java
@@ -0,0 +1,303 @@
+/*
+ * 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.commons.compiler.impl;
+
+import org.apache.sling.commons.compiler.ClassWriter;
+import org.apache.sling.commons.compiler.CompileUnit;
+import org.apache.sling.commons.compiler.JavaCompiler;
+import org.apache.sling.commons.compiler.CompilerEnvironment;
+import org.apache.sling.commons.compiler.ErrorHandler;
+import org.apache.sling.commons.compiler.Options;
+import org.eclipse.jdt.internal.compiler.env.ICompilationUnit;
+import org.eclipse.jdt.internal.compiler.env.INameEnvironment;
+import org.eclipse.jdt.internal.compiler.env.NameEnvironmentAnswer;
+import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
+import org.eclipse.jdt.internal.compiler.problem.DefaultProblemFactory;
+import org.eclipse.jdt.internal.compiler.IProblemFactory;
+import org.eclipse.jdt.internal.compiler.IErrorHandlingPolicy;
+import org.eclipse.jdt.internal.compiler.DefaultErrorHandlingPolicies;
+import org.eclipse.jdt.internal.compiler.ICompilerRequestor;
+import org.eclipse.jdt.internal.compiler.CompilationResult;
+import org.eclipse.jdt.internal.compiler.ClassFile;
+import org.eclipse.jdt.internal.compiler.classfmt.ClassFileReader;
+import org.eclipse.jdt.core.compiler.CharOperation;
+import org.eclipse.jdt.core.compiler.CategorizedProblem;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.Locale;
+import java.util.HashMap;
+import java.io.PrintWriter;
+import java.io.CharArrayReader;
+import java.io.BufferedReader;
+import java.io.IOException;
+
+/**
+ * The <code>EclipseJavaCompiler</code> provides platform independant Java Compilation 
+ * support using the Eclipse Java Compiler (org.eclipse.jdt).
+ * 
+ * @scr.component metatype="no"
+ * @scr.service interface="org.apache.sling.commons.compiler.JavaCompiler"
+ */
+public class EclipseJavaCompiler implements JavaCompiler {
+
+    /** Logger instance */
+    private static final Logger log = LoggerFactory.getLogger(JavaCompiler.class);
+
+    // the static problem factory
+    private static IProblemFactory PROBLEM_FACTORY =
+        new DefaultProblemFactory(Locale.getDefault());
+
+    public EclipseJavaCompiler() {
+    }
+
+    /**
+     *
+     * @param units
+     * @param env
+     * @param classWriter
+     * @param errorHandler
+     * @param options
+     * @return
+     */
+    public boolean compile(CompileUnit[] units, CompilerEnvironment env,
+            ClassWriter classWriter, ErrorHandler errorHandler,
+            Options options) {
+
+        IErrorHandlingPolicy policy =
+            DefaultErrorHandlingPolicies.proceedWithAllProblems();
+
+        // output for non-error log messages
+        PrintWriter logWriter = null;
+
+        if (options == null) {
+            options = new Options();
+        }
+        
+        HashMap props = new HashMap();
+        if (options.isGenerateDebugInfo()) {
+            props.put("org.eclipse.jdt.core.compiler.debug.localVariable", "generate");
+            props.put("org.eclipse.jdt.core.compiler.debug.lineNumber", "generate");
+            props.put("org.eclipse.jdt.core.compiler.debug.sourceFile", "generate");
+        }
+        String sourceVersion = options.getSourceVersion();
+        if (sourceVersion != null) {
+            props.put("org.eclipse.jdt.core.compiler.source", sourceVersion);
+            //options.put("org.eclipse.jdt.core.compiler.compliance", sourceVersion);
+            //options.put("org.eclipse.jdt.core.compiler.codegen.targetPlatform", sourceVersion);
+        }
+        //options.put("org.eclipse.jdt.core.encoding", "UTF8");
+        CompilerOptions settings = new CompilerOptions(props);
+        
+        CompileContext context = new CompileContext(units, env, errorHandler, classWriter);
+
+        if (log.isDebugEnabled()) {
+            log.debug(settings.toString());
+        }
+        
+        org.eclipse.jdt.internal.compiler.Compiler compiler =
+                new org.eclipse.jdt.internal.compiler.Compiler(
+                        context,
+                        policy,
+                        settings,
+                        context,
+                        PROBLEM_FACTORY,
+                        logWriter);
+
+        compiler.compile(context.sourceUnits());
+
+        context.cleanup();
+        
+        return !context.hadErrors;
+    }
+
+    //--------------------------------------------------------< inner classes >
+
+    private class CompileContext implements ICompilerRequestor, INameEnvironment {
+
+        boolean hadErrors;
+        HashMap<String,ICompilationUnit> compUnits;
+
+        ErrorHandler errorHandler;
+        ClassWriter classWriter;
+
+        CompilerEnvironment compEnv;
+
+        CompileContext(CompileUnit[] units,
+        		CompilerEnvironment compEnv,
+        		ErrorHandler errorHandler, 
+        		ClassWriter classWriter) {
+            
+        	compUnits = new HashMap<String,ICompilationUnit>(units.length);
+            for (int i = 0; i < units.length; i++) {
+                CompilationUnitAdapter cua = new CompilationUnitAdapter(units[i]);
+                char[][] compoundName = CharOperation.arrayConcat(cua.getPackageName(), cua.getMainTypeName());
+                compUnits.put(CharOperation.toString(compoundName), new CompilationUnitAdapter(units[i]));
+            }
+        	
+        	this.compEnv = compEnv;
+        	this.errorHandler = errorHandler;
+            this.classWriter = classWriter;
+            hadErrors = false;
+        }
+
+        ICompilationUnit[] sourceUnits() {
+        	return (ICompilationUnit[]) compUnits.values().toArray(
+        			new ICompilationUnit[compUnits.size()]);
+        }
+        
+        //---------------------------------------------------< ICompilerRequestor >
+        /**
+         * {@inheritDoc}
+         */
+        public void acceptResult(CompilationResult result) {
+            if (result.hasErrors()) {
+                hadErrors = true;
+            }
+
+            if (result.hasProblems()) {
+                CategorizedProblem[] problems = result.getProblems();
+                for (int i = 0; i < problems.length; i++) {
+                    CategorizedProblem problem = problems[i];
+                    String msg = problem.getMessage();
+                    String fileName = CharOperation.charToString(problem.getOriginatingFileName());
+                    int line = problem.getSourceLineNumber();
+                    int pos = problem.getSourceStart();
+
+                    if (problem.isError()) {
+                        errorHandler.onError(msg, fileName, line, pos);
+                    } else if (problem.isWarning()) {
+                        errorHandler.onWarning(msg, fileName, line, pos);
+                    } else {
+                        log.debug("unknown problem category: " + problem.toString());
+                    }
+                }
+            }
+            ClassFile[] classFiles = result.getClassFiles();
+            for (int i = 0; i < classFiles.length; i++) {
+                ClassFile classFile = classFiles[i];
+                String className = CharOperation.toString(classFile.getCompoundName());
+                try {
+                    classWriter.write(className, classFile.getBytes());
+                } catch (Exception e) {
+                    log.error("failed to persist class " + className, e);
+                }
+            }
+        }
+
+        //-------------------------------------------------< INameEnvironment >
+        /**
+         * {@inheritDoc}
+         */
+        public NameEnvironmentAnswer findType(char[][] compoundTypeName) {
+            // check 1st if type corresponds with any of current compilation units
+            String fqn = CharOperation.toString(compoundTypeName);
+            ICompilationUnit cu = (ICompilationUnit) compUnits.get(fqn);
+            if (cu != null) {
+                return new NameEnvironmentAnswer(cu, null);
+            }
+
+            // locate the class through the class loader
+            try {
+                byte[] bytes = compEnv.findClass(CharOperation.toString(compoundTypeName));
+                if (bytes == null) {
+                    return null;
+                }
+                ClassFileReader classFileReader =
+                        new ClassFileReader(bytes, fqn.toCharArray(), true);
+                return new NameEnvironmentAnswer(classFileReader, null);
+            } catch (Exception e) {
+                return null;
+            }
+        }
+
+        /**
+         * {@inheritDoc}
+         */
+        public NameEnvironmentAnswer findType(char[] typeName, char[][] packageName) {
+            return findType(CharOperation.arrayConcat(packageName, typeName));
+        }
+
+        /**
+         * {@inheritDoc}
+         */
+        public boolean isPackage(char[][] parentPackageName, char[] packageName) {
+            String fqn = CharOperation.toString(
+                    CharOperation.arrayConcat(parentPackageName, packageName));
+            return compUnits.get(fqn) == null && compEnv.isPackage(fqn);
+        }
+
+        /**
+         * {@inheritDoc}
+         */
+        public void cleanup() {
+            compEnv.cleanup();
+        }
+    }
+    
+    private class CompilationUnitAdapter implements ICompilationUnit {
+
+        CompileUnit compUnit;
+        char[][] packageName;
+
+        CompilationUnitAdapter(CompileUnit compUnit) {
+            this.compUnit = compUnit;
+        }
+
+        String extractPackageName(char[] contents) {
+            BufferedReader reader = new BufferedReader(new CharArrayReader(contents));
+            try {
+                String line;
+                while ((line = reader.readLine()) != null) {
+                    line = line.trim();
+                    if (line.startsWith("package")) {
+                        line = line.substring("package".length());
+                        line = line.substring(0, line.lastIndexOf(';'));
+                        return line.trim();
+                    }
+                }
+            } catch (IOException e) {
+                // should never get here...
+            }
+
+            // no package declaration found
+            return "";
+        }
+
+        //-------------------------------------------------< ICompilationUnit >
+
+        public char[] getContents() {
+            return compUnit.getSourceFileContents();
+        }
+
+        public char[] getMainTypeName() {
+            return compUnit.getMainTypeName().toCharArray();
+        }
+
+        public char[][] getPackageName() {
+            if (packageName == null) {
+                String s = extractPackageName(compUnit.getSourceFileContents());
+                packageName = CharOperation.splitOn('.', s.toCharArray());
+            }
+            return packageName;
+        }
+
+        public char[] getFileName() {
+            return compUnit.getSourceFileName().toCharArray();
+        }
+    }
+}
diff --git a/src/main/resources/META-INF/DISCLAIMER b/src/main/resources/META-INF/DISCLAIMER
new file mode 100644
index 0000000..90850c2
--- /dev/null
+++ b/src/main/resources/META-INF/DISCLAIMER
@@ -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
diff --git a/src/main/resources/META-INF/LICENSE b/src/main/resources/META-INF/LICENSE
new file mode 100644
index 0000000..1b63f8d
--- /dev/null
+++ b/src/main/resources/META-INF/LICENSE
@@ -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.
diff --git a/src/main/resources/META-INF/NOTICE b/src/main/resources/META-INF/NOTICE
new file mode 100644
index 0000000..d7953a3
--- /dev/null
+++ b/src/main/resources/META-INF/NOTICE
@@ -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/).
diff --git a/src/test/java/org/apache/sling/commons/compiler/impl/CompilerJava5Test.java b/src/test/java/org/apache/sling/commons/compiler/impl/CompilerJava5Test.java
new file mode 100644
index 0000000..3af2998
--- /dev/null
+++ b/src/test/java/org/apache/sling/commons/compiler/impl/CompilerJava5Test.java
@@ -0,0 +1,159 @@
+/*
+ * 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.commons.compiler.impl;
+
+import java.io.ByteArrayOutputStream;
+import java.io.CharArrayWriter;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.Reader;
+
+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.Options;
+
+import junit.framework.TestCase;
+
+/**
+ * Test case for java 5 support
+ */
+public class CompilerJava5Test extends TestCase
+        implements CompilerEnvironment, ErrorHandler, ClassWriter {
+
+    public void testJava5Support() throws Exception {
+        String sourceFile = "Java5Test";
+
+        CompileUnit unit = createCompileUnit(sourceFile);
+        new EclipseJavaCompiler().compile(new CompileUnit[]{unit}, this, this, this, new Options(Options.VERSION_1_5, true));
+    }
+
+    //---------------------------------------------------------< ErrorHandler >
+
+    public void onError(String msg, String sourceFile, int line, int position) {
+        System.out.println("Error in " + sourceFile + ", line " + line + ", pos. " + position + ": " + msg);
+    }
+
+    public void onWarning(String msg, String sourceFile, int line, int position) {
+        System.out.println("Warning in " + sourceFile + ", line " + line + ", pos. " + position + ": " + msg);
+    }
+
+    //--------------------------------------------------< CompilerEnvironment >
+
+    public byte[] findClass(String className) throws Exception {
+        System.out.println("findClass('" + className + "')");
+        ClassLoader cl = Thread.currentThread().getContextClassLoader();
+        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();
+    }
+
+    public char[] findSource(String className) throws Exception {
+        System.out.println("findSource('" + className + "')");
+        return new char[0];
+    }
+
+    public boolean isPackage(String packageName) {
+        System.out.println("isPackage('" + packageName + "')");
+
+        ClassLoader cl = Thread.currentThread().getContextClassLoader();
+        InputStream in = cl.getResourceAsStream(packageName.replace('.', '/') + ".class");
+        if (in != null) {
+            try {
+                in.close();
+            } catch (IOException ignore) {
+            }
+            return false;
+        }
+        return true;
+    }
+
+    public void cleanup() {
+    }
+
+    //----------------------------------------------------------< ClassWriter >
+
+    public void write(String className, byte[] data) throws Exception {
+        System.out.println("compiled class " + className + ", " + data.length + " bytes");
+    }
+
+    //--------------------------------------------------------< 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);
+            }
+        };
+    }
+
+    private char[] readTextResource(String resourcePath) throws IOException {
+        InputStream in = getClass().getClassLoader().getResourceAsStream(resourcePath);
+        if (in == null) {
+            throw new IOException("resource not found");
+        }
+        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();
+        }
+    }
+}
diff --git a/src/test/java/org/apache/sling/commons/compiler/impl/EclipseJavaCompilerTest.java b/src/test/java/org/apache/sling/commons/compiler/impl/EclipseJavaCompilerTest.java
new file mode 100644
index 0000000..f27b4c5
--- /dev/null
+++ b/src/test/java/org/apache/sling/commons/compiler/impl/EclipseJavaCompilerTest.java
@@ -0,0 +1,45 @@
+/*
+ * 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.commons.compiler.impl;
+
+import org.apache.sling.commons.compiler.JavaCompiler;
+
+import junit.framework.TestCase;
+
+public class EclipseJavaCompilerTest extends TestCase {
+
+    private JavaCompiler compiler;
+    
+    @Override
+    protected void setUp() throws Exception {
+        compiler = new EclipseJavaCompiler();
+        
+        super.setUp();
+    }
+
+    @Override
+    protected void tearDown() throws Exception {
+        compiler = null;
+        
+        super.tearDown();
+    }
+    
+    public void testCompileJava5() throws Exception {
+        
+    }
+
+}
diff --git a/src/test/resources/Java5Test b/src/test/resources/Java5Test
new file mode 100644
index 0000000..83bf4ac
--- /dev/null
+++ b/src/test/resources/Java5Test
@@ -0,0 +1,31 @@
+/*
+ * 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.commons.compiler.test ;
+
+import java.util.List;
+
+/**
+ * Class to test to compile Java 5 specific code
+ */
+public class Java5Test {
+    public int sum(List<Integer> intList) {
+	int result = 0;
+	for(int i=0;i<intList.size();i++)
+	    result += intList.get(i).intValue();
+	return result;
+    }
+}

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-org-apache-sling-commons-compiler] 15/18: Remove empty code and prints to system out.

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.commons.compiler-1.0.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-commons-compiler.git

commit f5c7f26572cc2299a5db24194077543ace91ed47
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Wed Aug 5 15:33:58 2009 +0000

    Remove empty code and prints to system out.
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/contrib/commons/compiler@801268 13f79535-47bb-0310-9956-ffa450edef68
---
 .../apache/sling/commons/compiler/CompileUnit.java | 11 ----
 .../commons/compiler/CompilerEnvironment.java      | 17 ------
 .../sling/commons/compiler/JavaCompiler.java       | 12 +---
 .../commons/compiler/impl/EclipseJavaCompiler.java | 71 ++++++++++------------
 .../commons/compiler/impl/CompilerJava5Test.java   | 10 +--
 5 files changed, 37 insertions(+), 84 deletions(-)

diff --git a/src/main/java/org/apache/sling/commons/compiler/CompileUnit.java b/src/main/java/org/apache/sling/commons/compiler/CompileUnit.java
index 9fbd2f0..92723ca 100644
--- a/src/main/java/org/apache/sling/commons/compiler/CompileUnit.java
+++ b/src/main/java/org/apache/sling/commons/compiler/CompileUnit.java
@@ -16,21 +16,10 @@
  */
 package org.apache.sling.commons.compiler;
 
-/**
- *
- */
 public interface CompileUnit {
 
-    /**
-     *
-     * @return
-     */
     String getSourceFileName();
 
-    /**
-     *
-     * @return
-     */
     char[] getSourceFileContents();
 
     /**
diff --git a/src/main/java/org/apache/sling/commons/compiler/CompilerEnvironment.java b/src/main/java/org/apache/sling/commons/compiler/CompilerEnvironment.java
index 26f6f7d..cddb7f7 100644
--- a/src/main/java/org/apache/sling/commons/compiler/CompilerEnvironment.java
+++ b/src/main/java/org/apache/sling/commons/compiler/CompilerEnvironment.java
@@ -16,28 +16,11 @@
  */
 package org.apache.sling.commons.compiler;
 
-/**
- *
- */
 public interface CompilerEnvironment {
 
-    /**
-     *
-     * @param className
-     * @return
-     * @throws Exception
-     */
     byte[] findClass(String className) throws Exception;
 
-    /**
-     *  
-     * @param packageName
-     * @return
-     */
     boolean isPackage(String packageName);
 
-    /**
-     *
-     */
     void cleanup();
 }
diff --git a/src/main/java/org/apache/sling/commons/compiler/JavaCompiler.java b/src/main/java/org/apache/sling/commons/compiler/JavaCompiler.java
index a92b9ed..67240f0 100644
--- a/src/main/java/org/apache/sling/commons/compiler/JavaCompiler.java
+++ b/src/main/java/org/apache/sling/commons/compiler/JavaCompiler.java
@@ -17,21 +17,11 @@
 package org.apache.sling.commons.compiler;
 
 /**
- * The <code>JavaCompiler</code> provides platform independant Java Compilation 
+ * The <code>JavaCompiler</code> provides platform independant Java Compilation
  * support.
  */
 public interface JavaCompiler {
 
-	/**
-     *
-     * @param units
-     * @param env
-     * @param classWriter
-     * @param errorHandler
-     * @param generateDebugInfo
-     * @param sourceVersion
-     * @return
-     */
     boolean compile(CompileUnit[] units, CompilerEnvironment env,
                         ClassWriter classWriter, ErrorHandler errorHandler,
                         Options options);
diff --git a/src/main/java/org/apache/sling/commons/compiler/impl/EclipseJavaCompiler.java b/src/main/java/org/apache/sling/commons/compiler/impl/EclipseJavaCompiler.java
index 1d3035e..8dc6c1a 100644
--- a/src/main/java/org/apache/sling/commons/compiler/impl/EclipseJavaCompiler.java
+++ b/src/main/java/org/apache/sling/commons/compiler/impl/EclipseJavaCompiler.java
@@ -16,40 +16,41 @@
  */
 package org.apache.sling.commons.compiler.impl;
 
+import java.io.BufferedReader;
+import java.io.CharArrayReader;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.util.HashMap;
+import java.util.Locale;
+import java.util.Map;
+
 import org.apache.sling.commons.compiler.ClassWriter;
 import org.apache.sling.commons.compiler.CompileUnit;
-import org.apache.sling.commons.compiler.JavaCompiler;
 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.eclipse.jdt.core.compiler.CategorizedProblem;
+import org.eclipse.jdt.core.compiler.CharOperation;
+import org.eclipse.jdt.internal.compiler.ClassFile;
+import org.eclipse.jdt.internal.compiler.CompilationResult;
+import org.eclipse.jdt.internal.compiler.DefaultErrorHandlingPolicies;
+import org.eclipse.jdt.internal.compiler.ICompilerRequestor;
+import org.eclipse.jdt.internal.compiler.IErrorHandlingPolicy;
+import org.eclipse.jdt.internal.compiler.IProblemFactory;
+import org.eclipse.jdt.internal.compiler.classfmt.ClassFileReader;
 import org.eclipse.jdt.internal.compiler.env.ICompilationUnit;
 import org.eclipse.jdt.internal.compiler.env.INameEnvironment;
 import org.eclipse.jdt.internal.compiler.env.NameEnvironmentAnswer;
 import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
 import org.eclipse.jdt.internal.compiler.problem.DefaultProblemFactory;
-import org.eclipse.jdt.internal.compiler.IProblemFactory;
-import org.eclipse.jdt.internal.compiler.IErrorHandlingPolicy;
-import org.eclipse.jdt.internal.compiler.DefaultErrorHandlingPolicies;
-import org.eclipse.jdt.internal.compiler.ICompilerRequestor;
-import org.eclipse.jdt.internal.compiler.CompilationResult;
-import org.eclipse.jdt.internal.compiler.ClassFile;
-import org.eclipse.jdt.internal.compiler.classfmt.ClassFileReader;
-import org.eclipse.jdt.core.compiler.CharOperation;
-import org.eclipse.jdt.core.compiler.CategorizedProblem;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import java.util.Locale;
-import java.util.HashMap;
-import java.io.PrintWriter;
-import java.io.CharArrayReader;
-import java.io.BufferedReader;
-import java.io.IOException;
-
 /**
- * The <code>EclipseJavaCompiler</code> provides platform independant Java Compilation 
+ * The <code>EclipseJavaCompiler</code> provides platform independant Java Compilation
  * support using the Eclipse Java Compiler (org.eclipse.jdt).
- * 
+ *
  * @scr.component metatype="no"
  * @scr.service interface="org.apache.sling.commons.compiler.JavaCompiler"
  */
@@ -66,13 +67,7 @@ public class EclipseJavaCompiler implements JavaCompiler {
     }
 
     /**
-     *
-     * @param units
-     * @param env
-     * @param classWriter
-     * @param errorHandler
-     * @param options
-     * @return
+     * @see org.apache.sling.commons.compiler.JavaCompiler#compile(org.apache.sling.commons.compiler.CompileUnit[], org.apache.sling.commons.compiler.CompilerEnvironment, org.apache.sling.commons.compiler.ClassWriter, org.apache.sling.commons.compiler.ErrorHandler, org.apache.sling.commons.compiler.Options)
      */
     public boolean compile(CompileUnit[] units, CompilerEnvironment env,
             ClassWriter classWriter, ErrorHandler errorHandler,
@@ -87,8 +82,8 @@ public class EclipseJavaCompiler implements JavaCompiler {
         if (options == null) {
             options = new Options();
         }
-        
-        HashMap props = new HashMap();
+
+        Map<String, String> props = new HashMap<String, String>();
         if (options.isGenerateDebugInfo()) {
             props.put("org.eclipse.jdt.core.compiler.debug.localVariable", "generate");
             props.put("org.eclipse.jdt.core.compiler.debug.lineNumber", "generate");
@@ -102,13 +97,13 @@ public class EclipseJavaCompiler implements JavaCompiler {
         }
         //options.put("org.eclipse.jdt.core.encoding", "UTF8");
         CompilerOptions settings = new CompilerOptions(props);
-        
+
         CompileContext context = new CompileContext(units, env, errorHandler, classWriter);
 
         if (log.isDebugEnabled()) {
             log.debug(settings.toString());
         }
-        
+
         org.eclipse.jdt.internal.compiler.Compiler compiler =
                 new org.eclipse.jdt.internal.compiler.Compiler(
                         context,
@@ -121,7 +116,7 @@ public class EclipseJavaCompiler implements JavaCompiler {
         compiler.compile(context.sourceUnits());
 
         context.cleanup();
-        
+
         return !context.hadErrors;
     }
 
@@ -139,16 +134,16 @@ public class EclipseJavaCompiler implements JavaCompiler {
 
         CompileContext(CompileUnit[] units,
         		CompilerEnvironment compEnv,
-        		ErrorHandler errorHandler, 
+        		ErrorHandler errorHandler,
         		ClassWriter classWriter) {
-            
+
         	compUnits = new HashMap<String,ICompilationUnit>(units.length);
             for (int i = 0; i < units.length; i++) {
                 CompilationUnitAdapter cua = new CompilationUnitAdapter(units[i]);
                 char[][] compoundName = CharOperation.arrayConcat(cua.getPackageName(), cua.getMainTypeName());
                 compUnits.put(CharOperation.toString(compoundName), new CompilationUnitAdapter(units[i]));
             }
-        	
+
         	this.compEnv = compEnv;
         	this.errorHandler = errorHandler;
             this.classWriter = classWriter;
@@ -156,10 +151,10 @@ public class EclipseJavaCompiler implements JavaCompiler {
         }
 
         ICompilationUnit[] sourceUnits() {
-        	return (ICompilationUnit[]) compUnits.values().toArray(
+        	return compUnits.values().toArray(
         			new ICompilationUnit[compUnits.size()]);
         }
-        
+
         //---------------------------------------------------< ICompilerRequestor >
         /**
          * {@inheritDoc}
@@ -206,7 +201,7 @@ public class EclipseJavaCompiler implements JavaCompiler {
         public NameEnvironmentAnswer findType(char[][] compoundTypeName) {
             // check 1st if type corresponds with any of current compilation units
             String fqn = CharOperation.toString(compoundTypeName);
-            ICompilationUnit cu = (ICompilationUnit) compUnits.get(fqn);
+            ICompilationUnit cu = compUnits.get(fqn);
             if (cu != null) {
                 return new NameEnvironmentAnswer(cu, null);
             }
@@ -248,7 +243,7 @@ public class EclipseJavaCompiler implements JavaCompiler {
             compEnv.cleanup();
         }
     }
-    
+
     private class CompilationUnitAdapter implements ICompilationUnit {
 
         CompileUnit compUnit;
diff --git a/src/test/java/org/apache/sling/commons/compiler/impl/CompilerJava5Test.java b/src/test/java/org/apache/sling/commons/compiler/impl/CompilerJava5Test.java
index 3af2998..598eb33 100644
--- a/src/test/java/org/apache/sling/commons/compiler/impl/CompilerJava5Test.java
+++ b/src/test/java/org/apache/sling/commons/compiler/impl/CompilerJava5Test.java
@@ -23,14 +23,14 @@ import java.io.InputStream;
 import java.io.InputStreamReader;
 import java.io.Reader;
 
+import junit.framework.TestCase;
+
 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.Options;
 
-import junit.framework.TestCase;
-
 /**
  * Test case for java 5 support
  */
@@ -57,7 +57,6 @@ public class CompilerJava5Test extends TestCase
     //--------------------------------------------------< CompilerEnvironment >
 
     public byte[] findClass(String className) throws Exception {
-        System.out.println("findClass('" + className + "')");
         ClassLoader cl = Thread.currentThread().getContextClassLoader();
         InputStream in = cl.getResourceAsStream(className.replace('.', '/') + ".class");
         if (in == null) {
@@ -80,13 +79,10 @@ public class CompilerJava5Test extends TestCase
     }
 
     public char[] findSource(String className) throws Exception {
-        System.out.println("findSource('" + className + "')");
         return new char[0];
     }
 
     public boolean isPackage(String packageName) {
-        System.out.println("isPackage('" + packageName + "')");
-
         ClassLoader cl = Thread.currentThread().getContextClassLoader();
         InputStream in = cl.getResourceAsStream(packageName.replace('.', '/') + ".class");
         if (in != null) {
@@ -105,7 +101,7 @@ public class CompilerJava5Test extends TestCase
     //----------------------------------------------------------< ClassWriter >
 
     public void write(String className, byte[] data) throws Exception {
-        System.out.println("compiled class " + className + ", " + data.length + " bytes");
+        // nothing to do
     }
 
     //--------------------------------------------------------< misc. helpers >

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-org-apache-sling-commons-compiler] 06/18: Use release parent pom

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.commons.compiler-1.0.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-commons-compiler.git

commit c9002dbe2231dff6940762f5cb888642b5f770b0
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Tue May 5 15:06:21 2009 +0000

    Use release parent pom
    
    git-svn-id: https://svn.apache.org/repos/asf/incubator/sling/trunk/contrib/commons/compiler@771764 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index 2bea15a..62bdbca 100644
--- a/pom.xml
+++ b/pom.xml
@@ -23,7 +23,7 @@
     <parent>
         <groupId>org.apache.sling</groupId>
         <artifactId>sling</artifactId>
-        <version>5-incubator-SNAPSHOT</version>
+        <version>5-incubator</version>
         <relativePath>../../../parent/pom.xml</relativePath>
     </parent>
 

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-org-apache-sling-commons-compiler] 02/18: Ignore the target directory.

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.commons.compiler-1.0.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-commons-compiler.git

commit 71a6b19a77d5e38f348bd73e9f342fdf964e3373
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Wed Feb 25 17:05:01 2009 +0000

    Ignore the target directory.
    
    git-svn-id: https://svn.apache.org/repos/asf/incubator/sling/trunk/contrib/commons/compiler@747862 13f79535-47bb-0310-9956-ffa450edef68

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.