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 10:01:49 UTC

[sling-org-apache-sling-scripting-api] annotated tag org.apache.sling.scripting.api-2.0.2-incubator created (now 9ea5cda)

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

rombert pushed a change to annotated tag org.apache.sling.scripting.api-2.0.2-incubator
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-scripting-api.git.


      at 9ea5cda  (tag)
 tagging 76ddc2241b1a125991b1504448e39e3f13839540 (commit)
      by Felix Meschberger
      on Thu Jun 18 09:21:02 2009 +0000

- Log -----------------------------------------------------------------
org.apache.sling.scripting.api-2.0.2-incubator
-----------------------------------------------------------------------

This annotated tag includes the following new commits:

     new 546cb6a  SLING-110 Add Java Script API with Sling extensions
     new 1499650  Switch to BSF 3 SNAPSHOT until missing BSF 3.0-beta2 parent pom is in the maven repositories
     new a34e96b  Implement Service.providers method for the script engine factories to be available for microsling and allow setXXX methods to get null to initialize with an empty list.
     new fa8b9b1  Empty lists by default
     new c1b754f  Temporarily rename Service class to use the JDK provided instance. See dev list for more info.
     new fd16099  Rename ServiceX to Service again. This class was implemented incorrectly. The returned Iterator is expected to return SPI instances and not the fully qualified class names of the SPI classes. Now it works correctly.
     new 273e7dd  Apply correct header.
     new fa28153  Switching back to BSF 3.0-beta2 as the parent pom has now been distributed to the maven repositories.
     new 7af87be  Remove unused import.
     new 71bdf53  SLING-197 Merge resource integration concept into trunk
     new dbf328f  Use OSGi core and cmpendium jars from Felix project.
     new a7960d1  SLING-204 - add svn ignore patterns for intellij
     new c5a8547  Move licence and notice to top level dir.
     new 33dbb93  Add incubator disclaimer.
     new 4583c5c  Write first element in pom in one line (to avoid problems with the maven release plugin) and minor pom fixes.
     new 9abe8f3  Update notice files.
     new 8c4bfe8  Exclude maven-eclipse.xml generated by the maven eclipse plugin.
     new 2e7dbdd  SLING-495 - NOTICE files generated using mknotice script
     new 29455c2  SLING-495 - NOTICE files updated according to changes in revision 662927
     new c4fb34f  SLING-495 - NOTICE files regenerated with revision 663097 changes
     new b90e9c2  Use released version of parent pom.
     new 538b7a0  [maven-release-plugin] prepare release org.apache.sling.scripting.api-2.0.0-incubator
     new 5d519ae  [maven-release-plugin] prepare for next development iteration
     new b4b5e0c  Fix reference to parent pom.
     new 5061924  SLING-521: Restore more notice files.
     new e09ae6e  SLING-521: Separate between notice files for bin and src dists.
     new 14d51e2  SLING-521: Separate between notice files for bin and src dists.
     new ff3f5ea  Change copyright year to 2008.
     new ab73692  [maven-release-plugin]  copy for tag org.apache.sling.scripting.api-2.0.2-incubator
     new 7df3a15  Move Sling to new TLP location
     new 76ddc22  Move Sling to new TLP location

The 31 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-scripting-api] 01/31: SLING-110 Add Java Script API with Sling extensions

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.scripting.api-2.0.2-incubator
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-scripting-api.git

commit 546cb6a82e7ef9592e7cb69e1150550eb379fb31
Author: Felix Meschberger <fm...@apache.org>
AuthorDate: Mon Dec 17 11:37:09 2007 +0000

    SLING-110 Add Java Script API with Sling extensions
    
    git-svn-id: https://svn.apache.org/repos/asf/incubator/sling/trunk/scripting/api@604837 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml                                            | 111 +++++++++++++++
 .../scripting/api/AbstractScriptEngineFactory.java | 153 +++++++++++++++++++++
 .../scripting/api/AbstractSlingScriptEngine.java   |  48 +++++++
 src/main/java/sun/misc/Service.java                |  44 ++++++
 4 files changed, 356 insertions(+)

diff --git a/pom.xml b/pom.xml
new file mode 100644
index 0000000..a03768b
--- /dev/null
+++ b/pom.xml
@@ -0,0 +1,111 @@
+<?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>1-incubator-SNAPSHOT</version>
+        <relativePath>../../parent/pom.xml</relativePath>
+    </parent>
+
+    <artifactId>org.apache.sling.scripting.api</artifactId>
+    <version>2.0.0-incubator-SNAPSHOT</version>
+    <packaging>bundle</packaging>
+
+    <name>Sling - Scripting Implementation API</name>
+    <description>
+        This bundle provides the internal API to implement scripting. As such
+        it bundles the Java Scripting API provided by Apache BSF.
+    </description>
+
+    <scm>
+        <connection>
+            scm:svn:http://svn.apache.org/repos/asf/incubator/sling/trunk/scripting/api
+        </connection>
+        <developerConnection>
+            scm:svn:https://svn.apache.org/repos/asf/incubator/sling/trunk/scripting/api
+        </developerConnection>
+        <url>
+            http://svn.apache.org/viewvc/incubator/sling/trunk/scripting/api
+        </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.scripting.api;version=${pom.version},
+                            javax.script
+                        </Export-Package>
+                        <Private-Package>
+                            sun.misc
+                        </Private-Package>
+                    </instructions>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+    <dependencies>
+        <dependency>
+            <groupId>javax.servlet</groupId>
+            <artifactId>servlet-api</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.bsf</groupId>
+            <artifactId>bsf-api</artifactId>
+            <version>3.0-beta2</version>
+            <scope>compile</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>osgi_R4_core</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>osgi_R4_compendium</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-api</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+        </dependency>
+
+    </dependencies>
+</project>
diff --git a/src/main/java/org/apache/sling/scripting/api/AbstractScriptEngineFactory.java b/src/main/java/org/apache/sling/scripting/api/AbstractScriptEngineFactory.java
new file mode 100644
index 0000000..4ac89b3
--- /dev/null
+++ b/src/main/java/org/apache/sling/scripting/api/AbstractScriptEngineFactory.java
@@ -0,0 +1,153 @@
+/*
+ * 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.scripting.api;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Arrays;
+import java.util.List;
+import java.util.jar.Attributes;
+import java.util.jar.Manifest;
+
+import javax.script.ScriptEngine;
+import javax.script.ScriptEngineFactory;
+
+public abstract class AbstractScriptEngineFactory implements
+        ScriptEngineFactory {
+
+    private String engineName;
+    private String engineVersion;
+    private List<String> extensions;
+    private List<String> mimeTypes;
+    private List<String> names;
+    
+    protected AbstractScriptEngineFactory() {
+        String name = null;
+        String version = null;
+
+        // try to get the manifest
+        Manifest manifest = null;
+        InputStream ins = null;
+        try {
+            ins = getClass().getResourceAsStream("/META-INF/MANIFEST.MF");
+            if (ins != null) {
+                manifest = new Manifest(ins);
+                Attributes attrs = manifest.getMainAttributes();
+                name = attrs.getValue("ScriptEngine-Name");
+                version = attrs.getValue("ScriptEngine-Version");
+            }
+        } catch (IOException ioe) {
+            // might want to log ?
+        } finally {
+            if (ins != null) {
+                try {
+                    ins.close();
+                } catch (IOException ignore) {
+                }
+            }
+        }
+
+        // fall back to class name and version zero
+        if (name == null) {
+            String className = getClass().getName();
+            name = className.substring(className.lastIndexOf('.') + 1);
+        }
+        if (version == null) {
+            version = "0";
+        }
+
+        setEngineName(name);
+        setEngineVersion(version);
+    }
+    
+    public String getEngineName() {
+        return engineName;
+    }
+
+    protected void setEngineName(String engineName) {
+        this.engineName = engineName;
+    }
+    
+    public String getEngineVersion() {
+        return engineVersion;
+    }
+
+    protected void setEngineVersion(String engineVersion) {
+        this.engineVersion = engineVersion;
+    }
+    
+    public List<String> getExtensions() {
+        return extensions;
+    }
+
+    protected void setExtensions(String... extensions) {
+        this.extensions = Arrays.asList(extensions);
+    }
+    
+    public List<String> getMimeTypes() {
+        return mimeTypes;
+    }
+
+    protected void setMimeTypes(String... mimeTypes) {
+        this.mimeTypes = Arrays.asList(mimeTypes);
+    }
+    
+    public List<String> getNames() {
+        return names;
+    }
+
+    protected void setNames(String... names) {
+        this.names = Arrays.asList(names);
+    }
+    
+    public String getMethodCallSyntax(String obj, String m, String[] args) {
+        StringBuffer callSyntax = new StringBuffer();
+        callSyntax.append(obj).append('.').append(m).append('(');
+        for (int i = 0; args != null && i < args.length; i++) {
+            if (i > 0) callSyntax.append(',');
+            callSyntax.append(args[i]);
+        }
+        callSyntax.append(')');
+        return callSyntax.toString();
+    }
+
+    public String getOutputStatement(String value) {
+        return "out.print(" + value + ")";
+    }
+
+    public Object getParameter(String name) {
+        if (ScriptEngine.ENGINE.equals(name)) {
+            return getEngineName();
+        } else if (ScriptEngine.ENGINE_VERSION.equals(name)) {
+            return getEngineVersion();
+        } else if (ScriptEngine.NAME.equals(name)) {
+            return getNames();
+        } else if (ScriptEngine.LANGUAGE.equals(name)) {
+            return getLanguageName();
+        } else if (ScriptEngine.LANGUAGE_VERSION.equals(name)) {
+            return getLanguageVersion();
+        }
+        return null;
+    }
+
+    public String getProgram(String[] arg0) {
+        return null;
+    }
+
+}
diff --git a/src/main/java/org/apache/sling/scripting/api/AbstractSlingScriptEngine.java b/src/main/java/org/apache/sling/scripting/api/AbstractSlingScriptEngine.java
new file mode 100644
index 0000000..4b7b112
--- /dev/null
+++ b/src/main/java/org/apache/sling/scripting/api/AbstractSlingScriptEngine.java
@@ -0,0 +1,48 @@
+/*
+ * $Url: $
+ * $Id: $
+ *
+ * Copyright 1997-2005 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.scripting.api;
+
+import java.io.Reader;
+import java.io.StringReader;
+
+import javax.script.AbstractScriptEngine;
+import javax.script.Bindings;
+import javax.script.ScriptContext;
+import javax.script.ScriptEngineFactory;
+import javax.script.ScriptException;
+import javax.script.SimpleBindings;
+
+public abstract class AbstractSlingScriptEngine extends AbstractScriptEngine {
+
+    private final ScriptEngineFactory scriptEngineFactory;
+    
+    protected AbstractSlingScriptEngine(ScriptEngineFactory scriptEngineFactory) {
+        this.scriptEngineFactory = scriptEngineFactory;
+    }
+    
+    public Bindings createBindings() {
+        return new SimpleBindings();
+    }
+
+    public Object eval(String script, ScriptContext context) throws ScriptException {
+        StringReader reader = new StringReader(script);
+        return eval(reader, context);
+    }
+
+    public ScriptEngineFactory getFactory() {
+        return scriptEngineFactory;
+    }
+
+}
diff --git a/src/main/java/sun/misc/Service.java b/src/main/java/sun/misc/Service.java
new file mode 100644
index 0000000..4b292f6
--- /dev/null
+++ b/src/main/java/sun/misc/Service.java
@@ -0,0 +1,44 @@
+/*
+ * 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 sun.misc;
+
+import java.util.Collections;
+import java.util.Iterator;
+
+/**
+ * The <code>Service</code> class is a primitive stub of the original
+ * <code>sun.misc.Service</code> class used by the
+ * <code>javax.script.ScriptEngineManager</code> to find script engine
+ * factories in factory service files.
+ * <p>
+ * This stub is provided because the original class is not part of the official
+ * Java API and may not be available on all platforms. In addition even if the
+ * class would be available on the Java platform, it may not be visible inside
+ * the OSGi framework. Finally, the <em>org.apache.sling.scripting.resolver</em>
+ * bundle implements its own resolution of script engine factories and thus the
+ * <code>Service</code> method is not used.
+ */
+public class Service {
+
+    /** Returns an empty iterator */
+    public static Iterator<String> providers(Class<?> type, ClassLoader loader) {
+        return Collections.<String> emptyList().iterator();
+    }
+
+}

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

