You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by da...@apache.org on 2020/07/28 15:05:24 UTC

[sling-org-apache-sling-javax-activation] branch master updated (76fa657 -> e9ac44d)

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

davidb pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-javax-activation.git.


    from 76fa657  SLING-9603 update to newest parent (#3)
     new eddd03f  SLING-9612 Tune the nodeps javax.activation bundle to Java 8
     new 79ff18d  Use -exportcontents instead of Export-Package
     new e9ac44d  Merge pull request #4 from bosschaert/SLING-9612

The 34 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.


Summary of changes:
 pom.xml                                                        | 10 +++++++++-
 .../org/apache/sling/javax/activation/internal/Activator.java  |  9 +++------
 2 files changed, 12 insertions(+), 7 deletions(-)


[sling-org-apache-sling-javax-activation] 26/34: trivial: added license header to *.md files

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

davidb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-javax-activation.git

commit f3b2594b1a63e9c34430a839a772eeee9c293612
Author: Radu Cotescu <ra...@apache.org>
AuthorDate: Thu Sep 20 11:09:04 2018 +0200

    trivial: added license header to *.md files
---
 CODE_OF_CONDUCT.md | 18 ++++++++++++++++++
 CONTRIBUTING.md    | 18 ++++++++++++++++++
 2 files changed, 36 insertions(+)

diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md
index 52f21cb..0fa18e5 100644
--- a/CODE_OF_CONDUCT.md
+++ b/CODE_OF_CONDUCT.md
@@ -1,3 +1,21 @@
+<!--/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  ~ 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.
+  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/-->
 Apache Software Foundation Code of Conduct
 ====
 
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index ca36072..ac82a1a 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -1,3 +1,21 @@
+<!--/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  ~ 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.
+  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/-->
 Contributing
 ====
 


[sling-org-apache-sling-javax-activation] 27/34: SLING-7245 - Validate pull requests using Jenkins

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

davidb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-javax-activation.git

commit 637a3207de5db4e179a3020f5516fbce8f9f94f0
Author: Robert Munteanu <ro...@apache.org>
AuthorDate: Wed Jan 30 09:47:44 2019 +0100

    SLING-7245 - Validate pull requests using Jenkins
---
 Jenkinsfile | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/Jenkinsfile b/Jenkinsfile
new file mode 100644
index 0000000..f582519
--- /dev/null
+++ b/Jenkinsfile
@@ -0,0 +1,20 @@
+/**
+ * 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.
+ */
+
+slingOsgiBundleBuild()


[sling-org-apache-sling-javax-activation] 02/34: [maven-release-plugin] prepare release org.apache.sling.javax.activation-0.1.0

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

davidb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-javax-activation.git

commit a921e17c2c8515ea0cbe62de24b3cf5c4b0f2184
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Tue Apr 23 10:46:19 2013 +0000

    [maven-release-plugin] prepare release org.apache.sling.javax.activation-0.1.0
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1470884 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index 988cf05..78ce102 100755
--- a/pom.xml
+++ b/pom.xml
@@ -28,7 +28,7 @@
         
     <artifactId>org.apache.sling.javax.activation</artifactId>
     <packaging>bundle</packaging>
-    <version>0.0.1-SNAPSHOT</version>
+    <version>0.1.0</version>
 
     <name>Apache Sling javax.activation bundle</name>
     <description>The Apache Sling javax.activation bundle contributes an OSGi-compatible activation bundle.</description>
@@ -85,4 +85,10 @@
             <scope>test</scope>
         </dependency>
     </dependencies>
+
+  <scm>
+    <connection>scm:svn:http://svn.apache.org/repos/asf/sling/tags/org.apache.sling.javax.activation-0.1.0</connection>
+    <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/tags/org.apache.sling.javax.activation-0.1.0</developerConnection>
+    <url>http://svn.apache.org/viewvc/sling/tags/org.apache.sling.javax.activation-0.1.0</url>
+  </scm>
 </project>


[sling-org-apache-sling-javax-activation] 25/34: SLING-7215 - [nice-to-have] Add a CONTRIBUTING file to every module

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

davidb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-javax-activation.git

commit e8e1d17649608ec172c3bbab2d0c05b119ea5b59
Author: Radu Cotescu <ra...@apache.org>
AuthorDate: Wed Sep 19 18:29:18 2018 +0200

    SLING-7215 - [nice-to-have] Add a CONTRIBUTING file to every module
---
 CONTRIBUTING.md | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
new file mode 100644
index 0000000..ca36072
--- /dev/null
+++ b/CONTRIBUTING.md
@@ -0,0 +1,6 @@
+Contributing
+====
+
+Thanks for choosing to contribute!
+
+You will find all the necessary details about how you can do this at https://sling.apache.org/contributing.html.


[sling-org-apache-sling-javax-activation] 20/34: Fix typo in pom.xml : conncetion should be connection

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

davidb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-javax-activation.git

commit 9d569263e15914991880be0101234fc0e81a7d85
Author: Robert Munteanu <ro...@apache.org>
AuthorDate: Mon Oct 23 12:06:30 2017 +0300

    Fix typo in pom.xml : conncetion should be connection
---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index e94f8d1..1923c11 100755
--- a/pom.xml
+++ b/pom.xml
@@ -40,7 +40,7 @@
     </properties>    
 
     <scm>
-        <connection>scm:git:https://gitbox.apache.org/repos/asf/sling-org-apache-sling-javax-activation.git</conncetion>
+        <connection>scm:git:https://gitbox.apache.org/repos/asf/sling-org-apache-sling-javax-activation.git</connection>
         <developerConnection>scm:git:https://gitbox.apache.org/repos/asf/sling-org-apache-sling-javax-activation.git</developerConnection>
         <url>https://gitbox.apache.org/repos/asf?p=sling-org-apache-sling-javax-activation.git</url>
     </scm>


[sling-org-apache-sling-javax-activation] 01/34: SLING-2835 : Addition of OSGi-aware javax.activation bundle. Apply contribution from Robert Munteanu

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

davidb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-javax-activation.git

commit 299695b75d3c3fcf9a755140aaf0683231d24a6c
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Tue Apr 23 10:41:40 2013 +0000

    SLING-2835 :  Addition of OSGi-aware javax.activation bundle. Apply contribution from Robert Munteanu
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1470883 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml                                            |  88 +++++++
 .../sling/javax/activation/internal/Activator.java | 130 ++++++++++
 .../activation/internal/OsgiMailcapCommandMap.java | 279 +++++++++++++++++++++
 3 files changed, 497 insertions(+)

diff --git a/pom.xml b/pom.xml
new file mode 100755
index 0000000..988cf05
--- /dev/null
+++ b/pom.xml
@@ -0,0 +1,88 @@
+<?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>15</version>
+    </parent>
+        
+    <artifactId>org.apache.sling.javax.activation</artifactId>
+    <packaging>bundle</packaging>
+    <version>0.0.1-SNAPSHOT</version>
+
+    <name>Apache Sling javax.activation bundle</name>
+    <description>The Apache Sling javax.activation bundle contributes an OSGi-compatible activation bundle.</description>
+    
+    <properties>
+        <javax.activation.version>1.1.1</javax.activation.version>
+        <site.javadoc.exclude>**.impl.**</site.javadoc.exclude>
+    </properties>    
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <extensions>true</extensions>
+                <configuration>
+                    <instructions>
+                        <Bundle-Activator>org.apache.sling.javax.activation.internal.Activator</Bundle-Activator>
+                        <Export-Package>javax.activation;version=${javax.activation.version}</Export-Package>
+                        <Embed-Dependency>*;scope=compile</Embed-Dependency>
+                    </instructions>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+    <dependencies>
+        <dependency>
+            <groupId>javax.activation</groupId>
+            <artifactId>activation</artifactId>
+            <version>${javax.activation.version}</version>
+        </dependency>
+        <!-- Compendium 4.2.0 is needed to access BundleTracker -->
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>org.osgi.compendium</artifactId>
+            <version>4.2.0</version>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>org.osgi.core</artifactId>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-api</artifactId>
+            <scope>provided</scope>
+        </dependency>
+        
+        <!-- Test dependencies -->
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+</project>
diff --git a/src/main/java/org/apache/sling/javax/activation/internal/Activator.java b/src/main/java/org/apache/sling/javax/activation/internal/Activator.java
new file mode 100755
index 0000000..626613a
--- /dev/null
+++ b/src/main/java/org/apache/sling/javax/activation/internal/Activator.java
@@ -0,0 +1,130 @@
+/*
+ * 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.javax.activation.internal;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URL;
+
+import javax.activation.CommandMap;
+import javax.activation.MailcapCommandMap;
+
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.BundleEvent;
+import org.osgi.util.tracker.BundleTracker;
+import org.osgi.util.tracker.BundleTrackerCustomizer;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * The <tt>Activator</tt> locates <tt>activation</tt>-related services defined in <tt>mailcap</tt> files and registers
+ * them so they can be used by the Java Activation Framework
+ * 
+ * <p>
+ * The mailcap entries are expected to be found in a <tt>/META-INF/mailcap</tt> file inside the bundle.
+ * </p>
+ * 
+ * <p>
+ * This implementation does not support the full lookup algorithm specified by the {@link MailcapCommandMap}.
+ * </p>
+ * 
+ */
+public class Activator implements BundleActivator {
+
+    private static final String MAILCAP_FILE_NAME = "/META-INF/mailcap";
+    private static final Logger log = LoggerFactory.getLogger(Activator.class);
+
+    private BundleTracker bundleTracker;
+    private OsgiMailcapCommandMap commandMap;
+
+    public void start(BundleContext context) throws Exception {
+
+        commandMap = new OsgiMailcapCommandMap();
+
+        for (Bundle bundle : context.getBundles())
+            registerBundleMailcapEntries(bundle);
+
+        CommandMap.setDefaultCommandMap(commandMap);
+
+        bundleTracker = new BundleTracker(context, Bundle.ACTIVE | Bundle.UNINSTALLED | Bundle.STOP_TRANSIENT,
+                new BundleTrackerCustomizer() {
+
+                    public void removedBundle(Bundle bundle, BundleEvent event, Object object) {
+                        unregisterBundleMailcapEntries(bundle);
+                    }
+
+                    public void modifiedBundle(Bundle bundle, BundleEvent event, Object object) {
+                        unregisterBundleMailcapEntries(bundle);
+                        registerBundleMailcapEntries(bundle);
+                    }
+
+                    public Object addingBundle(Bundle bundle, BundleEvent event) {
+                        registerBundleMailcapEntries(bundle);
+                        return bundle;
+                    }
+                });
+
+        bundleTracker.open();
+    }
+
+    private void registerBundleMailcapEntries(Bundle bundle) {
+
+        if (bundle.getState() != Bundle.ACTIVE)
+            return;
+
+        URL mailcapEntry = bundle.getEntry(MAILCAP_FILE_NAME);
+        if (mailcapEntry == null)
+            return;
+
+        InputStream input = null;
+
+        try {
+            input = mailcapEntry.openStream();
+
+            commandMap.addMailcapEntries(input, bundle);
+
+        } catch (IOException e) {
+            log.warn("Failed loading " + MAILCAP_FILE_NAME + " from bundle " + bundle, e);
+        } finally {
+            try {
+                input.close();
+            } catch (IOException e) {
+                // don't care
+            }
+        }
+    }
+
+    private void unregisterBundleMailcapEntries(Bundle bundle) {
+
+        commandMap.removeMailcapEntriesForBundle(bundle);
+    }
+
+    public void stop(BundleContext context) throws Exception {
+
+        if (bundleTracker != null) {
+            bundleTracker.close();
+            bundleTracker = null;
+        }
+
+        CommandMap.setDefaultCommandMap(null);
+    }
+
+}
diff --git a/src/main/java/org/apache/sling/javax/activation/internal/OsgiMailcapCommandMap.java b/src/main/java/org/apache/sling/javax/activation/internal/OsgiMailcapCommandMap.java
new file mode 100755
index 0000000..e8ff2b9
--- /dev/null
+++ b/src/main/java/org/apache/sling/javax/activation/internal/OsgiMailcapCommandMap.java
@@ -0,0 +1,279 @@
+/*
+ * 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.javax.activation.internal;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+
+import javax.activation.CommandInfo;
+import javax.activation.CommandMap;
+import javax.activation.DataContentHandler;
+
+import org.osgi.framework.Bundle;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.sun.activation.registries.MailcapFile;
+
+/**
+ * The <tt>OsgiMailcapCommandMap</tt> is a <tt>CommandMap</tt> which ensures that {@link DataCommandHandler} classes are
+ * loaded by their containing bundles.
+ * 
+ * <p>
+ * This allows the javax.activation bundle to obey classloading contraints in an OSGi environment, while preserving most
+ * of the functionality available in an unmodified version of the bundle. Notably, this implementation does not support
+ * loading <tt>mailcap</tt> files which are not placed inside a bundle.
+ * </p>
+ * 
+ */
+public class OsgiMailcapCommandMap extends CommandMap {
+
+    private static final Logger log = LoggerFactory.getLogger(OsgiMailcapCommandMap.class);
+
+    private final Map<Bundle, MailcapFile> db = new HashMap<Bundle, MailcapFile>();
+    private final Object sync = new Object();
+
+    public void addMailcapEntries(InputStream mailcapFile, Bundle originatingBundle) throws IOException {
+
+        synchronized (sync) {
+            db.put(originatingBundle, new MailcapFile(mailcapFile));
+        }
+
+        log.debug("Added mailcap entries from bundle {}", originatingBundle);
+    }
+
+    public void removeMailcapEntriesForBundle(Bundle bundle) {
+
+        boolean removed;
+        synchronized (sync) {
+            removed = db.remove(bundle) != null;
+        }
+
+        if (removed) {
+            log.debug("Removed mailcap entries from bundle {}", bundle);
+        }
+    }
+
+    @Override
+    public CommandInfo[] getPreferredCommands(String mimeType) {
+
+        List<CommandInfo> commands = new ArrayList<CommandInfo>();
+
+        if (mimeType != null) {
+            mimeType = mimeType.toLowerCase(Locale.ENGLISH);
+        }
+
+        synchronized (sync) {
+            getPreferredCommands(mimeType, commands, false);
+            getPreferredCommands(mimeType, commands, true);
+        }
+
+        return commands.toArray(new CommandInfo[commands.size()]);
+    }
+
+    private void getPreferredCommands(String mimeType, List<CommandInfo> accumulator, boolean fallback) {
+
+        for (Map.Entry<Bundle, MailcapFile> entry : db.entrySet()) {
+            Map<?, ?> commandMap = fallback ? entry.getValue().getMailcapFallbackList(mimeType) : entry.getValue()
+                    .getMailcapList(mimeType);
+
+            if (commandMap == null) {
+                continue;
+            }
+
+            for (Object verbObject : commandMap.keySet()) {
+                String verb = (String) verbObject;
+
+                if (!commandsHaveVerb(accumulator, verb)) {
+                    List<?> commands = (List<?>) commandMap.get(verb);
+                    String className = (String) commands.get(0);
+                    accumulator.add(new CommandInfo(verb, className));
+                }
+            }
+        }
+    }
+
+    @Override
+    public CommandInfo[] getAllCommands(String mimeType) {
+        List<CommandInfo> commands = new ArrayList<CommandInfo>();
+        if (mimeType != null) {
+            mimeType = mimeType.toLowerCase(Locale.ENGLISH);
+        }
+
+        synchronized (sync) {
+            getAllCommands(mimeType, commands, false);
+            getAllCommands(mimeType, commands, true);
+        }
+
+        return commands.toArray(new CommandInfo[commands.size()]);
+    }
+
+    private void getAllCommands(String mimeType, List<CommandInfo> accumulator, boolean fallback) {
+        for (Map.Entry<Bundle, MailcapFile> entry : db.entrySet()) {
+            Map<?, ?> commandMap = fallback ? entry.getValue().getMailcapFallbackList(mimeType) : 
+                entry.getValue() .getMailcapList(mimeType);
+
+            if (commandMap == null) {
+                continue;
+            }
+
+            for (Object verbAsObject : commandMap.keySet()) {
+                String verb = (String) verbAsObject;
+
+                List<?> commands = (List<?>) commandMap.get(verb);
+            
+                for (Object command : commands) {
+                    accumulator.add(new CommandInfo(verb, (String) command));
+                }
+
+            }
+        }
+    }
+
+    @Override
+    public CommandInfo getCommand(String mimeType, String cmdName) {
+        if (mimeType != null) {
+            mimeType = mimeType.toLowerCase(Locale.ENGLISH);
+        }
+
+        CommandInfo command = null;
+
+        synchronized (sync) {
+            command = getCommand(mimeType, cmdName, false);
+            if (command != null) {
+                return command;
+            }
+
+            command = getCommand(mimeType, cmdName, true);
+        }
+
+        return command;
+    }
+    
+    private CommandInfo getCommand(String mimeType, String commandName, boolean fallback) {
+        
+        for (Map.Entry<Bundle, MailcapFile> entry : db.entrySet()) {
+            Map<?, ?> commandMap = fallback ? entry.getValue().getMailcapFallbackList(mimeType)
+                    : entry.getValue().getMailcapList(mimeType);
+            if (commandMap != null) {
+                List<?> commands = (List<?>) commandMap.get(commandName);
+                if (commands == null) {
+                    continue;
+                }
+
+                String cmdClassName = (String) commands.get(0);
+
+                if (cmdClassName != null) {
+                    return new CommandInfo(commandName, cmdClassName);
+                }
+            }
+        }
+        
+        return null;
+    }
+
+    @Override
+    public DataContentHandler createDataContentHandler(String mimeType) {
+        if (mimeType != null) {
+            mimeType = mimeType.toLowerCase(Locale.ENGLISH);
+        }
+
+        synchronized (sync) {
+            DataContentHandler dch = findDataContentHandler(mimeType, false);
+
+            if (dch != null) {
+                return dch;
+            }
+
+            return findDataContentHandler(mimeType, true);
+        }
+    }
+
+    private DataContentHandler findDataContentHandler(String mimeType, boolean fallback) {
+
+        for (Map.Entry<Bundle, MailcapFile> entry : db.entrySet()) {
+            Map<?, ?> commandMap = fallback ? entry.getValue().getMailcapFallbackList(mimeType) : entry.getValue()
+                    .getMailcapList(mimeType);
+            if (commandMap != null) {
+                List<?> v = (List<?>) commandMap.get("content-handler");
+                if (v == null) {
+                    continue;
+                }
+
+                String name = (String) v.get(0);
+                DataContentHandler dch = getDataContentHandler(name, entry.getKey());
+                if (dch != null) {
+                    return dch;
+                }
+            }
+        }
+
+        return null;
+    }
+
+    public String[] getMimeTypes() {
+        List<String> mimeTypesList = new ArrayList<String>();
+
+        synchronized (sync) {
+            for (Map.Entry<Bundle, MailcapFile> entry : db.entrySet()) {
+                String[] mimeTypes = entry.getValue().getMimeTypes();
+                for (String mimeType : mimeTypes) {
+                    if (!mimeTypesList.contains(mimeType)) {
+                        mimeTypesList.add(mimeType);
+                    }
+                }
+            }
+        }
+
+        return mimeTypesList.toArray(new String[mimeTypesList.size()]);
+    }
+
+    private DataContentHandler getDataContentHandler(String name, Bundle bundle) {
+        try {
+            return (DataContentHandler) bundle.loadClass(name).newInstance();
+        } catch (InstantiationException e) {
+            log.warn("Unable to instantiate " + DataContentHandler.class.getSimpleName() + " class ' " + name
+                    + " ' from bundle " + bundle, e);
+        } catch (IllegalAccessException e) {
+            log.warn("Unable to instantiate " + DataContentHandler.class.getSimpleName() + " class ' " + name
+                    + " ' from bundle " + bundle, e);
+        } catch (ClassNotFoundException e) {
+            log.warn("Unable to instantiate " + DataContentHandler.class.getSimpleName() + " class ' " + name
+                    + " ' from bundle " + bundle, e);
+        }
+
+        return null;
+    }
+
+    private boolean commandsHaveVerb(List<CommandInfo> commands, String verb) {
+
+        for (CommandInfo commandInfo : commands) {
+            if (commandInfo.getCommandName().equals(verb)) {
+                return true;
+            }
+        }
+
+        return false;
+    }
+}


[sling-org-apache-sling-javax-activation] 13/34: Update to Sling Parent POM 22 with baselining enabled

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

davidb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-javax-activation.git

commit 59e63293887198e94f633b332e006901ed19b412
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Wed Oct 1 06:57:44 2014 +0000

    Update to Sling Parent POM 22 with baselining enabled
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1628622 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index 2352dfa..c2b0646 100755
--- a/pom.xml
+++ b/pom.xml
@@ -23,7 +23,7 @@
     <parent>
         <groupId>org.apache.sling</groupId>
         <artifactId>sling</artifactId>
-        <version>20</version>
+        <version>22</version>
     </parent>
         
     <artifactId>org.apache.sling.javax.activation</artifactId>


[sling-org-apache-sling-javax-activation] 14/34: Update to Sling Parent 23

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

davidb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-javax-activation.git

commit 8a61f51370a36658b53e4d6e252aed84ac954fb1
Author: Robert Munteanu <ro...@apache.org>
AuthorDate: Thu Jun 25 13:08:16 2015 +0000

    Update to Sling Parent 23
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1687500 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index c2b0646..b358b77 100755
--- a/pom.xml
+++ b/pom.xml
@@ -23,7 +23,7 @@
     <parent>
         <groupId>org.apache.sling</groupId>
         <artifactId>sling</artifactId>
-        <version>22</version>
+        <version>23</version>
     </parent>
         
     <artifactId>org.apache.sling.javax.activation</artifactId>


[sling-org-apache-sling-javax-activation] 09/34: Update to latest parent pom

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

davidb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-javax-activation.git

commit bf650beda6d193bd0b1b306096131b47e0d274b0
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Fri Jul 19 07:04:15 2013 +0000

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

diff --git a/pom.xml b/pom.xml
index 46f4a67..8616ebc 100755
--- a/pom.xml
+++ b/pom.xml
@@ -23,7 +23,7 @@
     <parent>
         <groupId>org.apache.sling</groupId>
         <artifactId>sling</artifactId>
-        <version>16</version>
+        <version>17</version>
     </parent>
         
     <artifactId>org.apache.sling.javax.activation</artifactId>


[sling-org-apache-sling-javax-activation] 19/34: SLING-7162 - Update SCM information in all POM files to reference Git

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

davidb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-javax-activation.git

commit 32e80e8296b2f08a53228a6b01fd50a3b73a4da4
Author: Robert Munteanu <ro...@gmail.com>
AuthorDate: Fri Oct 20 19:13:15 2017 +0200

    SLING-7162 - Update SCM information in all POM files to reference Git
---
 pom.xml | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/pom.xml b/pom.xml
index a602f38..e94f8d1 100755
--- a/pom.xml
+++ b/pom.xml
@@ -40,9 +40,9 @@
     </properties>    
 
     <scm>
-        <connection>scm:svn:http://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/javax.activation</connection>
-        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/javax.activation</developerConnection>
-        <url>http://svn.apache.org/viewvc/sling/trunk/bundles/extensions/javax.activation</url>
+        <connection>scm:git:https://gitbox.apache.org/repos/asf/sling-org-apache-sling-javax-activation.git</conncetion>
+        <developerConnection>scm:git:https://gitbox.apache.org/repos/asf/sling-org-apache-sling-javax-activation.git</developerConnection>
+        <url>https://gitbox.apache.org/repos/asf?p=sling-org-apache-sling-javax-activation.git</url>
     </scm>
 
     <build>


[sling-org-apache-sling-javax-activation] 03/34: [maven-release-plugin] rollback the release of org.apache.sling.javax.activation-0.1.0

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

davidb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-javax-activation.git

commit d33735e4482c3dea807c553b6d814168ec509b94
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Tue Apr 23 10:46:54 2013 +0000

    [maven-release-plugin] rollback the release of org.apache.sling.javax.activation-0.1.0
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1470885 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/pom.xml b/pom.xml
index 78ce102..988cf05 100755
--- a/pom.xml
+++ b/pom.xml
@@ -28,7 +28,7 @@
         
     <artifactId>org.apache.sling.javax.activation</artifactId>
     <packaging>bundle</packaging>
-    <version>0.1.0</version>
+    <version>0.0.1-SNAPSHOT</version>
 
     <name>Apache Sling javax.activation bundle</name>
     <description>The Apache Sling javax.activation bundle contributes an OSGi-compatible activation bundle.</description>
@@ -85,10 +85,4 @@
             <scope>test</scope>
         </dependency>
     </dependencies>
-
-  <scm>
-    <connection>scm:svn:http://svn.apache.org/repos/asf/sling/tags/org.apache.sling.javax.activation-0.1.0</connection>
-    <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/tags/org.apache.sling.javax.activation-0.1.0</developerConnection>
-    <url>http://svn.apache.org/viewvc/sling/tags/org.apache.sling.javax.activation-0.1.0</url>
-  </scm>
 </project>


[sling-org-apache-sling-javax-activation] 28/34: Updating badges for org-apache-sling-javax-activation

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

davidb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-javax-activation.git

commit 775dc6b83da8971d4f00812c2c7f6ad8f8cc652f
Author: Radu Cotescu <ra...@apache.org>
AuthorDate: Thu Jan 31 13:15:22 2019 +0100

    Updating badges for org-apache-sling-javax-activation
---
 README.md | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/README.md b/README.md
index 1b79b4c..8d10414 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
-[<img src="http://sling.apache.org/res/logos/sling.png"/>](http://sling.apache.org)
+[<img src="https://sling.apache.org/res/logos/sling.png"/>](https://sling.apache.org)
 
- [![Build Status](https://builds.apache.org/buildStatus/icon?job=sling-org-apache-sling-javax-activation-1.8)](https://builds.apache.org/view/S-Z/view/Sling/job/sling-org-apache-sling-javax-activation-1.8) [![Maven Central](https://maven-badges.herokuapp.com/maven-central/org.apache.sling/org.apache.sling.javax.activation/badge.svg)](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22org.apache.sling%22%20a%3A%22org.apache.sling.javax.activation%22) [![JavaDocs](https://www.javadoc.io/bad [...]
+ [![Build Status](https://builds.apache.org/buildStatus/icon?job=Sling/sling-org-apache-sling-javax-activation/master)](https://builds.apache.org/job/Sling/job/sling-org-apache-sling-javax-activation/job/master) [![Maven Central](https://maven-badges.herokuapp.com/maven-central/org.apache.sling/org.apache.sling.javax.activation/badge.svg)](https://search.maven.org/#search%7Cga%7C1%7Cg%3A%22org.apache.sling%22%20a%3A%22org.apache.sling.javax.activation%22) [![JavaDocs](https://www.javadoc [...]
 
 # Apache Sling javax.activation bundle
 


[sling-org-apache-sling-javax-activation] 15/34: set parent version to 24 and add empty relativePath where missing

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

davidb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-javax-activation.git

commit 980762a1af94ce52263a2b083b214b6fe7fb2e38
Author: Oliver Lietz <ol...@apache.org>
AuthorDate: Tue Jul 7 08:09:17 2015 +0000

    set parent version to 24 and add empty relativePath where missing
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1689593 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index b358b77..118a172 100755
--- a/pom.xml
+++ b/pom.xml
@@ -23,7 +23,8 @@
     <parent>
         <groupId>org.apache.sling</groupId>
         <artifactId>sling</artifactId>
-        <version>23</version>
+        <version>24</version>
+        <relativePath/>
     </parent>
         
     <artifactId>org.apache.sling.javax.activation</artifactId>


[sling-org-apache-sling-javax-activation] 05/34: [maven-release-plugin] prepare release org.apache.sling.javax.activation-0.1.0

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

davidb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-javax-activation.git

commit c3c8117540c0f37289c022a7e7e4e60fd392a001
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Tue Apr 23 10:51:49 2013 +0000

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

diff --git a/pom.xml b/pom.xml
index 6503c69..e56e70b 100755
--- a/pom.xml
+++ b/pom.xml
@@ -28,7 +28,7 @@
         
     <artifactId>org.apache.sling.javax.activation</artifactId>
     <packaging>bundle</packaging>
-    <version>0.0.1-SNAPSHOT</version>
+    <version>0.1.0</version>
 
     <name>Apache Sling javax.activation bundle</name>
     <description>The Apache Sling javax.activation bundle contributes an OSGi-compatible activation bundle.</description>
@@ -39,9 +39,9 @@
     </properties>    
 
     <scm>
-        <connection>scm:svn:http://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/javax.activation</connection>
-        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/javax.activation</developerConnection>
-        <url>http://svn.apache.org/viewvc/sling/trunk/bundles/extensions/javax.activation</url>
+        <connection>scm:svn:http://svn.apache.org/repos/asf/sling/tags/org.apache.sling.javax.activation-0.1.0</connection>
+        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/tags/org.apache.sling.javax.activation-0.1.0</developerConnection>
+        <url>http://svn.apache.org/viewvc/sling/tags/org.apache.sling.javax.activation-0.1.0</url>
     </scm>
 
     <build>


[sling-org-apache-sling-javax-activation] 17/34: Switch to parent pom 26

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

davidb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-javax-activation.git

commit 0987765da62aa67153d52e29766d0c772ecd04fe
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Sun Jan 3 14:07:46 2016 +0000

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

diff --git a/pom.xml b/pom.xml
index 83929dc..a602f38 100755
--- a/pom.xml
+++ b/pom.xml
@@ -23,7 +23,7 @@
     <parent>
         <groupId>org.apache.sling</groupId>
         <artifactId>sling</artifactId>
-        <version>25</version>
+        <version>26</version>
         <relativePath/>
     </parent>
         


[sling-org-apache-sling-javax-activation] 32/34: SLING-9612 Tune the nodeps javax.activation bundle to Java 8

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

davidb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-javax-activation.git

commit eddd03f5135980b2627eb6ece0b17dc1b54b17d9
Author: David Bosschaert <bo...@adobe.com>
AuthorDate: Tue Jul 28 10:48:26 2020 +0100

    SLING-9612 Tune the nodeps javax.activation bundle to Java 8
---
 pom.xml                                                      | 12 ++++++++++--
 .../apache/sling/javax/activation/internal/Activator.java    |  9 +++------
 2 files changed, 13 insertions(+), 8 deletions(-)

diff --git a/pom.xml b/pom.xml
index af42cab..d72ea8d 100755
--- a/pom.xml
+++ b/pom.xml
@@ -58,8 +58,13 @@
                         </goals>
                         <configuration>
                             <bnd><![CDATA[
-Bundle-Name: ${project.name} (No embedded dependencies)
+Bundle-Name: ${project.name} (Framework Fragment, No embedded dependencies)
 Bundle-SymbolicName: ${project.artifactId}.nodeps
+ExtensionBundle-Activator: org.apache.sling.javax.activation.internal.Activator
+Export-Package: javax.activation;version="0.0.0",com.sun.activation.registries;version="0.0.0",com.sun.activation.viewers;version="0.0.0"
+Import-Package: !javax.activation,!com.sun.activation.registries,!com.sun.activation.viewers
+Provide-Capability: osgi.contract;osgi.contract=JavaActivation;version:List<Version>="1.1.1";uses:="javax.activation"
+Fragment-Host: system.bundle;extension:=framework
 ]]>
                             </bnd>
                             <manifestPath>${project.build.directory}/nodeps-classes/META-INF/MANIFEST.MF</manifestPath>
@@ -72,7 +77,9 @@ Bundle-SymbolicName: ${project.artifactId}.nodeps
                             <bnd><![CDATA[
 -includeresource:@jakarta.activation-[0-9.]*(-SNAPSHOT)?.jar
 # version automatically determined from the MANIFEST.MF of the jakarta.activation.jar
+Bundle-Activator: org.apache.sling.javax.activation.internal.Activator
 Export-Package: javax.activation,com.sun.activation.registries,com.sun.activation.viewers
+Provide-Capability: osgi.contract;osgi.contract=JavaActivation;version:List<Version>="1.2";uses:="javax.activation"
 ]]>
                             </bnd>
                             <manifestPath>${project.build.directory}/deps-classes/META-INF/MANIFEST.MF</manifestPath>
@@ -101,7 +108,7 @@ Export-Package: javax.activation,com.sun.activation.registries,com.sun.activatio
                         </goals>
                         <configuration>
                             <classifier>nodeps</classifier>
-                            <classesDirectory>${project.build.directory}/nodeps-classes</classesDirectory>
+                            <classesDirectory>${project.build.directory}/classes</classesDirectory>
                             <archive>
                                 <manifestFile>${project.build.directory}/nodeps-classes/META-INF/MANIFEST.MF</manifestFile>
                             </archive>
@@ -117,6 +124,7 @@ Export-Package: javax.activation,com.sun.activation.registries,com.sun.activatio
             <groupId>com.sun.activation</groupId>
             <artifactId>jakarta.activation</artifactId>
             <version>${javax.activation.version}</version>
+            <scope>provided</scope>
         </dependency>
         <dependency>
             <groupId>org.osgi</groupId>
diff --git a/src/main/java/org/apache/sling/javax/activation/internal/Activator.java b/src/main/java/org/apache/sling/javax/activation/internal/Activator.java
index 751abeb..862dc2e 100755
--- a/src/main/java/org/apache/sling/javax/activation/internal/Activator.java
+++ b/src/main/java/org/apache/sling/javax/activation/internal/Activator.java
@@ -25,12 +25,10 @@ import java.net.URL;
 import javax.activation.CommandMap;
 import javax.activation.MailcapCommandMap;
 
-import org.osgi.annotation.bundle.Header;
 import org.osgi.framework.Bundle;
 import org.osgi.framework.BundleActivator;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.BundleEvent;
-import org.osgi.framework.Constants;
 import org.osgi.util.tracker.BundleTracker;
 import org.osgi.util.tracker.BundleTrackerCustomizer;
 import org.slf4j.Logger;
@@ -39,17 +37,16 @@ import org.slf4j.LoggerFactory;
 /**
  * The <tt>Activator</tt> locates <tt>activation</tt>-related services defined in <tt>mailcap</tt> files and registers
  * them so they can be used by the Java Activation Framework
- * 
+ *
  * <p>
  * The mailcap entries are expected to be found in a <tt>/META-INF/mailcap</tt> file inside the bundle.
  * </p>
- * 
+ *
  * <p>
  * This implementation does not support the full lookup algorithm specified by the {@link MailcapCommandMap}.
  * </p>
- * 
+ *
  */
-@Header(name = Constants.BUNDLE_ACTIVATOR, value = "${@class}")
 public class Activator implements BundleActivator {
 
     private static final String MAILCAP_FILE_NAME = "/META-INF/mailcap";


[sling-org-apache-sling-javax-activation] 34/34: Merge pull request #4 from bosschaert/SLING-9612

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

davidb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-javax-activation.git

commit e9ac44dbeedc3c922809bbffc69a75b32f3f729e
Merge: 76fa657 79ff18d
Author: David Bosschaert <da...@gmail.com>
AuthorDate: Tue Jul 28 16:05:16 2020 +0100

    Merge pull request #4 from bosschaert/SLING-9612
    
    SLING-9612 Tune the nodeps javax.activation bundle to Java 8

 pom.xml                                                        | 10 +++++++++-
 .../org/apache/sling/javax/activation/internal/Activator.java  |  9 +++------
 2 files changed, 12 insertions(+), 7 deletions(-)


[sling-org-apache-sling-javax-activation] 12/34: Updated to parent version 20

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

davidb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-javax-activation.git

commit 371118103f74dac56fcc22b28d1f966d4bbb225c
Author: Robert Munteanu <ro...@apache.org>
AuthorDate: Fri Aug 1 19:16:26 2014 +0000

    Updated to parent version 20
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1615208 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index eb30793..2352dfa 100755
--- a/pom.xml
+++ b/pom.xml
@@ -23,7 +23,7 @@
     <parent>
         <groupId>org.apache.sling</groupId>
         <artifactId>sling</artifactId>
-        <version>19</version>
+        <version>20</version>
     </parent>
         
     <artifactId>org.apache.sling.javax.activation</artifactId>


[sling-org-apache-sling-javax-activation] 08/34: SLING-2887 Properly attribute inclusion of the activation.jar library

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

davidb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-javax-activation.git

commit 728f4986ea4a7a5c71f4117f376a67f02cf13617
Author: Felix Meschberger <fm...@apache.org>
AuthorDate: Tue May 28 10:30:55 2013 +0000

    SLING-2887 Properly attribute inclusion of the activation.jar library
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1486856 13f79535-47bb-0310-9956-ffa450edef68
---
 src/main/appended-resources/META-INF/LICENSE | 136 +++++++++++++++++++++++++++
 src/main/appended-resources/META-INF/NOTICE  |   4 +
 2 files changed, 140 insertions(+)

diff --git a/src/main/appended-resources/META-INF/LICENSE b/src/main/appended-resources/META-INF/LICENSE
new file mode 100644
index 0000000..db655ca
--- /dev/null
+++ b/src/main/appended-resources/META-INF/LICENSE
@@ -0,0 +1,136 @@
+
+
+APACHE SLING JAVAX.ACTIVATION SUBCOMPONENTS: 
+
+The Apache Sling javax.activation includes a number of subcomponents with
+separate copyright notices and license terms. Your use of the source
+code for the these subcomponents is subject to the terms and
+conditions of the following licenses. 
+
+
+For the Activation library component:
+
+COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
+
+1. Definitions.
+
+   1.1. Contributor. means each individual or entity that creates or contributes to the creation of Modifications.
+
+   1.2. Contributor Version. means the combination of the Original Software, prior Modifications used by a Contributor (if any), and the Modifications made by that particular Contributor.
+
+   1.3. Covered Software. means (a) the Original Software, or (b) Modifications, or (c) the combination of files containing Original Software with files containing Modifications, in each case including portions thereof.
+
+   1.4. Executable. means the Covered Software in any form other than Source Code.
+
+   1.5. Initial Developer. means the individual or entity that first makes Original Software available under this License.
+
+   1.6. Larger Work. means a work which combines Covered Software or portions thereof with code not governed by the terms of this License.
+
+   1.7. License. means this document.
+
+   1.8. Licensable. means having the right to grant, to the maximum extent possible, whether at the time of the initial grant or subsequently acquired, any and all of the rights conveyed herein.
+
+   1.9. Modifications. means the Source Code and Executable form of any of the following:
+
+        A. Any file that results from an addition to, deletion from or modification of the contents of a file containing Original Software or previous Modifications;
+
+        B. Any new file that contains any part of the Original Software or previous Modification; or
+
+        C. Any new file that is contributed or otherwise made available under the terms of this License.
+
+   1.10. Original Software. means the Source Code and Executable form of computer software code that is originally released under this License.
+
+   1.11. Patent Claims. means any patent claim(s), now owned or hereafter acquired, including without limitation, method, process, and apparatus claims, in any patent Licensable by grantor.
+
+   1.12. Source Code. means (a) the common form of computer software code in which modifications are made and (b) associated documentation included in or with such code.
+
+   1.13. You. (or .Your.) means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License. For legal entities, .You. includes any entity which controls, is controlled by, or is under common control with You. For purposes of this definition, .control. means (a) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (b) ownership of more than fifty percent (50%) of the outs [...]
+
+2. License Grants.
+
+      2.1. The Initial Developer Grant.
+
+      Conditioned upon Your compliance with Section 3.1 below and subject to third party intellectual property claims, the Initial Developer hereby grants You a world-wide, royalty-free, non-exclusive license:
+
+         (a) under intellectual property rights (other than patent or trademark) Licensable by Initial Developer, to use, reproduce, modify, display, perform, sublicense and distribute the Original Software (or portions thereof), with or without Modifications, and/or as part of a Larger Work; and
+
+         (b) under Patent Claims infringed by the making, using or selling of Original Software, to make, have made, use, practice, sell, and offer for sale, and/or otherwise dispose of the Original Software (or portions thereof).
+
+        (c) The licenses granted in Sections 2.1(a) and (b) are effective on the date Initial Developer first distributes or otherwise makes the Original Software available to a third party under the terms of this License.
+
+        (d) Notwithstanding Section 2.1(b) above, no patent license is granted: (1) for code that You delete from the Original Software, or (2) for infringements caused by: (i) the modification of the Original Software, or (ii) the combination of the Original Software with other software or devices.
+
+    2.2. Contributor Grant.
+
+    Conditioned upon Your compliance with Section 3.1 below and subject to third party intellectual property claims, each Contributor hereby grants You a world-wide, royalty-free, non-exclusive license:
+
+        (a) under intellectual property rights (other than patent or trademark) Licensable by Contributor to use, reproduce, modify, display, perform, sublicense and distribute the Modifications created by such Contributor (or portions thereof), either on an unmodified basis, with other Modifications, as Covered Software and/or as part of a Larger Work; and
+
+        (b) under Patent Claims infringed by the making, using, or selling of Modifications made by that Contributor either alone and/or in combination with its Contributor Version (or portions of such combination), to make, use, sell, offer for sale, have made, and/or otherwise dispose of: (1) Modifications made by that Contributor (or portions thereof); and (2) the combination of Modifications made by that Contributor with its Contributor Version (or portions of such combination).
+
+        (c) The licenses granted in Sections 2.2(a) and 2.2(b) are effective on the date Contributor first distributes or otherwise makes the Modifications available to a third party.
+
+        (d) Notwithstanding Section 2.2(b) above, no patent license is granted: (1) for any code that Contributor has deleted from the Contributor Version; (2) for infringements caused by: (i) third party modifications of Contributor Version, or (ii) the combination of Modifications made by that Contributor with other software (except as part of the Contributor Version) or other devices; or (3) under Patent Claims infringed by Covered Software in the absence of Modifications made by that [...]
+
+3. Distribution Obligations.
+
+      3.1. Availability of Source Code.
+      Any Covered Software that You distribute or otherwise make available in Executable form must also be made available in Source Code form and that Source Code form must be distributed only under the terms of this License. You must include a copy of this License with every copy of the Source Code form of the Covered Software You distribute or otherwise make available. You must inform recipients of any such Covered Software in Executable form as to how they can obtain such Covered Soft [...]
+
+      3.2. Modifications.
+      The Modifications that You create or to which You contribute are governed by the terms of this License. You represent that You believe Your Modifications are Your original creation(s) and/or You have sufficient rights to grant the rights conveyed by this License.
+
+      3.3. Required Notices.
+      You must include a notice in each of Your Modifications that identifies You as the Contributor of the Modification. You may not remove or alter any copyright, patent or trademark notices contained within the Covered Software, or any notices of licensing or any descriptive text giving attribution to any Contributor or the Initial Developer.
+
+      3.4. Application of Additional Terms.
+      You may not offer or impose any terms on any Covered Software in Source Code form that alters or restricts the applicable version of this License or the recipients. rights hereunder. You may choose to offer, and to charge a fee for, warranty, support, indemnity or liability obligations to one or more recipients of Covered Software. However, you may do so only on Your own behalf, and not on behalf of the Initial Developer or any Contributor. You must make it absolutely clear that an [...]
+
+      3.5. Distribution of Executable Versions.
+      You may distribute the Executable form of the Covered Software under the terms of this License or under the terms of a license of Your choice, which may contain terms different from this License, provided that You are in compliance with the terms of this License and that the license for the Executable form does not attempt to limit or alter the recipient.s rights in the Source Code form from the rights set forth in this License. If You distribute the Covered Software in Executable  [...]
+
+      3.6. Larger Works.
+      You may create a Larger Work by combining Covered Software with other code not governed by the terms of this License and distribute the Larger Work as a single product. In such a case, You must make sure the requirements of this License are fulfilled for the Covered Software.
+
+4. Versions of the License.
+
+      4.1. New Versions.
+      Sun Microsystems, Inc. is the initial license steward and may publish revised and/or new versions of this License from time to time. Each version will be given a distinguishing version number. Except as provided in Section 4.3, no one other than the license steward has the right to modify this License.
+
+      4.2. Effect of New Versions.
+      You may always continue to use, distribute or otherwise make the Covered Software available under the terms of the version of the License under which You originally received the Covered Software. If the Initial Developer includes a notice in the Original Software prohibiting it from being distributed or otherwise made available under any subsequent version of the License, You must distribute and make the Covered Software available under the terms of the version of the License under [...]
+
+      4.3. Modified Versions.
+      When You are an Initial Developer and You want to create a new license for Your Original Software, You may create and use a modified version of this License if You: (a) rename the license and remove any references to the name of the license steward (except to note that the license differs from this License); and (b) otherwise make it clear that the license contains terms which differ from this License.
+
+5. DISCLAIMER OF WARRANTY.
+
+   COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN .AS IS. BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED SOFTWARE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED SOFTWARE IS WITH YOU. SHOULD ANY COVERED SOFTWARE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME  [...]
+
+6. TERMINATION.
+
+      6.1. This License and the rights granted hereunder will terminate automatically if You fail to comply with terms herein and fail to cure such breach within 30 days of becoming aware of the breach. Provisions which, by their nature, must remain in effect beyond the termination of this License shall survive.
+
+      6.2. If You assert a patent infringement claim (excluding declaratory judgment actions) against Initial Developer or a Contributor (the Initial Developer or Contributor against whom You assert such claim is referred to as .Participant.) alleging that the Participant Software (meaning the Contributor Version where the Participant is a Contributor or the Original Software where the Participant is the Initial Developer) directly or indirectly infringes any patent, then any and all rig [...]
+
+      6.3. In the event of termination under Sections 6.1 or 6.2 above, all end user licenses that have been validly granted by You or any distributor hereunder prior to termination (excluding licenses granted to You by any distributor) shall survive termination.
+
+7. LIMITATION OF LIABILITY.
+
+   UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED SOFTWARE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOST PROFITS, LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND AL [...]
+
+8. U.S. GOVERNMENT END USERS.
+
+   The Covered Software is a .commercial item,. as that term is defined in 48 C.F.R. 2.101 (Oct. 1995), consisting of .commercial computer software. (as that term is defined at 48 C.F.R. � 252.227-7014(a)(1)) and .commercial computer software documentation. as such terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all U.S. Government End Users acquire Covered Software with only those rights set forth [...]
+
+9. MISCELLANEOUS.
+
+   This License represents the complete agreement concerning subject matter hereof. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. This License shall be governed by the law of the jurisdiction specified in a notice contained within the Original Software (except to the extent applicable law, if any, provides otherwise), excluding such jurisdiction.s conflict-of-law provisions. Any litigati [...]
+
+10. RESPONSIBILITY FOR CLAIMS.
+
+   As between Initial Developer and the Contributors, each party is responsible for claims and damages arising, directly or indirectly, out of its utilization of rights under this License and You agree to work with Initial Developer and Contributors to distribute such responsibility on an equitable basis. Nothing herein is intended or shall be deemed to constitute any admission of liability.
+
+   NOTICE PURSUANT TO SECTION 9 OF THE COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL)
+
+   The code released under the CDDL shall be governed by the laws of the State of California (excluding conflict-of-law provisions). Any litigation relating to this License shall be subject to the jurisdiction of the Federal Courts of the Northern District of California and the state courts of the State of California, with venue lying in Santa Clara County, California.
diff --git a/src/main/appended-resources/META-INF/NOTICE b/src/main/appended-resources/META-INF/NOTICE
new file mode 100644
index 0000000..ffabdaf
--- /dev/null
+++ b/src/main/appended-resources/META-INF/NOTICE
@@ -0,0 +1,4 @@
+
+This product includes software developed at
+Sun Microsystems
+licensed under CDDL 1.0


[sling-org-apache-sling-javax-activation] 33/34: Use -exportcontents instead of Export-Package

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

davidb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-javax-activation.git

commit 79ff18d85b562da32ed7621df729dcc6826ca0df
Author: David Bosschaert <bo...@adobe.com>
AuthorDate: Tue Jul 28 11:46:10 2020 +0100

    Use -exportcontents instead of Export-Package
    
    To avoid embedding the java.activation classes.
    Also added the list of compatible JavaActivation contracts
---
 pom.xml | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/pom.xml b/pom.xml
index d72ea8d..2023735 100755
--- a/pom.xml
+++ b/pom.xml
@@ -61,9 +61,9 @@
 Bundle-Name: ${project.name} (Framework Fragment, No embedded dependencies)
 Bundle-SymbolicName: ${project.artifactId}.nodeps
 ExtensionBundle-Activator: org.apache.sling.javax.activation.internal.Activator
-Export-Package: javax.activation;version="0.0.0",com.sun.activation.registries;version="0.0.0",com.sun.activation.viewers;version="0.0.0"
+-exportcontents: javax.activation;version="0.0.0",com.sun.activation.registries;version="0.0.0",com.sun.activation.viewers;version="0.0.0"
 Import-Package: !javax.activation,!com.sun.activation.registries,!com.sun.activation.viewers
-Provide-Capability: osgi.contract;osgi.contract=JavaActivation;version:List<Version>="1.1.1";uses:="javax.activation"
+Provide-Capability: osgi.contract;osgi.contract=JavaActivation;version:List<Version>="1.1,1.1.1";uses:="javax.activation"
 Fragment-Host: system.bundle;extension:=framework
 ]]>
                             </bnd>
@@ -79,7 +79,7 @@ Fragment-Host: system.bundle;extension:=framework
 # version automatically determined from the MANIFEST.MF of the jakarta.activation.jar
 Bundle-Activator: org.apache.sling.javax.activation.internal.Activator
 Export-Package: javax.activation,com.sun.activation.registries,com.sun.activation.viewers
-Provide-Capability: osgi.contract;osgi.contract=JavaActivation;version:List<Version>="1.2";uses:="javax.activation"
+Provide-Capability: osgi.contract;osgi.contract=JavaActivation;version:List<Version>="1.1,1.1.1,1.2";uses:="javax.activation"
 ]]>
                             </bnd>
                             <manifestPath>${project.build.directory}/deps-classes/META-INF/MANIFEST.MF</manifestPath>
@@ -108,7 +108,7 @@ Provide-Capability: osgi.contract;osgi.contract=JavaActivation;version:List<Vers
                         </goals>
                         <configuration>
                             <classifier>nodeps</classifier>
-                            <classesDirectory>${project.build.directory}/classes</classesDirectory>
+                            <classesDirectory>${project.build.directory}/nodeps-classes</classesDirectory>
                             <archive>
                                 <manifestFile>${project.build.directory}/nodeps-classes/META-INF/MANIFEST.MF</manifestFile>
                             </archive>


[sling-org-apache-sling-javax-activation] 18/34: SLING-7167 Adjust READMEs

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

davidb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-javax-activation.git

commit ac7c1e5a70cbbb7cc340418e57fe15a3ec1cab6b
Author: Oliver Lietz <ol...@apache.org>
AuthorDate: Tue Oct 3 09:23:18 2017 +0000

    SLING-7167 Adjust READMEs
    
    add missing README
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1810700 13f79535-47bb-0310-9956-ffa450edef68
---
 README.md | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/README.md b/README.md
new file mode 100644
index 0000000..afd06fb
--- /dev/null
+++ b/README.md
@@ -0,0 +1,3 @@
+# Apache Sling javax.activation bundle
+
+This module is part of the [Apache Sling](https://sling.apache.org) project.


[sling-org-apache-sling-javax-activation] 06/34: [maven-release-plugin] prepare for next development iteration

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

davidb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-javax-activation.git

commit f2b1f476941aa083de2e0ca52626fc2161788084
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Tue Apr 23 10:52:12 2013 +0000

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

diff --git a/pom.xml b/pom.xml
index e56e70b..7cf0f32 100755
--- a/pom.xml
+++ b/pom.xml
@@ -28,7 +28,7 @@
         
     <artifactId>org.apache.sling.javax.activation</artifactId>
     <packaging>bundle</packaging>
-    <version>0.1.0</version>
+    <version>0.1.1-SNAPSHOT</version>
 
     <name>Apache Sling javax.activation bundle</name>
     <description>The Apache Sling javax.activation bundle contributes an OSGi-compatible activation bundle.</description>
@@ -39,9 +39,9 @@
     </properties>    
 
     <scm>
-        <connection>scm:svn:http://svn.apache.org/repos/asf/sling/tags/org.apache.sling.javax.activation-0.1.0</connection>
-        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/tags/org.apache.sling.javax.activation-0.1.0</developerConnection>
-        <url>http://svn.apache.org/viewvc/sling/tags/org.apache.sling.javax.activation-0.1.0</url>
+        <connection>scm:svn:http://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/javax.activation</connection>
+        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/javax.activation</developerConnection>
+        <url>http://svn.apache.org/viewvc/sling/trunk/bundles/extensions/javax.activation</url>
     </scm>
 
     <build>


[sling-org-apache-sling-javax-activation] 31/34: SLING-9603 update to newest parent (#3)

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

davidb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-javax-activation.git

commit 76fa657f92c3f2035490c63b13dc072faadd3e16
Author: Konrad Windszus <kw...@apache.org>
AuthorDate: Mon Jul 27 17:11:22 2020 +0200

    SLING-9603 update to newest parent (#3)
    
    use bnd-m-plugin instead of m-bundle-plugin
    SLING-8040 inline activation.jar
---
 pom.xml                                            | 98 ++++++++++++++--------
 .../sling/javax/activation/internal/Activator.java | 30 +++----
 2 files changed, 72 insertions(+), 56 deletions(-)

diff --git a/pom.xml b/pom.xml
index c12050a..af42cab 100755
--- a/pom.xml
+++ b/pom.xml
@@ -22,19 +22,19 @@
     <modelVersion>4.0.0</modelVersion>
     <parent>
         <groupId>org.apache.sling</groupId>
-        <artifactId>sling</artifactId>
-        <version>34</version>
+        <artifactId>sling-bundle-parent</artifactId>
+        <version>39</version>
         <relativePath/>
     </parent>
-        
+
     <artifactId>org.apache.sling.javax.activation</artifactId>
-    <packaging>bundle</packaging>
     <version>0.1.1-SNAPSHOT</version>
 
     <name>Apache Sling javax.activation bundle</name>
     <description>The Apache Sling javax.activation bundle contributes an OSGi-compatible activation bundle.</description>
     
     <properties>
+        <project.build.outputTimestamp>2019-10-02T08:04:00Z</project.build.outputTimestamp>
         <javax.activation.version>1.2.2</javax.activation.version>
         <site.javadoc.exclude>**.impl.**</site.javadoc.exclude>
     </properties>    
@@ -48,35 +48,63 @@
     <build>
         <plugins>
             <plugin>
-                <groupId>org.apache.felix</groupId>
-                <artifactId>maven-bundle-plugin</artifactId>
-                <extensions>true</extensions>
+                <groupId>biz.aQute.bnd</groupId>
+                <artifactId>bnd-maven-plugin</artifactId>
                 <executions>
                     <execution>
-                        <id>bundle</id>
-                        <goals><goal>bundle</goal></goals>
+                        <id>bnd-process-nodeps</id>
+                        <goals>
+                            <goal>bnd-process</goal>
+                        </goals>
+                        <configuration>
+                            <bnd><![CDATA[
+Bundle-Name: ${project.name} (No embedded dependencies)
+Bundle-SymbolicName: ${project.artifactId}.nodeps
+]]>
+                            </bnd>
+                            <manifestPath>${project.build.directory}/nodeps-classes/META-INF/MANIFEST.MF</manifestPath>
+                            <outputDir>${project.build.directory}/nodeps-classes</outputDir>
+                        </configuration>
+                    </execution>
+                    <execution>
+                        <id>bnd-process</id>
                         <configuration>
-                            <instructions>
-                                <Bundle-Activator>org.apache.sling.javax.activation.internal.Activator</Bundle-Activator>
-                                <Export-Package>javax.activation;version=${javax.activation.version}</Export-Package>
-                                <Embed-Dependency>*;scope=compile</Embed-Dependency>
-                            </instructions>
+                            <bnd><![CDATA[
+-includeresource:@jakarta.activation-[0-9.]*(-SNAPSHOT)?.jar
+# version automatically determined from the MANIFEST.MF of the jakarta.activation.jar
+Export-Package: javax.activation,com.sun.activation.registries,com.sun.activation.viewers
+]]>
+                            </bnd>
+                            <manifestPath>${project.build.directory}/deps-classes/META-INF/MANIFEST.MF</manifestPath>
+                            <outputDir>${project.build.directory}/deps-classes</outputDir>
                         </configuration>
                     </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-jar-plugin</artifactId>
+                <executions>
                     <execution>
-                        <id>nodepsbundle</id>
-                        <goals><goal>bundle</goal></goals>
+                        <id>default-jar</id>
+                        <configuration>
+                            <classesDirectory>${project.build.directory}/deps-classes</classesDirectory>
+                            <archive>
+                                <manifestFile>${project.build.directory}/deps-classes/META-INF/MANIFEST.MF</manifestFile>
+                            </archive>
+                        </configuration>
+                    </execution>
+                    <execution>
+                        <id>jar-nodeps</id>
+                        <goals>
+                            <goal>jar</goal>
+                        </goals>
                         <configuration>
                             <classifier>nodeps</classifier>
-                            <instructions>
-                                <Bundle-Name>
-                                    ${project.name} (No embedded dependencies)
-                                </Bundle-Name>
-                                <Bundle-SymbolicName>
-                                    ${project.artifactId}.nodeps
-                                </Bundle-SymbolicName>
-                                <Bundle-Activator>org.apache.sling.javax.activation.internal.Activator</Bundle-Activator>
-                            </instructions>
+                            <classesDirectory>${project.build.directory}/nodeps-classes</classesDirectory>
+                            <archive>
+                                <manifestFile>${project.build.directory}/nodeps-classes/META-INF/MANIFEST.MF</manifestFile>
+                            </archive>
                         </configuration>
                     </execution>
                 </executions>
@@ -90,30 +118,26 @@
             <artifactId>jakarta.activation</artifactId>
             <version>${javax.activation.version}</version>
         </dependency>
-        <!-- Compendium 4.2.0 is needed to access BundleTracker -->
         <dependency>
             <groupId>org.osgi</groupId>
-            <artifactId>org.osgi.compendium</artifactId>
-            <version>4.2.0</version>
+            <artifactId>org.osgi.annotation.bundle</artifactId>
             <scope>provided</scope>
         </dependency>
         <dependency>
             <groupId>org.osgi</groupId>
-            <artifactId>org.osgi.core</artifactId>
-            <version>4.2.0</version>
+            <artifactId>org.osgi.framework</artifactId>
             <scope>provided</scope>
         </dependency>
         <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-api</artifactId>
+            <groupId>org.osgi</groupId>
+            <artifactId>org.osgi.util.tracker</artifactId>
+            <version>1.5.1</version>
             <scope>provided</scope>
         </dependency>
-        
-        <!-- Test dependencies -->
         <dependency>
-            <groupId>junit</groupId>
-            <artifactId>junit</artifactId>
-            <scope>test</scope>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-api</artifactId>
+            <scope>provided</scope>
         </dependency>
     </dependencies>
 </project>
diff --git a/src/main/java/org/apache/sling/javax/activation/internal/Activator.java b/src/main/java/org/apache/sling/javax/activation/internal/Activator.java
index 626613a..751abeb 100755
--- a/src/main/java/org/apache/sling/javax/activation/internal/Activator.java
+++ b/src/main/java/org/apache/sling/javax/activation/internal/Activator.java
@@ -25,10 +25,12 @@ import java.net.URL;
 import javax.activation.CommandMap;
 import javax.activation.MailcapCommandMap;
 
+import org.osgi.annotation.bundle.Header;
 import org.osgi.framework.Bundle;
 import org.osgi.framework.BundleActivator;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.BundleEvent;
+import org.osgi.framework.Constants;
 import org.osgi.util.tracker.BundleTracker;
 import org.osgi.util.tracker.BundleTrackerCustomizer;
 import org.slf4j.Logger;
@@ -47,12 +49,13 @@ import org.slf4j.LoggerFactory;
  * </p>
  * 
  */
+@Header(name = Constants.BUNDLE_ACTIVATOR, value = "${@class}")
 public class Activator implements BundleActivator {
 
     private static final String MAILCAP_FILE_NAME = "/META-INF/mailcap";
     private static final Logger log = LoggerFactory.getLogger(Activator.class);
 
-    private BundleTracker bundleTracker;
+    private BundleTracker<Void> bundleTracker;
     private OsgiMailcapCommandMap commandMap;
 
     public void start(BundleContext context) throws Exception {
@@ -64,21 +67,21 @@ public class Activator implements BundleActivator {
 
         CommandMap.setDefaultCommandMap(commandMap);
 
-        bundleTracker = new BundleTracker(context, Bundle.ACTIVE | Bundle.UNINSTALLED | Bundle.STOP_TRANSIENT,
-                new BundleTrackerCustomizer() {
+        bundleTracker = new BundleTracker<>(context, Bundle.ACTIVE | Bundle.UNINSTALLED | Bundle.STOP_TRANSIENT,
+                new BundleTrackerCustomizer<Void>() {
 
-                    public void removedBundle(Bundle bundle, BundleEvent event, Object object) {
+                    public void removedBundle(Bundle bundle, BundleEvent event, Void object) {
                         unregisterBundleMailcapEntries(bundle);
                     }
 
-                    public void modifiedBundle(Bundle bundle, BundleEvent event, Object object) {
+                    public void modifiedBundle(Bundle bundle, BundleEvent event, Void object) {
                         unregisterBundleMailcapEntries(bundle);
                         registerBundleMailcapEntries(bundle);
                     }
 
-                    public Object addingBundle(Bundle bundle, BundleEvent event) {
+                    public Void addingBundle(Bundle bundle, BundleEvent event) {
                         registerBundleMailcapEntries(bundle);
-                        return bundle;
+                        return null;
                     }
                 });
 
@@ -94,21 +97,10 @@ public class Activator implements BundleActivator {
         if (mailcapEntry == null)
             return;
 
-        InputStream input = null;
-
-        try {
-            input = mailcapEntry.openStream();
-
+        try (InputStream input = mailcapEntry.openStream()) {
             commandMap.addMailcapEntries(input, bundle);
-
         } catch (IOException e) {
             log.warn("Failed loading " + MAILCAP_FILE_NAME + " from bundle " + bundle, e);
-        } finally {
-            try {
-                input.close();
-            } catch (IOException e) {
-                // don't care
-            }
         }
     }
 


[sling-org-apache-sling-javax-activation] 24/34: SLING-7216 - [nice-to-have] Add a CODE_OF_CONDUCT file to every module

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

davidb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-javax-activation.git

commit 04789295e7f2749f5fc838fd2463db0a1921f3cf
Author: Radu Cotescu <ra...@apache.org>
AuthorDate: Wed Sep 19 18:04:01 2018 +0200

    SLING-7216 - [nice-to-have] Add a CODE_OF_CONDUCT file to every module
---
 CODE_OF_CONDUCT.md | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md
new file mode 100644
index 0000000..52f21cb
--- /dev/null
+++ b/CODE_OF_CONDUCT.md
@@ -0,0 +1,4 @@
+Apache Software Foundation Code of Conduct
+====
+
+Being an Apache project, Apache Sling adheres to the Apache Software Foundation's [Code of Conduct](https://www.apache.org/foundation/policies/conduct.html).


[sling-org-apache-sling-javax-activation] 07/34: Correct reactor pom and update to parent pom 16

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

davidb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-javax-activation.git

commit e2b687c367f80136463506df4c8370c630a954fc
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Sun May 5 14:38:24 2013 +0000

    Correct reactor pom and update to parent pom 16
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1479333 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index 7cf0f32..46f4a67 100755
--- a/pom.xml
+++ b/pom.xml
@@ -23,7 +23,7 @@
     <parent>
         <groupId>org.apache.sling</groupId>
         <artifactId>sling</artifactId>
-        <version>15</version>
+        <version>16</version>
     </parent>
         
     <artifactId>org.apache.sling.javax.activation</artifactId>


[sling-org-apache-sling-javax-activation] 21/34: SLING-7214 - Add the LICENSE file to every module

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

davidb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-javax-activation.git

commit 41ae78318f981143a176e7fc3a75ab22ffdc924f
Author: Robert Munteanu <ro...@apache.org>
AuthorDate: Mon Oct 23 18:38:24 2017 +0200

    SLING-7214 - Add the LICENSE file to every module
---
 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.


[sling-org-apache-sling-javax-activation] 04/34: set svn:ignore and svn info

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

davidb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-javax-activation.git

commit a3b1e7b3011c48f45de0d36421596ac190936174
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Tue Apr 23 10:50:47 2013 +0000

    set svn:ignore and svn info
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1470887 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/pom.xml b/pom.xml
index 988cf05..6503c69 100755
--- a/pom.xml
+++ b/pom.xml
@@ -38,6 +38,12 @@
         <site.javadoc.exclude>**.impl.**</site.javadoc.exclude>
     </properties>    
 
+    <scm>
+        <connection>scm:svn:http://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/javax.activation</connection>
+        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/javax.activation</developerConnection>
+        <url>http://svn.apache.org/viewvc/sling/trunk/bundles/extensions/javax.activation</url>
+    </scm>
+
     <build>
         <plugins>
             <plugin>


[sling-org-apache-sling-javax-activation] 23/34: Updating badges for org-apache-sling-javax-activation

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

davidb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-javax-activation.git

commit ad416fafa2ad1b1f146413454c4cf2a6e6336d4f
Author: Dan Klco <dk...@apache.org>
AuthorDate: Fri Jun 8 13:29:15 2018 -0400

    Updating badges for org-apache-sling-javax-activation
---
 README.md | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/README.md b/README.md
index afd06fb..1b79b4c 100644
--- a/README.md
+++ b/README.md
@@ -1,3 +1,9 @@
+[<img src="http://sling.apache.org/res/logos/sling.png"/>](http://sling.apache.org)
+
+ [![Build Status](https://builds.apache.org/buildStatus/icon?job=sling-org-apache-sling-javax-activation-1.8)](https://builds.apache.org/view/S-Z/view/Sling/job/sling-org-apache-sling-javax-activation-1.8) [![Maven Central](https://maven-badges.herokuapp.com/maven-central/org.apache.sling/org.apache.sling.javax.activation/badge.svg)](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22org.apache.sling%22%20a%3A%22org.apache.sling.javax.activation%22) [![JavaDocs](https://www.javadoc.io/bad [...]
+
 # Apache Sling javax.activation bundle
 
 This module is part of the [Apache Sling](https://sling.apache.org) project.
+
+The Apache Sling javax.activation bundle contributes an OSGi-compatible activation bundle.


[sling-org-apache-sling-javax-activation] 29/34: SLING-9057 update to version 1.2.2 of embedded activation

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

davidb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-javax-activation.git

commit acdc334cf272abc5ac2252727a1965285996eda7
Author: Konrad Windszus <kw...@apache.org>
AuthorDate: Sat Jul 25 15:17:21 2020 +0200

    SLING-9057 update to version 1.2.2 of embedded activation
    
    This closes #1
---
 pom.xml                                      |   7 +-
 src/main/appended-resources/META-INF/LICENSE | 136 ---------------------------
 src/main/appended-resources/META-INF/NOTICE  |   4 -
 3 files changed, 4 insertions(+), 143 deletions(-)

diff --git a/pom.xml b/pom.xml
index 1923c11..d7ba8f5 100755
--- a/pom.xml
+++ b/pom.xml
@@ -35,7 +35,7 @@
     <description>The Apache Sling javax.activation bundle contributes an OSGi-compatible activation bundle.</description>
     
     <properties>
-        <javax.activation.version>1.1.1</javax.activation.version>
+        <javax.activation.version>1.2.2</javax.activation.version>
         <site.javadoc.exclude>**.impl.**</site.javadoc.exclude>
     </properties>    
 
@@ -62,9 +62,10 @@
         </plugins>
     </build>
     <dependencies>
+        <!-- https://eclipse-ee4j.github.io/jaf/ -->
         <dependency>
-            <groupId>javax.activation</groupId>
-            <artifactId>activation</artifactId>
+            <groupId>com.sun.activation</groupId>
+            <artifactId>jakarta.activation</artifactId>
             <version>${javax.activation.version}</version>
         </dependency>
         <!-- Compendium 4.2.0 is needed to access BundleTracker -->
diff --git a/src/main/appended-resources/META-INF/LICENSE b/src/main/appended-resources/META-INF/LICENSE
deleted file mode 100644
index db655ca..0000000
--- a/src/main/appended-resources/META-INF/LICENSE
+++ /dev/null
@@ -1,136 +0,0 @@
-
-
-APACHE SLING JAVAX.ACTIVATION SUBCOMPONENTS: 
-
-The Apache Sling javax.activation includes a number of subcomponents with
-separate copyright notices and license terms. Your use of the source
-code for the these subcomponents is subject to the terms and
-conditions of the following licenses. 
-
-
-For the Activation library component:
-
-COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
-
-1. Definitions.
-
-   1.1. Contributor. means each individual or entity that creates or contributes to the creation of Modifications.
-
-   1.2. Contributor Version. means the combination of the Original Software, prior Modifications used by a Contributor (if any), and the Modifications made by that particular Contributor.
-
-   1.3. Covered Software. means (a) the Original Software, or (b) Modifications, or (c) the combination of files containing Original Software with files containing Modifications, in each case including portions thereof.
-
-   1.4. Executable. means the Covered Software in any form other than Source Code.
-
-   1.5. Initial Developer. means the individual or entity that first makes Original Software available under this License.
-
-   1.6. Larger Work. means a work which combines Covered Software or portions thereof with code not governed by the terms of this License.
-
-   1.7. License. means this document.
-
-   1.8. Licensable. means having the right to grant, to the maximum extent possible, whether at the time of the initial grant or subsequently acquired, any and all of the rights conveyed herein.
-
-   1.9. Modifications. means the Source Code and Executable form of any of the following:
-
-        A. Any file that results from an addition to, deletion from or modification of the contents of a file containing Original Software or previous Modifications;
-
-        B. Any new file that contains any part of the Original Software or previous Modification; or
-
-        C. Any new file that is contributed or otherwise made available under the terms of this License.
-
-   1.10. Original Software. means the Source Code and Executable form of computer software code that is originally released under this License.
-
-   1.11. Patent Claims. means any patent claim(s), now owned or hereafter acquired, including without limitation, method, process, and apparatus claims, in any patent Licensable by grantor.
-
-   1.12. Source Code. means (a) the common form of computer software code in which modifications are made and (b) associated documentation included in or with such code.
-
-   1.13. You. (or .Your.) means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License. For legal entities, .You. includes any entity which controls, is controlled by, or is under common control with You. For purposes of this definition, .control. means (a) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (b) ownership of more than fifty percent (50%) of the outs [...]
-
-2. License Grants.
-
-      2.1. The Initial Developer Grant.
-
-      Conditioned upon Your compliance with Section 3.1 below and subject to third party intellectual property claims, the Initial Developer hereby grants You a world-wide, royalty-free, non-exclusive license:
-
-         (a) under intellectual property rights (other than patent or trademark) Licensable by Initial Developer, to use, reproduce, modify, display, perform, sublicense and distribute the Original Software (or portions thereof), with or without Modifications, and/or as part of a Larger Work; and
-
-         (b) under Patent Claims infringed by the making, using or selling of Original Software, to make, have made, use, practice, sell, and offer for sale, and/or otherwise dispose of the Original Software (or portions thereof).
-
-        (c) The licenses granted in Sections 2.1(a) and (b) are effective on the date Initial Developer first distributes or otherwise makes the Original Software available to a third party under the terms of this License.
-
-        (d) Notwithstanding Section 2.1(b) above, no patent license is granted: (1) for code that You delete from the Original Software, or (2) for infringements caused by: (i) the modification of the Original Software, or (ii) the combination of the Original Software with other software or devices.
-
-    2.2. Contributor Grant.
-
-    Conditioned upon Your compliance with Section 3.1 below and subject to third party intellectual property claims, each Contributor hereby grants You a world-wide, royalty-free, non-exclusive license:
-
-        (a) under intellectual property rights (other than patent or trademark) Licensable by Contributor to use, reproduce, modify, display, perform, sublicense and distribute the Modifications created by such Contributor (or portions thereof), either on an unmodified basis, with other Modifications, as Covered Software and/or as part of a Larger Work; and
-
-        (b) under Patent Claims infringed by the making, using, or selling of Modifications made by that Contributor either alone and/or in combination with its Contributor Version (or portions of such combination), to make, use, sell, offer for sale, have made, and/or otherwise dispose of: (1) Modifications made by that Contributor (or portions thereof); and (2) the combination of Modifications made by that Contributor with its Contributor Version (or portions of such combination).
-
-        (c) The licenses granted in Sections 2.2(a) and 2.2(b) are effective on the date Contributor first distributes or otherwise makes the Modifications available to a third party.
-
-        (d) Notwithstanding Section 2.2(b) above, no patent license is granted: (1) for any code that Contributor has deleted from the Contributor Version; (2) for infringements caused by: (i) third party modifications of Contributor Version, or (ii) the combination of Modifications made by that Contributor with other software (except as part of the Contributor Version) or other devices; or (3) under Patent Claims infringed by Covered Software in the absence of Modifications made by that [...]
-
-3. Distribution Obligations.
-
-      3.1. Availability of Source Code.
-      Any Covered Software that You distribute or otherwise make available in Executable form must also be made available in Source Code form and that Source Code form must be distributed only under the terms of this License. You must include a copy of this License with every copy of the Source Code form of the Covered Software You distribute or otherwise make available. You must inform recipients of any such Covered Software in Executable form as to how they can obtain such Covered Soft [...]
-
-      3.2. Modifications.
-      The Modifications that You create or to which You contribute are governed by the terms of this License. You represent that You believe Your Modifications are Your original creation(s) and/or You have sufficient rights to grant the rights conveyed by this License.
-
-      3.3. Required Notices.
-      You must include a notice in each of Your Modifications that identifies You as the Contributor of the Modification. You may not remove or alter any copyright, patent or trademark notices contained within the Covered Software, or any notices of licensing or any descriptive text giving attribution to any Contributor or the Initial Developer.
-
-      3.4. Application of Additional Terms.
-      You may not offer or impose any terms on any Covered Software in Source Code form that alters or restricts the applicable version of this License or the recipients. rights hereunder. You may choose to offer, and to charge a fee for, warranty, support, indemnity or liability obligations to one or more recipients of Covered Software. However, you may do so only on Your own behalf, and not on behalf of the Initial Developer or any Contributor. You must make it absolutely clear that an [...]
-
-      3.5. Distribution of Executable Versions.
-      You may distribute the Executable form of the Covered Software under the terms of this License or under the terms of a license of Your choice, which may contain terms different from this License, provided that You are in compliance with the terms of this License and that the license for the Executable form does not attempt to limit or alter the recipient.s rights in the Source Code form from the rights set forth in this License. If You distribute the Covered Software in Executable  [...]
-
-      3.6. Larger Works.
-      You may create a Larger Work by combining Covered Software with other code not governed by the terms of this License and distribute the Larger Work as a single product. In such a case, You must make sure the requirements of this License are fulfilled for the Covered Software.
-
-4. Versions of the License.
-
-      4.1. New Versions.
-      Sun Microsystems, Inc. is the initial license steward and may publish revised and/or new versions of this License from time to time. Each version will be given a distinguishing version number. Except as provided in Section 4.3, no one other than the license steward has the right to modify this License.
-
-      4.2. Effect of New Versions.
-      You may always continue to use, distribute or otherwise make the Covered Software available under the terms of the version of the License under which You originally received the Covered Software. If the Initial Developer includes a notice in the Original Software prohibiting it from being distributed or otherwise made available under any subsequent version of the License, You must distribute and make the Covered Software available under the terms of the version of the License under [...]
-
-      4.3. Modified Versions.
-      When You are an Initial Developer and You want to create a new license for Your Original Software, You may create and use a modified version of this License if You: (a) rename the license and remove any references to the name of the license steward (except to note that the license differs from this License); and (b) otherwise make it clear that the license contains terms which differ from this License.
-
-5. DISCLAIMER OF WARRANTY.
-
-   COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN .AS IS. BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED SOFTWARE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED SOFTWARE IS WITH YOU. SHOULD ANY COVERED SOFTWARE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME  [...]
-
-6. TERMINATION.
-
-      6.1. This License and the rights granted hereunder will terminate automatically if You fail to comply with terms herein and fail to cure such breach within 30 days of becoming aware of the breach. Provisions which, by their nature, must remain in effect beyond the termination of this License shall survive.
-
-      6.2. If You assert a patent infringement claim (excluding declaratory judgment actions) against Initial Developer or a Contributor (the Initial Developer or Contributor against whom You assert such claim is referred to as .Participant.) alleging that the Participant Software (meaning the Contributor Version where the Participant is a Contributor or the Original Software where the Participant is the Initial Developer) directly or indirectly infringes any patent, then any and all rig [...]
-
-      6.3. In the event of termination under Sections 6.1 or 6.2 above, all end user licenses that have been validly granted by You or any distributor hereunder prior to termination (excluding licenses granted to You by any distributor) shall survive termination.
-
-7. LIMITATION OF LIABILITY.
-
-   UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED SOFTWARE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOST PROFITS, LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND AL [...]
-
-8. U.S. GOVERNMENT END USERS.
-
-   The Covered Software is a .commercial item,. as that term is defined in 48 C.F.R. 2.101 (Oct. 1995), consisting of .commercial computer software. (as that term is defined at 48 C.F.R. � 252.227-7014(a)(1)) and .commercial computer software documentation. as such terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all U.S. Government End Users acquire Covered Software with only those rights set forth [...]
-
-9. MISCELLANEOUS.
-
-   This License represents the complete agreement concerning subject matter hereof. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. This License shall be governed by the law of the jurisdiction specified in a notice contained within the Original Software (except to the extent applicable law, if any, provides otherwise), excluding such jurisdiction.s conflict-of-law provisions. Any litigati [...]
-
-10. RESPONSIBILITY FOR CLAIMS.
-
-   As between Initial Developer and the Contributors, each party is responsible for claims and damages arising, directly or indirectly, out of its utilization of rights under this License and You agree to work with Initial Developer and Contributors to distribute such responsibility on an equitable basis. Nothing herein is intended or shall be deemed to constitute any admission of liability.
-
-   NOTICE PURSUANT TO SECTION 9 OF THE COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL)
-
-   The code released under the CDDL shall be governed by the laws of the State of California (excluding conflict-of-law provisions). Any litigation relating to this License shall be subject to the jurisdiction of the Federal Courts of the Northern District of California and the state courts of the State of California, with venue lying in Santa Clara County, California.
diff --git a/src/main/appended-resources/META-INF/NOTICE b/src/main/appended-resources/META-INF/NOTICE
deleted file mode 100644
index ffabdaf..0000000
--- a/src/main/appended-resources/META-INF/NOTICE
+++ /dev/null
@@ -1,4 +0,0 @@
-
-This product includes software developed at
-Sun Microsystems
-licensed under CDDL 1.0


[sling-org-apache-sling-javax-activation] 30/34: SLING-9601 Provide a Sling javax.activation bundle without dependencies built in (#2)

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

davidb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-javax-activation.git

commit 67c868b1d772c7bc9166c9461593ef07c0722dc5
Author: David Bosschaert <da...@gmail.com>
AuthorDate: Sat Jul 25 14:21:57 2020 +0100

    SLING-9601 Provide a Sling javax.activation bundle without dependencies built in (#2)
    
    An additional bundle with the classifier -nodeps is now generated which
    does not contain the javax.activation classes/activation.jar file.
    Also updated parent pom to latest version.
---
 pom.xml | 39 +++++++++++++++++++++++++++++++--------
 1 file changed, 31 insertions(+), 8 deletions(-)

diff --git a/pom.xml b/pom.xml
index d7ba8f5..c12050a 100755
--- a/pom.xml
+++ b/pom.xml
@@ -23,7 +23,7 @@
     <parent>
         <groupId>org.apache.sling</groupId>
         <artifactId>sling</artifactId>
-        <version>26</version>
+        <version>34</version>
         <relativePath/>
     </parent>
         
@@ -51,13 +51,35 @@
                 <groupId>org.apache.felix</groupId>
                 <artifactId>maven-bundle-plugin</artifactId>
                 <extensions>true</extensions>
-                <configuration>
-                    <instructions>
-                        <Bundle-Activator>org.apache.sling.javax.activation.internal.Activator</Bundle-Activator>
-                        <Export-Package>javax.activation;version=${javax.activation.version}</Export-Package>
-                        <Embed-Dependency>*;scope=compile</Embed-Dependency>
-                    </instructions>
-                </configuration>
+                <executions>
+                    <execution>
+                        <id>bundle</id>
+                        <goals><goal>bundle</goal></goals>
+                        <configuration>
+                            <instructions>
+                                <Bundle-Activator>org.apache.sling.javax.activation.internal.Activator</Bundle-Activator>
+                                <Export-Package>javax.activation;version=${javax.activation.version}</Export-Package>
+                                <Embed-Dependency>*;scope=compile</Embed-Dependency>
+                            </instructions>
+                        </configuration>
+                    </execution>
+                    <execution>
+                        <id>nodepsbundle</id>
+                        <goals><goal>bundle</goal></goals>
+                        <configuration>
+                            <classifier>nodeps</classifier>
+                            <instructions>
+                                <Bundle-Name>
+                                    ${project.name} (No embedded dependencies)
+                                </Bundle-Name>
+                                <Bundle-SymbolicName>
+                                    ${project.artifactId}.nodeps
+                                </Bundle-SymbolicName>
+                                <Bundle-Activator>org.apache.sling.javax.activation.internal.Activator</Bundle-Activator>
+                            </instructions>
+                        </configuration>
+                    </execution>
+                </executions>
             </plugin>
         </plugins>
     </build>
@@ -78,6 +100,7 @@
         <dependency>
             <groupId>org.osgi</groupId>
             <artifactId>org.osgi.core</artifactId>
+            <version>4.2.0</version>
             <scope>provided</scope>
         </dependency>
         <dependency>


[sling-org-apache-sling-javax-activation] 11/34: Update to parent pom v19

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

davidb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-javax-activation.git

commit 0698d4ba533c6762afdfe7b58c13ab19ae93c17f
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Mon Mar 31 14:39:20 2014 +0000

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

diff --git a/pom.xml b/pom.xml
index 2b96c74..eb30793 100755
--- a/pom.xml
+++ b/pom.xml
@@ -23,7 +23,7 @@
     <parent>
         <groupId>org.apache.sling</groupId>
         <artifactId>sling</artifactId>
-        <version>18</version>
+        <version>19</version>
     </parent>
         
     <artifactId>org.apache.sling.javax.activation</artifactId>


[sling-org-apache-sling-javax-activation] 22/34: SLING-7213 - Add a default .gitignore file to every module

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

davidb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-javax-activation.git

commit 43dbdc476b82ccf44c2a77a2c1e22e831a119699
Author: Robert Munteanu <ro...@apache.org>
AuthorDate: Tue Oct 24 13:41:00 2017 +0200

    SLING-7213 - Add a default .gitignore file to every module
---
 .gitignore | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..5b783ed
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,17 @@
+/target
+.idea
+.classpath
+.metadata
+.project
+.settings
+.externalToolBuilders
+maven-eclipse.xml
+*.swp
+*.iml
+*.ipr
+*.iws
+*.bak
+.vlt
+.DS_Store
+jcr.log
+atlassian-ide-plugin.xml


[sling-org-apache-sling-javax-activation] 10/34: Update to parent pom 18

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

davidb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-javax-activation.git

commit e361feb8b8cf4570b98b915678b646281ebab874
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Fri Sep 6 12:15:57 2013 +0000

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

diff --git a/pom.xml b/pom.xml
index 8616ebc..2b96c74 100755
--- a/pom.xml
+++ b/pom.xml
@@ -23,7 +23,7 @@
     <parent>
         <groupId>org.apache.sling</groupId>
         <artifactId>sling</artifactId>
-        <version>17</version>
+        <version>18</version>
     </parent>
         
     <artifactId>org.apache.sling.javax.activation</artifactId>


[sling-org-apache-sling-javax-activation] 16/34: Update the main reactor to parent 25

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

davidb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-javax-activation.git

commit 838db3ff7ad43868e761192143efe49ecca8ddc2
Author: Robert Munteanu <ro...@apache.org>
AuthorDate: Mon Oct 5 10:03:45 2015 +0000

    Update the main reactor to parent 25
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1706780 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index 118a172..83929dc 100755
--- a/pom.xml
+++ b/pom.xml
@@ -23,7 +23,7 @@
     <parent>
         <groupId>org.apache.sling</groupId>
         <artifactId>sling</artifactId>
-        <version>24</version>
+        <version>25</version>
         <relativePath/>
     </parent>