[sling-org-apache-sling-scripting-api] 07/31: Apply 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.scripting.api-2.0.2-incubator
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-scripting-api.git

commit 273e7dd843a8c8b77f28c818ce452eb879fca378
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Tue Dec 18 15:33:28 2007 +0000

    Apply correct header.
    
    git-svn-id: https://svn.apache.org/repos/asf/incubator/sling/trunk/scripting/api@605235 13f79535-47bb-0310-9956-ffa450edef68
---
 .../scripting/api/AbstractSlingScriptEngine.java   | 29 ++++++++++++----------
 1 file changed, 16 insertions(+), 13 deletions(-)

diff --git a/src/main/java/org/apache/sling/scripting/api/AbstractSlingScriptEngine.java b/src/main/java/org/apache/sling/scripting/api/AbstractSlingScriptEngine.java
index 4b7b112..520f268 100644
--- a/src/main/java/org/apache/sling/scripting/api/AbstractSlingScriptEngine.java
+++ b/src/main/java/org/apache/sling/scripting/api/AbstractSlingScriptEngine.java
@@ -1,20 +1,23 @@
 /*
- * $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-2005 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.scripting.api;
 
-import java.io.Reader;
 import java.io.StringReader;
 
 import javax.script.AbstractScriptEngine;
@@ -27,11 +30,11 @@ import javax.script.SimpleBindings;
 public abstract class AbstractSlingScriptEngine extends AbstractScriptEngine {
 
     private final ScriptEngineFactory scriptEngineFactory;
-    
+
     protected AbstractSlingScriptEngine(ScriptEngineFactory scriptEngineFactory) {
         this.scriptEngineFactory = scriptEngineFactory;
     }
-    
+
     public Bindings createBindings() {
         return new SimpleBindings();
     }

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

[sling-org-apache-sling-scripting-api] 04/31: Empty lists by default

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.scripting.api-2.0.2-incubator
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-scripting-api.git

commit fa8b9b15697581776e7f9acf32665321d77f7bba
Author: Felix Meschberger <fm...@apache.org>
AuthorDate: Mon Dec 17 15:26:37 2007 +0000

    Empty lists by default
    
    git-svn-id: https://svn.apache.org/repos/asf/incubator/sling/trunk/scripting/api@604900 13f79535-47bb-0310-9956-ffa450edef68
---
 .../org/apache/sling/scripting/api/AbstractScriptEngineFactory.java   | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/main/java/org/apache/sling/scripting/api/AbstractScriptEngineFactory.java b/src/main/java/org/apache/sling/scripting/api/AbstractScriptEngineFactory.java
index d1cb3bd..bca637d 100644
--- a/src/main/java/org/apache/sling/scripting/api/AbstractScriptEngineFactory.java
+++ b/src/main/java/org/apache/sling/scripting/api/AbstractScriptEngineFactory.java
@@ -79,6 +79,10 @@ public abstract class AbstractScriptEngineFactory implements
 
         setEngineName(name);
         setEngineVersion(version);
+        
+        setExtensions((String[]) null);
+        setMimeTypes((String[]) null);
+        setNames((String[]) null);
     }
 
     public String getEngineName() {

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

[sling-org-apache-sling-scripting-api] 12/31: SLING-204 - add svn ignore patterns for intellij

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.scripting.api-2.0.2-incubator
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-scripting-api.git

commit a7960d1f22b9c76dbd70ef71362340d78dd210d1
Author: Bertrand Delacretaz <bd...@apache.org>
AuthorDate: Mon Jan 28 08:39:32 2008 +0000

    SLING-204 - add svn ignore patterns for intellij
    
    git-svn-id: https://svn.apache.org/repos/asf/incubator/sling/trunk/scripting/api@615760 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-scripting-api] 14/31: Add incubator disclaimer.

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.scripting.api-2.0.2-incubator
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-scripting-api.git

commit 33dbb93a68f87a5abc3e61871a6c84492a23fc19
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Mon Apr 14 12:58:07 2008 +0000

    Add incubator disclaimer.
    
    git-svn-id: https://svn.apache.org/repos/asf/incubator/sling/trunk/scripting/api@647780 13f79535-47bb-0310-9956-ffa450edef68
---
 DISCLAIMER | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/DISCLAIMER b/DISCLAIMER
new file mode 100644
index 0000000..90850c2
--- /dev/null
+++ b/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

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

[sling-org-apache-sling-scripting-api] 26/31: SLING-521: Separate between notice files for bin and src dists.

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.scripting.api-2.0.2-incubator
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-scripting-api.git

commit e09ae6e48abbac5036adbd631fecd94d213c940e
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Fri Jun 13 13:18:18 2008 +0000

    SLING-521: Separate between notice files for bin and src dists.
    
    git-svn-id: https://svn.apache.org/repos/asf/incubator/sling/trunk/scripting/api@667520 13f79535-47bb-0310-9956-ffa450edef68
---
 NOTICE                                             |   1 -
 README.txt                                         |  38 ++++
 .../main/resources/META-INF/DISCLAIMER             |   0
 src/main/resources/META-INF/LICENSE                | 202 +++++++++++++++++++++
 NOTICE => src/main/resources/META-INF/NOTICE       |   1 -
 5 files changed, 240 insertions(+), 2 deletions(-)

diff --git a/NOTICE b/NOTICE
index 860ec1f..f41909c 100644
--- a/NOTICE
+++ b/NOTICE
@@ -6,5 +6,4 @@ by Day Software (http://www.day.com/).
 
 This product includes software developed at
 The Apache Software Foundation (http://www.apache.org/).
-Licensed under the Apache License 2.0.
 
diff --git a/README.txt b/README.txt
new file mode 100644
index 0000000..4075928
--- /dev/null
+++ b/README.txt
@@ -0,0 +1,38 @@
+Apache Sling Scripting API
+
+WE NEED A LOT MORE HERE!!!!!!!!!!!!!!!!!!
+
+
+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/scripting/api
+
+See the Subversion documentation for other source control features.
+
diff --git a/DISCLAIMER b/src/main/resources/META-INF/DISCLAIMER
similarity index 100%
rename from DISCLAIMER
rename to src/main/resources/META-INF/DISCLAIMER
diff --git a/src/main/resources/META-INF/LICENSE b/src/main/resources/META-INF/LICENSE
new file mode 100644
index 0000000..d645695
--- /dev/null
+++ b/src/main/resources/META-INF/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/src/main/resources/META-INF/NOTICE
similarity index 87%
copy from NOTICE
copy to src/main/resources/META-INF/NOTICE
index 860ec1f..f41909c 100644
--- a/NOTICE
+++ b/src/main/resources/META-INF/NOTICE
@@ -6,5 +6,4 @@ by Day Software (http://www.day.com/).
 
 This product includes software developed at
 The Apache Software Foundation (http://www.apache.org/).
-Licensed under the Apache License 2.0.
 

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

[sling-org-apache-sling-scripting-api] 13/31: Move licence and notice to top level dir.

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.scripting.api-2.0.2-incubator
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-scripting-api.git

commit c5a85477fc97925ad3e7fd75459bf7924a435aeb
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Thu Apr 10 15:38:48 2008 +0000

    Move licence and notice to top level dir.
    
    git-svn-id: https://svn.apache.org/repos/asf/incubator/sling/trunk/scripting/api@646849 13f79535-47bb-0310-9956-ffa450edef68
---
 LICENSE | 202 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 202 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.

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

[sling-org-apache-sling-scripting-api] 30/31: 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.scripting.api-2.0.2-incubator
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-scripting-api.git

commit 7df3a158cb52789cdeebff065a045fc888ae16cd
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.eu.apache.org/repos/asf/sling/tags/org.apache.sling.scripting.api-2.0.2-incubator@785979 13f79535-47bb-0310-9956-ffa450edef68
---
 LICENSE                                            | 202 +++++++++++++++++++++
 NOTICE                                             |   9 +
 README.txt                                         |  38 ++++
 pom.xml                                            | 104 +++++++++++
 .../scripting/api/AbstractScriptEngineFactory.java | 174 ++++++++++++++++++
 .../scripting/api/AbstractSlingScriptEngine.java   |  51 ++++++
 src/main/java/sun/misc/Service.java                | 158 ++++++++++++++++
 src/main/resources/META-INF/DISCLAIMER             |   7 +
 src/main/resources/META-INF/LICENSE                | 202 +++++++++++++++++++++
 src/main/resources/META-INF/NOTICE                 |   9 +
 10 files changed, 954 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..5070b02
--- /dev/null
+++ b/NOTICE
@@ -0,0 +1,9 @@
+Apache Sling Scripting API
+Copyright 2008 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..3f242ff
--- /dev/null
+++ b/README.txt
@@ -0,0 +1,38 @@
+Apache Sling Scripting API
+
+This bundle provides the internal API to implement scripting. As such
+it bundles the Java Scripting API provided by Apache BSF.
+
+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/scripting/api
+
+See the Subversion documentation for other source control features.
+
diff --git a/pom.xml b/pom.xml
new file mode 100644
index 0000000..5b3a93a
--- /dev/null
+++ b/pom.xml
@@ -0,0 +1,104 @@
+<?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>3-incubator</version>
+        <relativePath>../../parent/pom.xml</relativePath>
+    </parent>
+
+    <artifactId>org.apache.sling.scripting.api</artifactId>
+    <version>2.0.2-incubator</version>
+    <packaging>bundle</packaging>
+
+    <name>Sling - Scripting Implementation API</name>
+    <description>
+        This bundle provides the internal API to implement scripting. As such
+        it bundles the Java Scripting API provided by Apache BSF.
+    </description>
+
+    <scm>
+        <connection>scm:svn:http://svn.apache.org/repos/asf/incubator/sling/tags/org.apache.sling.scripting.api-2.0.2-incubator</connection>
+        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/incubator/sling/tags/org.apache.sling.scripting.api-2.0.2-incubator</developerConnection>
+        <url>http://svn.apache.org/viewvc/incubator/sling/tags/org.apache.sling.scripting.api-2.0.2-incubator</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.scripting.api;version=${pom.version},
+                            javax.script
+                        </Export-Package>
+                        <Private-Package>
+                            sun.misc
+                        </Private-Package>
+                    </instructions>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+    <dependencies>
+        <dependency>
+            <groupId>javax.servlet</groupId>
+            <artifactId>servlet-api</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.bsf</groupId>
+            <artifactId>bsf-api</artifactId>
+            <version>3.0-beta2</version>
+            <scope>compile</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.osgi.core</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.osgi.compendium</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-api</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+        </dependency>
+
+    </dependencies>
+</project>
diff --git a/src/main/java/org/apache/sling/scripting/api/AbstractScriptEngineFactory.java b/src/main/java/org/apache/sling/scripting/api/AbstractScriptEngineFactory.java
new file mode 100644
index 0000000..bca637d
--- /dev/null
+++ b/src/main/java/org/apache/sling/scripting/api/AbstractScriptEngineFactory.java
@@ -0,0 +1,174 @@
+/*
+ * 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.scripting.api;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+import java.util.jar.Attributes;
+import java.util.jar.Manifest;
+
+import javax.script.ScriptEngine;
+import javax.script.ScriptEngineFactory;
+
+public abstract class AbstractScriptEngineFactory implements
+        ScriptEngineFactory {
+
+    private String engineName;
+
+    private String engineVersion;
+
+    private List<String> extensions;
+
+    private List<String> mimeTypes;
+
+    private List<String> names;
+
+    protected AbstractScriptEngineFactory() {
+        String name = null;
+        String version = null;
+
+        // try to get the manifest
+        Manifest manifest = null;
+        InputStream ins = null;
+        try {
+            ins = getClass().getResourceAsStream("/META-INF/MANIFEST.MF");
+            if (ins != null) {
+                manifest = new Manifest(ins);
+                Attributes attrs = manifest.getMainAttributes();
+                name = attrs.getValue("ScriptEngine-Name");
+                version = attrs.getValue("ScriptEngine-Version");
+            }
+        } catch (IOException ioe) {
+            // might want to log ?
+        } finally {
+            if (ins != null) {
+                try {
+                    ins.close();
+                } catch (IOException ignore) {
+                }
+            }
+        }
+
+        // fall back to class name and version zero
+        if (name == null) {
+            String className = getClass().getName();
+            name = className.substring(className.lastIndexOf('.') + 1);
+        }
+        if (version == null) {
+            version = "0";
+        }
+
+        setEngineName(name);
+        setEngineVersion(version);
+        
+        setExtensions((String[]) null);
+        setMimeTypes((String[]) null);
+        setNames((String[]) null);
+    }
+
+    public String getEngineName() {
+        return engineName;
+    }
+
+    protected void setEngineName(String engineName) {
+        this.engineName = engineName;
+    }
+
+    public String getEngineVersion() {
+        return engineVersion;
+    }
+
+    protected void setEngineVersion(String engineVersion) {
+        this.engineVersion = engineVersion;
+    }
+
+    public List<String> getExtensions() {
+        return extensions;
+    }
+
+    protected void setExtensions(String... extensions) {
+        if (extensions == null) {
+            this.extensions = Collections.emptyList();
+        } else {
+            this.extensions = Arrays.asList(extensions);
+        }
+    }
+
+    public List<String> getMimeTypes() {
+        return mimeTypes;
+    }
+
+    protected void setMimeTypes(String... mimeTypes) {
+        if (mimeTypes == null) {
+            this.mimeTypes = Collections.emptyList();
+        } else {
+            this.mimeTypes = Arrays.asList(mimeTypes);
+        }
+    }
+
+    public List<String> getNames() {
+        return names;
+    }
+
+    protected void setNames(String... names) {
+        if (names == null) {
+            this.names = Collections.emptyList();
+        } else {
+            this.names = Arrays.asList(names);
+        }
+    }
+
+    public String getMethodCallSyntax(String obj, String m, String[] args) {
+        StringBuffer callSyntax = new StringBuffer();
+        callSyntax.append(obj).append('.').append(m).append('(');
+        for (int i = 0; args != null && i < args.length; i++) {
+            if (i > 0) callSyntax.append(',');
+            callSyntax.append(args[i]);
+        }
+        callSyntax.append(')');
+        return callSyntax.toString();
+    }
+
+    public String getOutputStatement(String value) {
+        return "out.print(" + value + ")";
+    }
+
+    public Object getParameter(String name) {
+        if (ScriptEngine.ENGINE.equals(name)) {
+            return getEngineName();
+        } else if (ScriptEngine.ENGINE_VERSION.equals(name)) {
+            return getEngineVersion();
+        } else if (ScriptEngine.NAME.equals(name)) {
+            return getNames();
+        } else if (ScriptEngine.LANGUAGE.equals(name)) {
+            return getLanguageName();
+        } else if (ScriptEngine.LANGUAGE_VERSION.equals(name)) {
+            return getLanguageVersion();
+        }
+        return null;
+    }
+
+    public String getProgram(String[] arg0) {
+        return null;
+    }
+
+}
diff --git a/src/main/java/org/apache/sling/scripting/api/AbstractSlingScriptEngine.java b/src/main/java/org/apache/sling/scripting/api/AbstractSlingScriptEngine.java
new file mode 100644
index 0000000..520f268
--- /dev/null
+++ b/src/main/java/org/apache/sling/scripting/api/AbstractSlingScriptEngine.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.scripting.api;
+
+import java.io.StringReader;
+
+import javax.script.AbstractScriptEngine;
+import javax.script.Bindings;
+import javax.script.ScriptContext;
+import javax.script.ScriptEngineFactory;
+import javax.script.ScriptException;
+import javax.script.SimpleBindings;
+
+public abstract class AbstractSlingScriptEngine extends AbstractScriptEngine {
+
+    private final ScriptEngineFactory scriptEngineFactory;
+
+    protected AbstractSlingScriptEngine(ScriptEngineFactory scriptEngineFactory) {
+        this.scriptEngineFactory = scriptEngineFactory;
+    }
+
+    public Bindings createBindings() {
+        return new SimpleBindings();
+    }
+
+    public Object eval(String script, ScriptContext context) throws ScriptException {
+        StringReader reader = new StringReader(script);
+        return eval(reader, context);
+    }
+
+    public ScriptEngineFactory getFactory() {
+        return scriptEngineFactory;
+    }
+
+}
diff --git a/src/main/java/sun/misc/Service.java b/src/main/java/sun/misc/Service.java
new file mode 100644
index 0000000..c5a3b6a
--- /dev/null
+++ b/src/main/java/sun/misc/Service.java
@@ -0,0 +1,158 @@
+/*
+ * 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 sun.misc;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Enumeration;
+import java.util.Iterator;
+import java.util.NoSuchElementException;
+
+/**
+ * The <code>Service</code> class is a primitive stub of the original
+ * <code>sun.misc.Service</code> class used by the
+ * <code>javax.script.ScriptEngineManager</code> to find script engine
+ * factories in factory service files.
+ * <p>
+ * This stub is provided because the original class is not part of the official
+ * Java API and may not be available on all platforms. In addition even if the
+ * class would be available on the Java platform, it may not be visible inside
+ * the OSGi framework. Finally, the <em>org.apache.sling.scripting.resolver</em>
+ * bundle implements its own resolution of script engine factories and thus the
+ * <code>Service</code> method is not used.
+ */
+public class Service {
+
+    private static final String PREFIX = "META-INF/services/";
+
+    /** Returns an empty iterator */
+    public static <ProviderType> Iterator<ProviderType> providers(Class<ProviderType> type, ClassLoader loader) throws IOException {
+        if (loader != null) {
+            try {
+                String name = PREFIX + type.getName();
+                Enumeration<?> files = loader.getResources(name);
+                return new NameIterator<ProviderType>(loader, files);
+            } catch (IOException ignore) {
+            }
+        }
+
+        return Collections.<ProviderType> emptyList().iterator();
+    }
+
+    private static class NameIterator<ProviderType> implements Iterator<ProviderType> {
+
+        private final ClassLoader loader;
+
+        private final Enumeration<?> files;
+
+        private Iterator<String> currentFile;
+
+        private ProviderType nextProvider;
+
+        public NameIterator(ClassLoader loader, Enumeration<?> files) {
+            this.loader = loader;
+            this.files = files;
+            seek();
+        }
+
+        public boolean hasNext() {
+            return nextProvider != null;
+        }
+
+        public ProviderType next() {
+            if (nextProvider == null) {
+                throw new NoSuchElementException();
+            }
+
+            ProviderType result = nextProvider;
+            seek();
+            return result;
+        }
+
+        public void remove() {
+            throw new UnsupportedOperationException();
+        }
+
+        private void seek() {
+            if (currentFile == null || !currentFile.hasNext()) {
+                currentFile = getNames();
+            }
+
+            nextProvider = getClass(currentFile);
+        }
+
+        private Iterator<String> getNames() {
+            while (files.hasMoreElements()) {
+                URL fileUrl = (URL) files.nextElement();
+                InputStream ins = null;
+                try {
+                    ArrayList<String> names = new ArrayList<String>();
+                    ins = fileUrl.openStream();
+                    BufferedReader br = new BufferedReader(new InputStreamReader(ins));
+                    String name;
+                    while ( (name = br.readLine()) != null) {
+                        int hash = name.indexOf('#');
+                        if (hash >= 0) {
+                            name = name.substring(0, hash);
+                        }
+                        name = name.trim();
+
+                        if (name.length() > 0) {
+                            names.add(name);
+                        }
+                    }
+
+                    return names.iterator();
+                } catch (IOException ioe) {
+
+                } finally {
+                    if (ins != null) {
+                        try {
+                            ins.close();
+                        } catch (IOException ignore) {
+                        }
+                    }
+                }
+            }
+
+            // exhausted search
+            return null;
+        }
+
+        @SuppressWarnings("unchecked")
+        private ProviderType getClass(Iterator<String> currentFile) {
+            if (currentFile != null && currentFile.hasNext()) {
+                String name = currentFile.next();
+                try {
+                    Class<?> clazz = Class.forName(name, true, loader);
+                    return (ProviderType) clazz.newInstance();
+                } catch (Throwable t) {
+                    //
+                }
+            }
+
+            return null;
+        }
+    }
+}
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..d645695
--- /dev/null
+++ b/src/main/resources/META-INF/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/src/main/resources/META-INF/NOTICE b/src/main/resources/META-INF/NOTICE
new file mode 100644
index 0000000..5070b02
--- /dev/null
+++ b/src/main/resources/META-INF/NOTICE
@@ -0,0 +1,9 @@
+Apache Sling Scripting API
+Copyright 2008 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/).
+

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

[sling-org-apache-sling-scripting-api] 16/31: Update notice files.

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.scripting.api-2.0.2-incubator
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-scripting-api.git

commit 9abe8f3eba19a8c9182605918a7b051334237fc4
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Mon Apr 14 15:57:12 2008 +0000

    Update notice files.
    
    git-svn-id: https://svn.apache.org/repos/asf/incubator/sling/trunk/scripting/api@647866 13f79535-47bb-0310-9956-ffa450edef68
---
 NOTICE | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/NOTICE b/NOTICE
new file mode 100644
index 0000000..d08306c
--- /dev/null
+++ b/NOTICE
@@ -0,0 +1,9 @@
+Apache Sling Scripting API
+Copyright 2007-2008 The Apache Software Foundation
+
+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/).
+Licensed under the Apache License 2.0.

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

[sling-org-apache-sling-scripting-api] 21/31: Use released version of 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.scripting.api-2.0.2-incubator
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-scripting-api.git

commit b90e9c28163947eae71c0351de8397c6a23d2adf
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Wed Jun 4 14:16:40 2008 +0000

    Use released version of parent pom.
    
    git-svn-id: https://svn.apache.org/repos/asf/incubator/sling/trunk/scripting/api@663109 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index eeae133..9e90ac9 100644
--- a/pom.xml
+++ b/pom.xml
@@ -23,7 +23,7 @@
     <parent>
         <groupId>org.apache.sling</groupId>
         <artifactId>sling</artifactId>
-        <version>1-incubator-SNAPSHOT</version>
+        <version>1-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-scripting-api] 20/31: SLING-495 - NOTICE files regenerated with revision 663097 changes

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.scripting.api-2.0.2-incubator
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-scripting-api.git

commit c4fb34fc8ea28c54fc87c0611709a85b841e4f24
Author: Bertrand Delacretaz <bd...@apache.org>
AuthorDate: Wed Jun 4 13:50:29 2008 +0000

    SLING-495 - NOTICE files regenerated with revision 663097 changes
    
    git-svn-id: https://svn.apache.org/repos/asf/incubator/sling/trunk/scripting/api@663098 13f79535-47bb-0310-9956-ffa450edef68
---
 NOTICE | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/NOTICE b/NOTICE
index 4119afe..e2498d5 100644
--- a/NOTICE
+++ b/NOTICE
@@ -6,6 +6,6 @@ Copyright 2008 The Apache Software Foundation
 This product includes software developed at
 The Apache Software Foundation (http://www.apache.org/).
 
-Based on source code originally developed by
-Day Software (http://www.day.com/).
+Apache Sling is based on source code originally developed 
+by Day Software (http://www.day.com/).
 

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

[sling-org-apache-sling-scripting-api] 22/31: [maven-release-plugin] prepare release org.apache.sling.scripting.api-2.0.0-incubator

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.scripting.api-2.0.2-incubator
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-scripting-api.git

commit 538b7a0c0b33de30325fdf0be9f298a9c8b84797
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Wed Jun 4 15:16:08 2008 +0000

    [maven-release-plugin] prepare release org.apache.sling.scripting.api-2.0.0-incubator
    
    git-svn-id: https://svn.apache.org/repos/asf/incubator/sling/trunk/scripting/api@663179 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 14 ++++----------
 1 file changed, 4 insertions(+), 10 deletions(-)

diff --git a/pom.xml b/pom.xml
index 9e90ac9..e0ae31e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -28,7 +28,7 @@
     </parent>
 
     <artifactId>org.apache.sling.scripting.api</artifactId>
-    <version>2.0.0-incubator-SNAPSHOT</version>
+    <version>2.0.0-incubator</version>
     <packaging>bundle</packaging>
 
     <name>Sling - Scripting Implementation API</name>
@@ -38,15 +38,9 @@
     </description>
 
     <scm>
-        <connection>
-            scm:svn:http://svn.apache.org/repos/asf/incubator/sling/trunk/scripting/api
-        </connection>
-        <developerConnection>
-            scm:svn:https://svn.apache.org/repos/asf/incubator/sling/trunk/scripting/api
-        </developerConnection>
-        <url>
-            http://svn.apache.org/viewvc/incubator/sling/trunk/scripting/api
-        </url>
+        <connection>scm:svn:http://svn.apache.org/repos/asf/incubator/sling/tags/org.apache.sling.scripting.api-2.0.0-incubator</connection>
+        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/incubator/sling/tags/org.apache.sling.scripting.api-2.0.0-incubator</developerConnection>
+        <url>http://svn.apache.org/viewvc/incubator/sling/tags/org.apache.sling.scripting.api-2.0.0-incubator</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-scripting-api] 15/31: Write first element in pom in one line (to avoid problems with the maven release plugin) and minor pom fixes.

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.scripting.api-2.0.2-incubator
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-scripting-api.git

commit 4583c5cd6e55c97a2167aaaa012560faefda1fae
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Mon Apr 14 13:43:49 2008 +0000

    Write first element in pom in one line (to avoid problems with the maven release plugin) and minor pom fixes.
    
    git-svn-id: https://svn.apache.org/repos/asf/incubator/sling/trunk/scripting/api@647797 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/pom.xml b/pom.xml
index 8035402..eeae133 100644
--- a/pom.xml
+++ b/pom.xml
@@ -17,9 +17,8 @@
     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">
+<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>

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

[sling-org-apache-sling-scripting-api] 28/31: Change copyright year to 2008.

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.scripting.api-2.0.2-incubator
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-scripting-api.git

commit ff3f5eaa0d6f7fa490c502aecdd3c30160a9ab92
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Mon Jun 16 12:08:14 2008 +0000

    Change copyright year to 2008.
    
    git-svn-id: https://svn.apache.org/repos/asf/incubator/sling/trunk/scripting/api@668130 13f79535-47bb-0310-9956-ffa450edef68
---
 NOTICE                             | 2 +-
 src/main/resources/META-INF/NOTICE | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/NOTICE b/NOTICE
index f41909c..5070b02 100644
--- a/NOTICE
+++ b/NOTICE
@@ -1,5 +1,5 @@
 Apache Sling Scripting API
-Copyright 2007-2008 The Apache Software Foundation
+Copyright 2008 The Apache Software Foundation
 
 Apache Sling is based on source code originally developed 
 by Day Software (http://www.day.com/).
diff --git a/src/main/resources/META-INF/NOTICE b/src/main/resources/META-INF/NOTICE
index f41909c..5070b02 100644
--- a/src/main/resources/META-INF/NOTICE
+++ b/src/main/resources/META-INF/NOTICE
@@ -1,5 +1,5 @@
 Apache Sling Scripting API
-Copyright 2007-2008 The Apache Software Foundation
+Copyright 2008 The Apache Software Foundation
 
 Apache Sling is based on source code originally developed 
 by Day Software (http://www.day.com/).

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

[sling-org-apache-sling-scripting-api] 10/31: SLING-197 Merge resource integration concept into trunk

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.scripting.api-2.0.2-incubator
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-scripting-api.git

commit 71bdf532ab2398086b395d9f5361ce0e61814728
Author: Felix Meschberger <fm...@apache.org>
AuthorDate: Fri Jan 25 12:47:20 2008 +0000

    SLING-197 Merge resource integration concept into trunk
    
    git-svn-id: https://svn.apache.org/repos/asf/incubator/sling/trunk/scripting/api@615211 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-scripting-api] 27/31: SLING-521: Separate between notice files for bin and src dists.

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.scripting.api-2.0.2-incubator
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-scripting-api.git

commit 14d51e2acb562d384d15c1e5101f8b56294f0c52
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Fri Jun 13 13:43:34 2008 +0000

    SLING-521: Separate between notice files for bin and src dists.
    
    git-svn-id: https://svn.apache.org/repos/asf/incubator/sling/trunk/scripting/api@667538 13f79535-47bb-0310-9956-ffa450edef68
---
 README.txt | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/README.txt b/README.txt
index 4075928..3f242ff 100644
--- a/README.txt
+++ b/README.txt
@@ -1,7 +1,7 @@
 Apache Sling Scripting API
 
-WE NEED A LOT MORE HERE!!!!!!!!!!!!!!!!!!
-
+This bundle provides the internal API to implement scripting. As such
+it bundles the Java Scripting API provided by Apache BSF.
 
 Disclaimer
 ==========

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

[sling-org-apache-sling-scripting-api] 18/31: SLING-495 - NOTICE files generated using mknotice script

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.scripting.api-2.0.2-incubator
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-scripting-api.git

commit 2e7dbddd915139f54728a1cbe532e0f86d38a06f
Author: Bertrand Delacretaz <bd...@apache.org>
AuthorDate: Tue Jun 3 12:24:26 2008 +0000

    SLING-495 - NOTICE files generated using mknotice script
    
    git-svn-id: https://svn.apache.org/repos/asf/incubator/sling/trunk/scripting/api@662766 13f79535-47bb-0310-9956-ffa450edef68
---
 NOTICE | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/NOTICE b/NOTICE
index d08306c..7c8d663 100644
--- a/NOTICE
+++ b/NOTICE
@@ -1,4 +1,4 @@
-Apache Sling Scripting API
+Apache Sling - Scripting Implementation API
 Copyright 2007-2008 The Apache Software Foundation
 
 Based on source code originally developed by
@@ -7,3 +7,10 @@ Day Software (http://www.day.com/).
 This product includes software developed at
 The Apache Software Foundation (http://www.apache.org/).
 Licensed under the Apache License 2.0.
+
+See http://www.apache.org/legal/3party.html for the ASF policy on 
+third-party licenses.
+
+This product includes software developed at http://slf4j.org, distributed
+under the slf4j MIT-like license (http://slf4j.org/license.html). 
+

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

[sling-org-apache-sling-scripting-api] 23/31: [maven-release-plugin] prepare for next development iteration

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.scripting.api-2.0.2-incubator
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-scripting-api.git

commit 5d519aeb2d70784858fe5b653cae4822c6b61850
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Wed Jun 4 15:16:18 2008 +0000

    [maven-release-plugin] prepare for next development iteration
    
    git-svn-id: https://svn.apache.org/repos/asf/incubator/sling/trunk/scripting/api@663181 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/pom.xml b/pom.xml
index e0ae31e..9f62583 100644
--- a/pom.xml
+++ b/pom.xml
@@ -28,7 +28,7 @@
     </parent>
 
     <artifactId>org.apache.sling.scripting.api</artifactId>
-    <version>2.0.0-incubator</version>
+    <version>2.0.1-incubator-SNAPSHOT</version>
     <packaging>bundle</packaging>
 
     <name>Sling - Scripting Implementation API</name>
@@ -38,9 +38,9 @@
     </description>
 
     <scm>
-        <connection>scm:svn:http://svn.apache.org/repos/asf/incubator/sling/tags/org.apache.sling.scripting.api-2.0.0-incubator</connection>
-        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/incubator/sling/tags/org.apache.sling.scripting.api-2.0.0-incubator</developerConnection>
-        <url>http://svn.apache.org/viewvc/incubator/sling/tags/org.apache.sling.scripting.api-2.0.0-incubator</url>
+        <connection>scm:svn:http://svn.apache.org/repos/asf/incubator/sling/trunk/scripting/api</connection>
+        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/incubator/sling/trunk/scripting/api</developerConnection>
+        <url>http://svn.apache.org/viewvc/incubator/sling/trunk/scripting/api</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-scripting-api] 09/31: Remove unused import.

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.scripting.api-2.0.2-incubator
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-scripting-api.git

commit 7af87be35ab428057dca6c88e0616d24c147700a
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Wed Dec 19 17:16:17 2007 +0000

    Remove unused import.
    
    git-svn-id: https://svn.apache.org/repos/asf/incubator/sling/trunk/scripting/api@605626 13f79535-47bb-0310-9956-ffa450edef68
---
 src/main/java/sun/misc/Service.java | 37 ++++++++++++++++++-------------------
 1 file changed, 18 insertions(+), 19 deletions(-)

diff --git a/src/main/java/sun/misc/Service.java b/src/main/java/sun/misc/Service.java
index 11fe11d..c5a3b6a 100644
--- a/src/main/java/sun/misc/Service.java
+++ b/src/main/java/sun/misc/Service.java
@@ -18,7 +18,6 @@
  */
 package sun.misc;
 
-import java.awt.image.ImagingOpException;
 import java.io.BufferedReader;
 import java.io.IOException;
 import java.io.InputStream;
@@ -46,7 +45,7 @@ import java.util.NoSuchElementException;
 public class Service {
 
     private static final String PREFIX = "META-INF/services/";
-    
+
     /** Returns an empty iterator */
     public static <ProviderType> Iterator<ProviderType> providers(Class<ProviderType> type, ClassLoader loader) throws IOException {
         if (loader != null) {
@@ -62,47 +61,47 @@ public class Service {
     }
 
     private static class NameIterator<ProviderType> implements Iterator<ProviderType> {
-        
+
         private final ClassLoader loader;
-        
+
         private final Enumeration<?> files;
 
         private Iterator<String> currentFile;
-        
+
         private ProviderType nextProvider;
-        
+
         public NameIterator(ClassLoader loader, Enumeration<?> files) {
             this.loader = loader;
             this.files = files;
             seek();
         }
-        
+
         public boolean hasNext() {
             return nextProvider != null;
         }
-        
+
         public ProviderType next() {
             if (nextProvider == null) {
                 throw new NoSuchElementException();
             }
-            
+
             ProviderType result = nextProvider;
             seek();
             return result;
         }
-        
+
         public void remove() {
             throw new UnsupportedOperationException();
         }
-        
+
         private void seek() {
             if (currentFile == null || !currentFile.hasNext()) {
                 currentFile = getNames();
             }
-            
+
             nextProvider = getClass(currentFile);
         }
-        
+
         private Iterator<String> getNames() {
             while (files.hasMoreElements()) {
                 URL fileUrl = (URL) files.nextElement();
@@ -118,15 +117,15 @@ public class Service {
                             name = name.substring(0, hash);
                         }
                         name = name.trim();
-                        
+
                         if (name.length() > 0) {
                             names.add(name);
                         }
                     }
-                    
+
                     return names.iterator();
                 } catch (IOException ioe) {
-                    
+
                 } finally {
                     if (ins != null) {
                         try {
@@ -140,7 +139,7 @@ public class Service {
             // exhausted search
             return null;
         }
-        
+
         @SuppressWarnings("unchecked")
         private ProviderType getClass(Iterator<String> currentFile) {
             if (currentFile != null && currentFile.hasNext()) {
@@ -149,10 +148,10 @@ public class Service {
                     Class<?> clazz = Class.forName(name, true, loader);
                     return (ProviderType) clazz.newInstance();
                 } catch (Throwable t) {
-                    // 
+                    //
                 }
             }
-            
+
             return null;
         }
     }

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

[sling-org-apache-sling-scripting-api] 06/31: Rename ServiceX to Service again. This class was implemented incorrectly. The returned Iterator is expected to return SPI instances and not the fully qualified class names of the SPI classes. Now it works correctly.

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.scripting.api-2.0.2-incubator
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-scripting-api.git

commit fd16099a5f286be0e27917bf9e9118557cd23e19
Author: Felix Meschberger <fm...@apache.org>
AuthorDate: Mon Dec 17 20:56:19 2007 +0000

    Rename ServiceX to Service again. This class was implemented incorrectly.
    The returned Iterator is expected to return SPI instances and not the
    fully qualified class names of the SPI classes. Now it works correctly.
    
    git-svn-id: https://svn.apache.org/repos/asf/incubator/sling/trunk/scripting/api@605001 13f79535-47bb-0310-9956-ffa450edef68
---
 .../java/sun/misc/{ServiceX.java => Service.java}  | 50 ++++++++++++++--------
 1 file changed, 33 insertions(+), 17 deletions(-)

diff --git a/src/main/java/sun/misc/ServiceX.java b/src/main/java/sun/misc/Service.java
similarity index 73%
rename from src/main/java/sun/misc/ServiceX.java
rename to src/main/java/sun/misc/Service.java
index 03c85ca..11fe11d 100644
--- a/src/main/java/sun/misc/ServiceX.java
+++ b/src/main/java/sun/misc/Service.java
@@ -31,8 +31,8 @@ import java.util.Iterator;
 import java.util.NoSuchElementException;
 
 /**
- * The <code>ServiceX</code> class is a primitive stub of the original
- * <code>sun.misc.ServiceX</code> class used by the
+ * The <code>Service</code> class is a primitive stub of the original
+ * <code>sun.misc.Service</code> class used by the
  * <code>javax.script.ScriptEngineManager</code> to find script engine
  * factories in factory service files.
  * <p>
@@ -41,49 +41,52 @@ import java.util.NoSuchElementException;
  * class would be available on the Java platform, it may not be visible inside
  * the OSGi framework. Finally, the <em>org.apache.sling.scripting.resolver</em>
  * bundle implements its own resolution of script engine factories and thus the
- * <code>ServiceX</code> method is not used.
+ * <code>Service</code> method is not used.
  */
-public class ServiceX {
+public class Service {
 
     private static final String PREFIX = "META-INF/services/";
     
     /** Returns an empty iterator */
-    public static Iterator<String> providers(Class<?> type, ClassLoader loader) throws IOException {
+    public static <ProviderType> Iterator<ProviderType> providers(Class<ProviderType> type, ClassLoader loader) throws IOException {
         if (loader != null) {
             try {
                 String name = PREFIX + type.getName();
                 Enumeration<?> files = loader.getResources(name);
-                return new NameIterator(files);
+                return new NameIterator<ProviderType>(loader, files);
             } catch (IOException ignore) {
             }
         }
 
-        return Collections.<String> emptyList().iterator();
+        return Collections.<ProviderType> emptyList().iterator();
     }
 
-    private static class NameIterator implements Iterator<String> {
+    private static class NameIterator<ProviderType> implements Iterator<ProviderType> {
+        
+        private final ClassLoader loader;
         
         private final Enumeration<?> files;
 
         private Iterator<String> currentFile;
         
-        private String nextName;
+        private ProviderType nextProvider;
         
-        public NameIterator(Enumeration<?> files) {
+        public NameIterator(ClassLoader loader, Enumeration<?> files) {
+            this.loader = loader;
             this.files = files;
             seek();
         }
         
         public boolean hasNext() {
-            return nextName != null;
+            return nextProvider != null;
         }
         
-        public String next() {
-            if (nextName == null) {
+        public ProviderType next() {
+            if (nextProvider == null) {
                 throw new NoSuchElementException();
             }
             
-            String result = nextName;
+            ProviderType result = nextProvider;
             seek();
             return result;
         }
@@ -97,9 +100,7 @@ public class ServiceX {
                 currentFile = getNames();
             }
             
-            nextName = (currentFile != null && currentFile.hasNext())
-                    ? currentFile.next()
-                    : null;
+            nextProvider = getClass(currentFile);
         }
         
         private Iterator<String> getNames() {
@@ -139,5 +140,20 @@ public class ServiceX {
             // exhausted search
             return null;
         }
+        
+        @SuppressWarnings("unchecked")
+        private ProviderType getClass(Iterator<String> currentFile) {
+            if (currentFile != null && currentFile.hasNext()) {
+                String name = currentFile.next();
+                try {
+                    Class<?> clazz = Class.forName(name, true, loader);
+                    return (ProviderType) clazz.newInstance();
+                } catch (Throwable t) {
+                    // 
+                }
+            }
+            
+            return null;
+        }
     }
 }

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

[sling-org-apache-sling-scripting-api] 31/31: 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.scripting.api-2.0.2-incubator
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-scripting-api.git

commit 76ddc2241b1a125991b1504448e39e3f13839540
Merge: 7df3a15 ab73692
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/tags/org.apache.sling.scripting.api-2.0.2-incubator@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-scripting-api] 08/31: Switching back to BSF 3.0-beta2 as the parent pom has now been distributed to the maven repositories.

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.scripting.api-2.0.2-incubator
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-scripting-api.git

commit fa28153903691ec8a47931fd110bbba2effb6f6b
Author: Felix Meschberger <fm...@apache.org>
AuthorDate: Wed Dec 19 10:02:24 2007 +0000

    Switching back to BSF 3.0-beta2 as the parent pom has now been
    distributed to the maven repositories.
    
    git-svn-id: https://svn.apache.org/repos/asf/incubator/sling/trunk/scripting/api@605499 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index e82a822..a03768b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -84,7 +84,7 @@
         <dependency>
             <groupId>org.apache.bsf</groupId>
             <artifactId>bsf-api</artifactId>
-            <version>3.0-SNAPSHOT</version>
+            <version>3.0-beta2</version>
             <scope>compile</scope>
         </dependency>
 

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

[sling-org-apache-sling-scripting-api] 25/31: SLING-521: Restore more notice files.

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.scripting.api-2.0.2-incubator
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-scripting-api.git

commit 5061924238b8e6c71c28cd899e0523a0d20f7f6a
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Tue Jun 10 14:59:22 2008 +0000

    SLING-521: Restore more notice files.
    
    git-svn-id: https://svn.apache.org/repos/asf/incubator/sling/trunk/scripting/api@666142 13f79535-47bb-0310-9956-ffa450edef68
---
 NOTICE | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/NOTICE b/NOTICE
index e2498d5..860ec1f 100644
--- a/NOTICE
+++ b/NOTICE
@@ -1,11 +1,10 @@
-Apache Sling - Scripting Implementation API
+Apache Sling Scripting API
+Copyright 2007-2008 The Apache Software Foundation
 
-Apache Sling
-Copyright 2008 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/).
-
-Apache Sling is based on source code originally developed 
-by Day Software (http://www.day.com/).
+Licensed under the Apache License 2.0.
 

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

[sling-org-apache-sling-scripting-api] 02/31: Switch to BSF 3 SNAPSHOT until missing BSF 3.0-beta2 parent pom is in the maven repositories

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.scripting.api-2.0.2-incubator
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-scripting-api.git

commit 14996508ff21d94958b5ee4880aef21faf6dd13d
Author: Felix Meschberger <fm...@apache.org>
AuthorDate: Mon Dec 17 14:11:48 2007 +0000

    Switch to BSF 3 SNAPSHOT until missing BSF 3.0-beta2 parent pom is
    in the maven repositories
    
    git-svn-id: https://svn.apache.org/repos/asf/incubator/sling/trunk/scripting/api@604874 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index a03768b..e82a822 100644
--- a/pom.xml
+++ b/pom.xml
@@ -84,7 +84,7 @@
         <dependency>
             <groupId>org.apache.bsf</groupId>
             <artifactId>bsf-api</artifactId>
-            <version>3.0-beta2</version>
+            <version>3.0-SNAPSHOT</version>
             <scope>compile</scope>
         </dependency>
 

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

[sling-org-apache-sling-scripting-api] 03/31: Implement Service.providers method for the script engine factories to be available for microsling and allow setXXX methods to get null to initialize with an empty list.

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.scripting.api-2.0.2-incubator
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-scripting-api.git

commit a34e96b5c55cfae5abc252931e6f19c2e7fb0153
Author: Felix Meschberger <fm...@apache.org>
AuthorDate: Mon Dec 17 15:24:31 2007 +0000

    Implement Service.providers method for the script engine factories
    to be available for microsling and allow setXXX methods to get null
    to initialize with an empty list.
    
    git-svn-id: https://svn.apache.org/repos/asf/incubator/sling/trunk/scripting/api@604896 13f79535-47bb-0310-9956-ffa450edef68
---
 .../scripting/api/AbstractScriptEngineFactory.java |  37 ++++++--
 src/main/java/sun/misc/Service.java                | 101 ++++++++++++++++++++-
 2 files changed, 127 insertions(+), 11 deletions(-)

diff --git a/src/main/java/org/apache/sling/scripting/api/AbstractScriptEngineFactory.java b/src/main/java/org/apache/sling/scripting/api/AbstractScriptEngineFactory.java
index 4ac89b3..d1cb3bd 100644
--- a/src/main/java/org/apache/sling/scripting/api/AbstractScriptEngineFactory.java
+++ b/src/main/java/org/apache/sling/scripting/api/AbstractScriptEngineFactory.java
@@ -21,6 +21,7 @@ package org.apache.sling.scripting.api;
 import java.io.IOException;
 import java.io.InputStream;
 import java.util.Arrays;
+import java.util.Collections;
 import java.util.List;
 import java.util.jar.Attributes;
 import java.util.jar.Manifest;
@@ -32,11 +33,15 @@ public abstract class AbstractScriptEngineFactory implements
         ScriptEngineFactory {
 
     private String engineName;
+
     private String engineVersion;
+
     private List<String> extensions;
+
     private List<String> mimeTypes;
+
     private List<String> names;
-    
+
     protected AbstractScriptEngineFactory() {
         String name = null;
         String version = null;
@@ -75,7 +80,7 @@ public abstract class AbstractScriptEngineFactory implements
         setEngineName(name);
         setEngineVersion(version);
     }
-    
+
     public String getEngineName() {
         return engineName;
     }
@@ -83,7 +88,7 @@ public abstract class AbstractScriptEngineFactory implements
     protected void setEngineName(String engineName) {
         this.engineName = engineName;
     }
-    
+
     public String getEngineVersion() {
         return engineVersion;
     }
@@ -91,31 +96,43 @@ public abstract class AbstractScriptEngineFactory implements
     protected void setEngineVersion(String engineVersion) {
         this.engineVersion = engineVersion;
     }
-    
+
     public List<String> getExtensions() {
         return extensions;
     }
 
     protected void setExtensions(String... extensions) {
-        this.extensions = Arrays.asList(extensions);
+        if (extensions == null) {
+            this.extensions = Collections.emptyList();
+        } else {
+            this.extensions = Arrays.asList(extensions);
+        }
     }
-    
+
     public List<String> getMimeTypes() {
         return mimeTypes;
     }
 
     protected void setMimeTypes(String... mimeTypes) {
-        this.mimeTypes = Arrays.asList(mimeTypes);
+        if (mimeTypes == null) {
+            this.mimeTypes = Collections.emptyList();
+        } else {
+            this.mimeTypes = Arrays.asList(mimeTypes);
+        }
     }
-    
+
     public List<String> getNames() {
         return names;
     }
 
     protected void setNames(String... names) {
-        this.names = Arrays.asList(names);
+        if (names == null) {
+            this.names = Collections.emptyList();
+        } else {
+            this.names = Arrays.asList(names);
+        }
     }
-    
+
     public String getMethodCallSyntax(String obj, String m, String[] args) {
         StringBuffer callSyntax = new StringBuffer();
         callSyntax.append(obj).append('.').append(m).append('(');
diff --git a/src/main/java/sun/misc/Service.java b/src/main/java/sun/misc/Service.java
index 4b292f6..f6748e8 100644
--- a/src/main/java/sun/misc/Service.java
+++ b/src/main/java/sun/misc/Service.java
@@ -18,8 +18,17 @@
  */
 package sun.misc;
 
+import java.awt.image.ImagingOpException;
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.net.URL;
+import java.util.ArrayList;
 import java.util.Collections;
+import java.util.Enumeration;
 import java.util.Iterator;
+import java.util.NoSuchElementException;
 
 /**
  * The <code>Service</code> class is a primitive stub of the original
@@ -36,9 +45,99 @@ import java.util.Iterator;
  */
 public class Service {
 
+    private static final String PREFIX = "META-INF/services/";
+    
     /** Returns an empty iterator */
-    public static Iterator<String> providers(Class<?> type, ClassLoader loader) {
+    public static Iterator<String> providers(Class<?> type, ClassLoader loader) throws IOException {
+        if (loader != null) {
+            try {
+                String name = PREFIX + type.getName();
+                Enumeration<?> files = loader.getResources(name);
+                return new NameIterator(files);
+            } catch (IOException ignore) {
+            }
+        }
+
         return Collections.<String> emptyList().iterator();
     }
 
+    private static class NameIterator implements Iterator<String> {
+        
+        private final Enumeration<?> files;
+
+        private Iterator<String> currentFile;
+        
+        private String nextName;
+        
+        public NameIterator(Enumeration<?> files) {
+            this.files = files;
+            seek();
+        }
+        
+        public boolean hasNext() {
+            return nextName != null;
+        }
+        
+        public String next() {
+            if (nextName == null) {
+                throw new NoSuchElementException();
+            }
+            
+            String result = nextName;
+            seek();
+            return result;
+        }
+        
+        public void remove() {
+            throw new UnsupportedOperationException();
+        }
+        
+        private void seek() {
+            if (currentFile == null || !currentFile.hasNext()) {
+                currentFile = getNames();
+            }
+            
+            nextName = (currentFile != null && currentFile.hasNext())
+                    ? currentFile.next()
+                    : null;
+        }
+        
+        private Iterator<String> getNames() {
+            while (files.hasMoreElements()) {
+                URL fileUrl = (URL) files.nextElement();
+                InputStream ins = null;
+                try {
+                    ArrayList<String> names = new ArrayList<String>();
+                    ins = fileUrl.openStream();
+                    BufferedReader br = new BufferedReader(new InputStreamReader(ins));
+                    String name;
+                    while ( (name = br.readLine()) != null) {
+                        int hash = name.indexOf('#');
+                        if (hash >= 0) {
+                            name = name.substring(0, hash);
+                        }
+                        name = name.trim();
+                        
+                        if (name.length() > 0) {
+                            names.add(name);
+                        }
+                    }
+                    
+                    return names.iterator();
+                } catch (IOException ioe) {
+                    
+                } finally {
+                    if (ins != null) {
+                        try {
+                            ins.close();
+                        } catch (IOException ignore) {
+                        }
+                    }
+                }
+            }
+
+            // exhausted search
+            return null;
+        }
+    }
 }

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

[sling-org-apache-sling-scripting-api] 24/31: Fix reference to 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.scripting.api-2.0.2-incubator
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-scripting-api.git

commit b4b5e0c1292242d677d961555cbd434434c14e6c
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Thu Jun 5 05:51:38 2008 +0000

    Fix reference to parent pom.
    
    git-svn-id: https://svn.apache.org/repos/asf/incubator/sling/trunk/scripting/api@663458 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index 9f62583..4c7c812 100644
--- a/pom.xml
+++ b/pom.xml
@@ -23,7 +23,7 @@
     <parent>
         <groupId>org.apache.sling</groupId>
         <artifactId>sling</artifactId>
-        <version>1-incubator</version>
+        <version>2-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-scripting-api] 29/31: [maven-release-plugin] copy for tag org.apache.sling.scripting.api-2.0.2-incubator

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.scripting.api-2.0.2-incubator
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-scripting-api.git

commit ab7369267a21df222f7f012b1cbf2d1370b084b3
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Tue Jun 17 07:17:46 2008 +0000

    [maven-release-plugin]  copy for tag org.apache.sling.scripting.api-2.0.2-incubator
    
    git-svn-id: https://svn.apache.org/repos/asf/incubator/sling/tags/org.apache.sling.scripting.api-2.0.2-incubator@668453 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/pom.xml b/pom.xml
index 4c7c812..5b3a93a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -23,12 +23,12 @@
     <parent>
         <groupId>org.apache.sling</groupId>
         <artifactId>sling</artifactId>
-        <version>2-incubator-SNAPSHOT</version>
+        <version>3-incubator</version>
         <relativePath>../../parent/pom.xml</relativePath>
     </parent>
 
     <artifactId>org.apache.sling.scripting.api</artifactId>
-    <version>2.0.1-incubator-SNAPSHOT</version>
+    <version>2.0.2-incubator</version>
     <packaging>bundle</packaging>
 
     <name>Sling - Scripting Implementation API</name>
@@ -38,9 +38,9 @@
     </description>
 
     <scm>
-        <connection>scm:svn:http://svn.apache.org/repos/asf/incubator/sling/trunk/scripting/api</connection>
-        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/incubator/sling/trunk/scripting/api</developerConnection>
-        <url>http://svn.apache.org/viewvc/incubator/sling/trunk/scripting/api</url>
+        <connection>scm:svn:http://svn.apache.org/repos/asf/incubator/sling/tags/org.apache.sling.scripting.api-2.0.2-incubator</connection>
+        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/incubator/sling/tags/org.apache.sling.scripting.api-2.0.2-incubator</developerConnection>
+        <url>http://svn.apache.org/viewvc/incubator/sling/tags/org.apache.sling.scripting.api-2.0.2-incubator</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-scripting-api] 11/31: Use OSGi core and cmpendium jars from Felix project.

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.scripting.api-2.0.2-incubator
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-scripting-api.git

commit dbf328f143aa98529e57dc59a80a7bf879adefdd
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Mon Jan 28 08:17:53 2008 +0000

    Use OSGi core and cmpendium jars from Felix project.
    
    git-svn-id: https://svn.apache.org/repos/asf/incubator/sling/trunk/scripting/api@615754 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/pom.xml b/pom.xml
index a03768b..8035402 100644
--- a/pom.xml
+++ b/pom.xml
@@ -89,12 +89,12 @@
         </dependency>
 
         <dependency>
-            <groupId>org.osgi</groupId>
-            <artifactId>osgi_R4_core</artifactId>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.osgi.core</artifactId>
         </dependency>
         <dependency>
-            <groupId>org.osgi</groupId>
-            <artifactId>osgi_R4_compendium</artifactId>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.osgi.compendium</artifactId>
         </dependency>
 
         <dependency>

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

[sling-org-apache-sling-scripting-api] 17/31: Exclude maven-eclipse.xml generated by the maven eclipse plugin.

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.scripting.api-2.0.2-incubator
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-scripting-api.git

commit 8c4bfe8717f759a527854fee44c6511dd6360a05
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Mon May 5 07:14:10 2008 +0000

    Exclude maven-eclipse.xml generated by the maven eclipse plugin.
    
    git-svn-id: https://svn.apache.org/repos/asf/incubator/sling/trunk/scripting/api@653324 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-scripting-api] 05/31: Temporarily rename Service class to use the JDK provided instance. See dev list for more info.

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.scripting.api-2.0.2-incubator
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-scripting-api.git

commit c1b754fd5d0fb2a191c4be9e7ea3ba10e3cfc8ec
Author: Felix Meschberger <fm...@apache.org>
AuthorDate: Mon Dec 17 20:09:43 2007 +0000

    Temporarily rename Service class to use the JDK provided instance.
    See dev list for more info.
    
    git-svn-id: https://svn.apache.org/repos/asf/incubator/sling/trunk/scripting/api@604984 13f79535-47bb-0310-9956-ffa450edef68
---
 src/main/java/sun/misc/{Service.java => ServiceX.java} | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/main/java/sun/misc/Service.java b/src/main/java/sun/misc/ServiceX.java
similarity index 96%
rename from src/main/java/sun/misc/Service.java
rename to src/main/java/sun/misc/ServiceX.java
index f6748e8..03c85ca 100644
--- a/src/main/java/sun/misc/Service.java
+++ b/src/main/java/sun/misc/ServiceX.java
@@ -31,8 +31,8 @@ import java.util.Iterator;
 import java.util.NoSuchElementException;
 
 /**
- * The <code>Service</code> class is a primitive stub of the original
- * <code>sun.misc.Service</code> class used by the
+ * The <code>ServiceX</code> class is a primitive stub of the original
+ * <code>sun.misc.ServiceX</code> class used by the
  * <code>javax.script.ScriptEngineManager</code> to find script engine
  * factories in factory service files.
  * <p>
@@ -41,9 +41,9 @@ import java.util.NoSuchElementException;
  * class would be available on the Java platform, it may not be visible inside
  * the OSGi framework. Finally, the <em>org.apache.sling.scripting.resolver</em>
  * bundle implements its own resolution of script engine factories and thus the
- * <code>Service</code> method is not used.
+ * <code>ServiceX</code> method is not used.
  */
-public class Service {
+public class ServiceX {
 
     private static final String PREFIX = "META-INF/services/";
     

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

[sling-org-apache-sling-scripting-api] 19/31: SLING-495 - NOTICE files updated according to changes in revision 662927

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.scripting.api-2.0.2-incubator
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-scripting-api.git

commit 29455c2f12fe162280828e669a72c50cca0a38a1
Author: Bertrand Delacretaz <bd...@apache.org>
AuthorDate: Wed Jun 4 08:05:20 2008 +0000

    SLING-495 - NOTICE files updated according to changes in revision 662927
    
    git-svn-id: https://svn.apache.org/repos/asf/incubator/sling/trunk/scripting/api@663025 13f79535-47bb-0310-9956-ffa450edef68
---
 NOTICE | 13 ++++---------
 1 file changed, 4 insertions(+), 9 deletions(-)

diff --git a/NOTICE b/NOTICE
index 7c8d663..4119afe 100644
--- a/NOTICE
+++ b/NOTICE
@@ -1,16 +1,11 @@
 Apache Sling - Scripting Implementation API
-Copyright 2007-2008 The Apache Software Foundation
 
-Based on source code originally developed by
-Day Software (http://www.day.com/).
+Apache Sling
+Copyright 2008 The Apache Software Foundation
 
 This product includes software developed at
 The Apache Software Foundation (http://www.apache.org/).
-Licensed under the Apache License 2.0.
-
-See http://www.apache.org/legal/3party.html for the ASF policy on 
-third-party licenses.
 
-This product includes software developed at http://slf4j.org, distributed
-under the slf4j MIT-like license (http://slf4j.org/license.html). 
+Based on source code originally developed by
+Day Software (http://www.day.com/).
 

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