From 4b9505349af1351fab7440e3c3e37428be272241 Mon Sep 17 00:00:00 2001 From: Alex Macdonald Date: Oct 09 2018 14:18:36 +0000 Subject: [PATCH 1/3] rename patch files to indicate their order of application --- diff --git a/jaf/0_add_manifest.patch b/jaf/0_add_manifest.patch new file mode 100644 index 0000000..fab4863 --- /dev/null +++ b/jaf/0_add_manifest.patch @@ -0,0 +1,73 @@ +diff -Nur jaf-1.2.0-orig/activation/META-INF/MANIFEST.MF jaf-1.2.0/activation/META-INF/MANIFEST.MF +--- jaf-1.2.0-orig/activation/META-INF/MANIFEST.MF 1969-12-31 19:00:00.000000000 -0500 ++++ jaf-1.2.0/activation/META-INF/MANIFEST.MF 2018-09-21 13:08:38.421266097 -0400 +@@ -0,0 +1,33 @@ ++Manifest-Version: 1.0 ++Bundle-License: http://www.eclipse.org/org/documents/edl-v10.php ++Bundle-SymbolicName: com.sun.activation.javax.activation ++Archiver-Version: Plexus Archiver ++Built-By: sasiddiq ++Bnd-LastModified: 1537549343279 ++Implementation-Vendor-Id: com.sun ++Specification-Title: JavaBeans(TM) Activation Framework Specification ++Bundle-DocURL: https://www.eclipse.org ++Import-Package: com.sun.activation.registries;version="1.2",com.sun.ac ++ tivation.viewers;version="1.2",javax.activation;version="1.2" ++DynamicImport-Package: * ++Export-Package: javax.activation;uses:="com.sun.activation.registries" ++ ;version="1.2",com.sun.activation.registries;version="1.2.1",com.sun. ++ activation.viewers;uses:="javax.activation";version="1.2.1" ++Bundle-Name: JavaBeans Activation Framework ++Extension-Name: javax.activation ++Implementation-Title: javax.activation ++Bundle-Description: JavaBeans Activation Framework ++Automatic-Module-Name: java.activation ++Implementation-Version: 1.2.1-SNAPSHOT ++Specification-Vendor: Eclipse Foundation ++Bundle-ManifestVersion: 2 ++Specification-Vendor: Eclipse Foundation ++Bundle-ManifestVersion: 2 ++Bundle-Vendor: Eclipse Foundation ++Tool: Bnd-0.0.357 ++Implementation-Vendor: Eclipse Foundation ++Bundle-Version: 1.2.1.SNAPSHOT ++Created-By: 1.8.0_181 (Oracle Corporation) ++Build-Jdk: 1.8.0_181 ++Specification-Version: 1.2 ++ +diff -Nur jaf-1.2.0-orig/activationapi/META-INF/MANIFEST.MF jaf-1.2.0/activationapi/META-INF/MANIFEST.MF +--- jaf-1.2.0-orig/activationapi/META-INF/MANIFEST.MF 1969-12-31 19:00:00.000000000 -0500 ++++ jaf-1.2.0/activationapi/META-INF/MANIFEST.MF 2018-09-21 13:08:50.165206110 -0400 +@@ -0,0 +1,32 @@ ++Manifest-Version: 1.0 ++Bundle-License: http://www.eclipse.org/org/documents/edl-v10.php ++Bundle-SymbolicName: javax.activation-api ++Archiver-Version: Plexus Archiver ++Built-By: sasiddiq ++Bnd-LastModified: 1537548563135 ++Implementation-Vendor-Id: com.sun ++Specification-Title: javax.activation.javax.activation-api ++Bundle-DocURL: https://www.eclipse.org ++Import-Package: com.sun.activation.registries,javax.activation;version ++ ="1.2" ++DynamicImport-Package: * ++Export-Package: javax.activation;uses:="com.sun.activation.registries" ++ ;version="1.2" ++Bundle-Name: JavaBeans Activation Framework API jar ++Extension-Name: javax.activation ++Implementation-Title: javax.activation.javax.activation-api ++Bundle-Description: JavaBeans Activation Framework API jar ++Automatic-Module-Name: java.activation ++Implementation-Version: 1.2.1-SNAPSHOT ++Specification-Vendor: Eclipse Foundation ++Bundle-ManifestVersion: 2 ++Bundle-Vendor: Eclipse Foundation ++Bundle-ManifestVersion: 2 ++Bundle-Vendor: Eclipse Foundation ++Tool: Bnd-0.0.357 ++Implementation-Vendor: Eclipse Foundation ++Bundle-Version: 1.2.1.SNAPSHOT ++Created-By: 1.8.0_181 (Oracle Corporation) ++Build-Jdk: 1.8.0_181 ++Specification-Version: 1.2 ++ diff --git a/jaf/add-manifest.patch b/jaf/add-manifest.patch deleted file mode 100644 index fab4863..0000000 --- a/jaf/add-manifest.patch +++ /dev/null @@ -1,73 +0,0 @@ -diff -Nur jaf-1.2.0-orig/activation/META-INF/MANIFEST.MF jaf-1.2.0/activation/META-INF/MANIFEST.MF ---- jaf-1.2.0-orig/activation/META-INF/MANIFEST.MF 1969-12-31 19:00:00.000000000 -0500 -+++ jaf-1.2.0/activation/META-INF/MANIFEST.MF 2018-09-21 13:08:38.421266097 -0400 -@@ -0,0 +1,33 @@ -+Manifest-Version: 1.0 -+Bundle-License: http://www.eclipse.org/org/documents/edl-v10.php -+Bundle-SymbolicName: com.sun.activation.javax.activation -+Archiver-Version: Plexus Archiver -+Built-By: sasiddiq -+Bnd-LastModified: 1537549343279 -+Implementation-Vendor-Id: com.sun -+Specification-Title: JavaBeans(TM) Activation Framework Specification -+Bundle-DocURL: https://www.eclipse.org -+Import-Package: com.sun.activation.registries;version="1.2",com.sun.ac -+ tivation.viewers;version="1.2",javax.activation;version="1.2" -+DynamicImport-Package: * -+Export-Package: javax.activation;uses:="com.sun.activation.registries" -+ ;version="1.2",com.sun.activation.registries;version="1.2.1",com.sun. -+ activation.viewers;uses:="javax.activation";version="1.2.1" -+Bundle-Name: JavaBeans Activation Framework -+Extension-Name: javax.activation -+Implementation-Title: javax.activation -+Bundle-Description: JavaBeans Activation Framework -+Automatic-Module-Name: java.activation -+Implementation-Version: 1.2.1-SNAPSHOT -+Specification-Vendor: Eclipse Foundation -+Bundle-ManifestVersion: 2 -+Specification-Vendor: Eclipse Foundation -+Bundle-ManifestVersion: 2 -+Bundle-Vendor: Eclipse Foundation -+Tool: Bnd-0.0.357 -+Implementation-Vendor: Eclipse Foundation -+Bundle-Version: 1.2.1.SNAPSHOT -+Created-By: 1.8.0_181 (Oracle Corporation) -+Build-Jdk: 1.8.0_181 -+Specification-Version: 1.2 -+ -diff -Nur jaf-1.2.0-orig/activationapi/META-INF/MANIFEST.MF jaf-1.2.0/activationapi/META-INF/MANIFEST.MF ---- jaf-1.2.0-orig/activationapi/META-INF/MANIFEST.MF 1969-12-31 19:00:00.000000000 -0500 -+++ jaf-1.2.0/activationapi/META-INF/MANIFEST.MF 2018-09-21 13:08:50.165206110 -0400 -@@ -0,0 +1,32 @@ -+Manifest-Version: 1.0 -+Bundle-License: http://www.eclipse.org/org/documents/edl-v10.php -+Bundle-SymbolicName: javax.activation-api -+Archiver-Version: Plexus Archiver -+Built-By: sasiddiq -+Bnd-LastModified: 1537548563135 -+Implementation-Vendor-Id: com.sun -+Specification-Title: javax.activation.javax.activation-api -+Bundle-DocURL: https://www.eclipse.org -+Import-Package: com.sun.activation.registries,javax.activation;version -+ ="1.2" -+DynamicImport-Package: * -+Export-Package: javax.activation;uses:="com.sun.activation.registries" -+ ;version="1.2" -+Bundle-Name: JavaBeans Activation Framework API jar -+Extension-Name: javax.activation -+Implementation-Title: javax.activation.javax.activation-api -+Bundle-Description: JavaBeans Activation Framework API jar -+Automatic-Module-Name: java.activation -+Implementation-Version: 1.2.1-SNAPSHOT -+Specification-Vendor: Eclipse Foundation -+Bundle-ManifestVersion: 2 -+Bundle-Vendor: Eclipse Foundation -+Bundle-ManifestVersion: 2 -+Bundle-Vendor: Eclipse Foundation -+Tool: Bnd-0.0.357 -+Implementation-Vendor: Eclipse Foundation -+Bundle-Version: 1.2.1.SNAPSHOT -+Created-By: 1.8.0_181 (Oracle Corporation) -+Build-Jdk: 1.8.0_181 -+Specification-Version: 1.2 -+ diff --git a/jaf/jaf.spec b/jaf/jaf.spec index cd31053..8053073 100644 --- a/jaf/jaf.spec +++ b/jaf/jaf.spec @@ -14,11 +14,21 @@ URL: https://github.com/eclipse-ee4j/jaf # tar czf jaf-1.2.1.tar.gz jaf-1.2.1/ Source0: jaf-1.2.1.tar.gz -Patch0: add-manifest.patch +Patch0: 0_add_manifest.patch BuildArch: noarch -BuildRequires: maven-local java-openjdk javapackages-local maven-enforcer-plugin glassfish-hk2-maven-plugins maven-source-plugin maven-plugin-build-helper maven-plugin-bundle maven-dependency-plugin ee4j +BuildRequires: ee4j +BuildRequires: glassfish-hk2-maven-plugins +BuildRequires: java-openjdk +BuildRequires: javapackages-local +BuildRequires: junit +BuildRequires: maven-enforcer-plugin +BuildRequires: maven-local +BuildRequires: maven-plugin-build-helper +BuildRequires: maven-plugin-bundle maven-dependency-plugin +BuildRequires: maven-source-plugin + Requires: java-openjdk diff --git a/javamail/0_ignore_broken_tests.patch b/javamail/0_ignore_broken_tests.patch new file mode 100644 index 0000000..31e5548 --- /dev/null +++ b/javamail/0_ignore_broken_tests.patch @@ -0,0 +1,27 @@ +diff -Nur javamail-1.6.1-orig/mail/src/test/java/com/sun/mail/util/WriteTimeoutSocketTest.java javamail-1.6.1/mail/src/test/java/com/sun/mail/util/WriteTimeoutSocketTest.java +--- javamail-1.6.1-orig/mail/src/test/java/com/sun/mail/util/WriteTimeoutSocketTest.java 2018-08-09 11:02:16.588430253 -0400 ++++ javamail-1.6.1/mail/src/test/java/com/sun/mail/util/WriteTimeoutSocketTest.java 2018-08-10 12:58:32.251319814 -0400 +@@ -62,6 +62,7 @@ + import com.sun.mail.test.TestSSLSocketFactory; + + import org.junit.Test; ++import org.junit.Ignore; + import org.junit.Rule; + import org.junit.rules.Timeout; + import static org.junit.Assert.fail; +@@ -110,6 +111,7 @@ + /** + * Test write timeouts with SSL sockets. + */ ++ @Ignore + @Test + public void testSSL() { + final Properties properties = new Properties(); +@@ -126,6 +128,7 @@ + /** + * Test write timeouts with a custom SSL socket factory. + */ ++ @Ignore + @Test + public void testSSLSocketFactory() throws Exception { + final Properties properties = new Properties(); diff --git a/javamail/1_dont_publish.patch b/javamail/1_dont_publish.patch new file mode 100644 index 0000000..8246476 --- /dev/null +++ b/javamail/1_dont_publish.patch @@ -0,0 +1,11 @@ +diff -Nur javamail-1.6.1-orig/pom.xml javamail-1.6.1/pom.xml +--- javamail-1.6.1-orig/pom.xml 2018-08-09 11:02:16.589430248 -0400 ++++ javamail-1.6.1/pom.xml 2018-08-09 14:35:48.661641620 -0400 +@@ -182,7 +182,6 @@ + logging + outlook + javadoc +- publish + + + true diff --git a/javamail/2_module_info.patch b/javamail/2_module_info.patch new file mode 100644 index 0000000..89ff0e2 --- /dev/null +++ b/javamail/2_module_info.patch @@ -0,0 +1,909 @@ +diff -Nur javamail-1.6.1-orig/android/activation/src/main/java/module-info.java javamail-1.6.1/android/activation/src/main/java/module-info.java +--- javamail-1.6.1-orig/android/activation/src/main/java/module-info.java 1969-12-31 19:00:00.000000000 -0500 ++++ javamail-1.6.1/android/activation/src/main/java/module-info.java 2018-08-14 14:39:21.676478718 -0400 +@@ -0,0 +1,49 @@ ++/* ++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. ++ * ++ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. ++ * ++ * The contents of this file are subject to the terms of either the GNU ++ * General Public License Version 2 only ("GPL") or the Common Development ++ * and Distribution License("CDDL") (collectively, the "License"). You ++ * may not use this file except in compliance with the License. You can ++ * obtain a copy of the License at ++ * https://oss.oracle.com/licenses/CDDL+GPL-1.1 ++ * or LICENSE.txt. See the License for the specific ++ * language governing permissions and limitations under the License. ++ * ++ * When distributing the software, include this License Header Notice in each ++ * file and include the License file at LICENSE.txt. ++ * ++ * GPL Classpath Exception: ++ * Oracle designates this particular file as subject to the "Classpath" ++ * exception as provided by Oracle in the GPL Version 2 section of the License ++ * file that accompanied this code. ++ * ++ * Modifications: ++ * If applicable, add the following below the License Header, with the fields ++ * enclosed by brackets [] replaced by your own identifying information: ++ * "Portions Copyright [year] [name of copyright owner]" ++ * ++ * Contributor(s): ++ * If you wish your version of this file to be governed by only the CDDL or ++ * only the GPL Version 2, indicate your decision by adding "[Contributor] ++ * elects to include this software in this distribution under the [CDDL or GPL ++ * Version 2] license." If you don't indicate a single choice of license, a ++ * recipient has the option to distribute your version of this file under ++ * either the CDDL, the GPL Version 2 or to extend the choice of license to ++ * its licensees as provided above. However, if you add GPL Version 2 code ++ * and therefore, elected the GPL Version 2 license, then the option applies ++ * only if the new code is made subject to such option by the copyright ++ * holder. ++ */ ++ ++module com.sun.mail.android.activation { ++ ++ exports com.sun.mail.android.activation; ++ exports com.sun.activation.registries; ++ exports javax.activation; ++ ++ requires java.desktop; ++ requires java.logging; ++} +diff -Nur javamail-1.6.1-orig/android/mail/src/main/java/module-info.java javamail-1.6.1/android/mail/src/main/java/module-info.java +--- javamail-1.6.1-orig/android/mail/src/main/java/module-info.java 1969-12-31 19:00:00.000000000 -0500 ++++ javamail-1.6.1/android/mail/src/main/java/module-info.java 2018-08-14 14:38:20.979754833 -0400 +@@ -0,0 +1,47 @@ ++/* ++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. ++ * ++ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. ++ * ++ * The contents of this file are subject to the terms of either the GNU ++ * General Public License Version 2 only ("GPL") or the Common Development ++ * and Distribution License("CDDL") (collectively, the "License"). You ++ * may not use this file except in compliance with the License. You can ++ * obtain a copy of the License at ++ * https://oss.oracle.com/licenses/CDDL+GPL-1.1 ++ * or LICENSE.txt. See the License for the specific ++ * language governing permissions and limitations under the License. ++ * ++ * When distributing the software, include this License Header Notice in each ++ * file and include the License file at LICENSE.txt. ++ * ++ * GPL Classpath Exception: ++ * Oracle designates this particular file as subject to the "Classpath" ++ * exception as provided by Oracle in the GPL Version 2 section of the License ++ * file that accompanied this code. ++ * ++ * Modifications: ++ * If applicable, add the following below the License Header, with the fields ++ * enclosed by brackets [] replaced by your own identifying information: ++ * "Portions Copyright [year] [name of copyright owner]" ++ * ++ * Contributor(s): ++ * If you wish your version of this file to be governed by only the CDDL or ++ * only the GPL Version 2, indicate your decision by adding "[Contributor] ++ * elects to include this software in this distribution under the [CDDL or GPL ++ * Version 2] license." If you don't indicate a single choice of license, a ++ * recipient has the option to distribute your version of this file under ++ * either the CDDL, the GPL Version 2 or to extend the choice of license to ++ * its licensees as provided above. However, if you add GPL Version 2 code ++ * and therefore, elected the GPL Version 2 license, then the option applies ++ * only if the new code is made subject to such option by the copyright ++ * holder. ++ */ ++ ++module com.sun.mail.android.mail { ++ ++ exports com.sun.mail.android.mail; ++ exports com.sun.mail.handlers; ++ ++ requires android.activation; ++} +diff -Nur javamail-1.6.1-orig/android/src/main/java/module-info.java javamail-1.6.1/android/src/main/java/module-info.java +--- javamail-1.6.1-orig/android/src/main/java/module-info.java 1969-12-31 19:00:00.000000000 -0500 ++++ javamail-1.6.1/android/src/main/java/module-info.java 2018-08-14 14:41:14.360966121 -0400 +@@ -0,0 +1,46 @@ ++/* ++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. ++ * ++ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. ++ * ++ * The contents of this file are subject to the terms of either the GNU ++ * General Public License Version 2 only ("GPL") or the Common Development ++ * and Distribution License("CDDL") (collectively, the "License"). You ++ * may not use this file except in compliance with the License. You can ++ * obtain a copy of the License at ++ * https://oss.oracle.com/licenses/CDDL+GPL-1.1 ++ * or LICENSE.txt. See the License for the specific ++ * language governing permissions and limitations under the License. ++ * ++ * When distributing the software, include this License Header Notice in each ++ * file and include the License file at LICENSE.txt. ++ * ++ * GPL Classpath Exception: ++ * Oracle designates this particular file as subject to the "Classpath" ++ * exception as provided by Oracle in the GPL Version 2 section of the License ++ * file that accompanied this code. ++ * ++ * Modifications: ++ * If applicable, add the following below the License Header, with the fields ++ * enclosed by brackets [] replaced by your own identifying information: ++ * "Portions Copyright [year] [name of copyright owner]" ++ * ++ * Contributor(s): ++ * If you wish your version of this file to be governed by only the CDDL or ++ * only the GPL Version 2, indicate your decision by adding "[Contributor] ++ * elects to include this software in this distribution under the [CDDL or GPL ++ * Version 2] license." If you don't indicate a single choice of license, a ++ * recipient has the option to distribute your version of this file under ++ * either the CDDL, the GPL Version 2 or to extend the choice of license to ++ * its licensees as provided above. However, if you add GPL Version 2 code ++ * and therefore, elected the GPL Version 2 license, then the option applies ++ * only if the new code is made subject to such option by the copyright ++ * holder. ++ */ ++ ++module com.sun.mail.android { ++ ++ exports com.sun.mail.android; ++ exports com.sun.mail.android.activation; ++ exports com.sun.mail.android.mail; ++} +diff -Nur javamail-1.6.1-orig/client/src/main/java/module-info.java javamail-1.6.1/client/src/main/java/module-info.java +--- javamail-1.6.1-orig/client/src/main/java/module-info.java 1969-12-31 19:00:00.000000000 -0500 ++++ javamail-1.6.1/client/src/main/java/module-info.java 2018-08-14 14:41:42.851836521 -0400 +@@ -0,0 +1,44 @@ ++/* ++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. ++ * ++ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. ++ * ++ * The contents of this file are subject to the terms of either the GNU ++ * General Public License Version 2 only ("GPL") or the Common Development ++ * and Distribution License("CDDL") (collectively, the "License"). You ++ * may not use this file except in compliance with the License. You can ++ * obtain a copy of the License at ++ * https://oss.oracle.com/licenses/CDDL+GPL-1.1 ++ * or LICENSE.txt. See the License for the specific ++ * language governing permissions and limitations under the License. ++ * ++ * When distributing the software, include this License Header Notice in each ++ * file and include the License file at LICENSE.txt. ++ * ++ * GPL Classpath Exception: ++ * Oracle designates this particular file as subject to the "Classpath" ++ * exception as provided by Oracle in the GPL Version 2 section of the License ++ * file that accompanied this code. ++ * ++ * Modifications: ++ * If applicable, add the following below the License Header, with the fields ++ * enclosed by brackets [] replaced by your own identifying information: ++ * "Portions Copyright [year] [name of copyright owner]" ++ * ++ * Contributor(s): ++ * If you wish your version of this file to be governed by only the CDDL or ++ * only the GPL Version 2, indicate your decision by adding "[Contributor] ++ * elects to include this software in this distribution under the [CDDL or GPL ++ * Version 2] license." If you don't indicate a single choice of license, a ++ * recipient has the option to distribute your version of this file under ++ * either the CDDL, the GPL Version 2 or to extend the choice of license to ++ * its licensees as provided above. However, if you add GPL Version 2 code ++ * and therefore, elected the GPL Version 2 license, then the option applies ++ * only if the new code is made subject to such option by the copyright ++ * holder. ++ */ ++ ++module com.sun.mail.client { ++ ++ exports com.sun.mail.client; ++} +diff -Nur javamail-1.6.1-orig/demo/src/main/java/module-info.java javamail-1.6.1/demo/src/main/java/module-info.java +--- javamail-1.6.1-orig/demo/src/main/java/module-info.java 1969-12-31 19:00:00.000000000 -0500 ++++ javamail-1.6.1/demo/src/main/java/module-info.java 2018-08-14 14:45:28.294773335 -0400 +@@ -0,0 +1,47 @@ ++/* ++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. ++ * ++ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. ++ * ++ * The contents of this file are subject to the terms of either the GNU ++ * General Public License Version 2 only ("GPL") or the Common Development ++ * and Distribution License("CDDL") (collectively, the "License"). You ++ * may not use this file except in compliance with the License. You can ++ * obtain a copy of the License at ++ * https://oss.oracle.com/licenses/CDDL+GPL-1.1 ++ * or LICENSE.txt. See the License for the specific ++ * language governing permissions and limitations under the License. ++ * ++ * When distributing the software, include this License Header Notice in each ++ * file and include the License file at LICENSE.txt. ++ * ++ * GPL Classpath Exception: ++ * Oracle designates this particular file as subject to the "Classpath" ++ * exception as provided by Oracle in the GPL Version 2 section of the License ++ * file that accompanied this code. ++ * ++ * Modifications: ++ * If applicable, add the following below the License Header, with the fields ++ * enclosed by brackets [] replaced by your own identifying information: ++ * "Portions Copyright [year] [name of copyright owner]" ++ * ++ * Contributor(s): ++ * If you wish your version of this file to be governed by only the CDDL or ++ * only the GPL Version 2, indicate your decision by adding "[Contributor] ++ * elects to include this software in this distribution under the [CDDL or GPL ++ * Version 2] license." If you don't indicate a single choice of license, a ++ * recipient has the option to distribute your version of this file under ++ * either the CDDL, the GPL Version 2 or to extend the choice of license to ++ * its licensees as provided above. However, if you add GPL Version 2 code ++ * and therefore, elected the GPL Version 2 license, then the option applies ++ * only if the new code is made subject to such option by the copyright ++ * holder. ++ */ ++ ++module com.sun.mail.demo { ++ ++ exports com.sun.mail.demo; ++ exports internal; ++ ++ requires javax.mail; ++} +diff -Nur javamail-1.6.1-orig/dsn/src/main/java/module-info.java javamail-1.6.1/dsn/src/main/java/module-info.java +--- javamail-1.6.1-orig/dsn/src/main/java/module-info.java 1969-12-31 19:00:00.000000000 -0500 ++++ javamail-1.6.1/dsn/src/main/java/module-info.java 2018-08-14 14:46:03.169608217 -0400 +@@ -0,0 +1,49 @@ ++/* ++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. ++ * ++ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. ++ * ++ * The contents of this file are subject to the terms of either the GNU ++ * General Public License Version 2 only ("GPL") or the Common Development ++ * and Distribution License("CDDL") (collectively, the "License"). You ++ * may not use this file except in compliance with the License. You can ++ * obtain a copy of the License at ++ * https://oss.oracle.com/licenses/CDDL+GPL-1.1 ++ * or LICENSE.txt. See the License for the specific ++ * language governing permissions and limitations under the License. ++ * ++ * When distributing the software, include this License Header Notice in each ++ * file and include the License file at LICENSE.txt. ++ * ++ * GPL Classpath Exception: ++ * Oracle designates this particular file as subject to the "Classpath" ++ * exception as provided by Oracle in the GPL Version 2 section of the License ++ * file that accompanied this code. ++ * ++ * Modifications: ++ * If applicable, add the following below the License Header, with the fields ++ * enclosed by brackets [] replaced by your own identifying information: ++ * "Portions Copyright [year] [name of copyright owner]" ++ * ++ * Contributor(s): ++ * If you wish your version of this file to be governed by only the CDDL or ++ * only the GPL Version 2, indicate your decision by adding "[Contributor] ++ * elects to include this software in this distribution under the [CDDL or GPL ++ * Version 2] license." If you don't indicate a single choice of license, a ++ * recipient has the option to distribute your version of this file under ++ * either the CDDL, the GPL Version 2 or to extend the choice of license to ++ * its licensees as provided above. However, if you add GPL Version 2 code ++ * and therefore, elected the GPL Version 2 license, then the option applies ++ * only if the new code is made subject to such option by the copyright ++ * holder. ++ */ ++ ++module com.sun.mail.dsn { ++ ++ exports com.sun.mail.dsn; ++ ++ requires com.sun.mail.android.activation; ++ requires java.datatransfer; ++ requires java.logging; ++ requires javax.mail; ++} +diff -Nur javamail-1.6.1-orig/gimap/src/main/java/module-info.java javamail-1.6.1/gimap/src/main/java/module-info.java +--- javamail-1.6.1-orig/gimap/src/main/java/module-info.java 1969-12-31 19:00:00.000000000 -0500 ++++ javamail-1.6.1/gimap/src/main/java/module-info.java 2018-08-14 14:46:28.944486185 -0400 +@@ -0,0 +1,48 @@ ++/* ++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. ++ * ++ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. ++ * ++ * The contents of this file are subject to the terms of either the GNU ++ * General Public License Version 2 only ("GPL") or the Common Development ++ * and Distribution License("CDDL") (collectively, the "License"). You ++ * may not use this file except in compliance with the License. You can ++ * obtain a copy of the License at ++ * https://oss.oracle.com/licenses/CDDL+GPL-1.1 ++ * or LICENSE.txt. See the License for the specific ++ * language governing permissions and limitations under the License. ++ * ++ * When distributing the software, include this License Header Notice in each ++ * file and include the License file at LICENSE.txt. ++ * ++ * GPL Classpath Exception: ++ * Oracle designates this particular file as subject to the "Classpath" ++ * exception as provided by Oracle in the GPL Version 2 section of the License ++ * file that accompanied this code. ++ * ++ * Modifications: ++ * If applicable, add the following below the License Header, with the fields ++ * enclosed by brackets [] replaced by your own identifying information: ++ * "Portions Copyright [year] [name of copyright owner]" ++ * ++ * Contributor(s): ++ * If you wish your version of this file to be governed by only the CDDL or ++ * only the GPL Version 2, indicate your decision by adding "[Contributor] ++ * elects to include this software in this distribution under the [CDDL or GPL ++ * Version 2] license." If you don't indicate a single choice of license, a ++ * recipient has the option to distribute your version of this file under ++ * either the CDDL, the GPL Version 2 or to extend the choice of license to ++ * its licensees as provided above. However, if you add GPL Version 2 code ++ * and therefore, elected the GPL Version 2 license, then the option applies ++ * only if the new code is made subject to such option by the copyright ++ * holder. ++ */ ++ ++module com.sun.mail.gimap { ++ ++ exports com.sun.mail.gimap; ++ exports com.sun.mail.gimap.protocol; ++ ++ requires activation; ++ requires javax.mail; ++} +diff -Nur javamail-1.6.1-orig/javadoc/src/main/java/module-info.java javamail-1.6.1/javadoc/src/main/java/module-info.java +--- javamail-1.6.1-orig/javadoc/src/main/java/module-info.java 1969-12-31 19:00:00.000000000 -0500 ++++ javamail-1.6.1/javadoc/src/main/java/module-info.java 2018-08-14 14:52:06.017890378 -0400 +@@ -0,0 +1,44 @@ ++/* ++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. ++ * ++ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. ++ * ++ * The contents of this file are subject to the terms of either the GNU ++ * General Public License Version 2 only ("GPL") or the Common Development ++ * and Distribution License("CDDL") (collectively, the "License"). You ++ * may not use this file except in compliance with the License. You can ++ * obtain a copy of the License at ++ * https://oss.oracle.com/licenses/CDDL+GPL-1.1 ++ * or LICENSE.txt. See the License for the specific ++ * language governing permissions and limitations under the License. ++ * ++ * When distributing the software, include this License Header Notice in each ++ * file and include the License file at LICENSE.txt. ++ * ++ * GPL Classpath Exception: ++ * Oracle designates this particular file as subject to the "Classpath" ++ * exception as provided by Oracle in the GPL Version 2 section of the License ++ * file that accompanied this code. ++ * ++ * Modifications: ++ * If applicable, add the following below the License Header, with the fields ++ * enclosed by brackets [] replaced by your own identifying information: ++ * "Portions Copyright [year] [name of copyright owner]" ++ * ++ * Contributor(s): ++ * If you wish your version of this file to be governed by only the CDDL or ++ * only the GPL Version 2, indicate your decision by adding "[Contributor] ++ * elects to include this software in this distribution under the [CDDL or GPL ++ * Version 2] license." If you don't indicate a single choice of license, a ++ * recipient has the option to distribute your version of this file under ++ * either the CDDL, the GPL Version 2 or to extend the choice of license to ++ * its licensees as provided above. However, if you add GPL Version 2 code ++ * and therefore, elected the GPL Version 2 license, then the option applies ++ * only if the new code is made subject to such option by the copyright ++ * holder. ++ */ ++ ++module com.sun.mail.javadoc { ++ ++ exports com.sun.mail.javadoc; ++} +diff -Nur javamail-1.6.1-orig/logging/src/main/java/module-info.java javamail-1.6.1/logging/src/main/java/module-info.java +--- javamail-1.6.1-orig/logging/src/main/java/module-info.java 1969-12-31 19:00:00.000000000 -0500 ++++ javamail-1.6.1/logging/src/main/java/module-info.java 2018-08-14 14:53:51.903389062 -0400 +@@ -0,0 +1,44 @@ ++/* ++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. ++ * ++ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. ++ * ++ * The contents of this file are subject to the terms of either the GNU ++ * General Public License Version 2 only ("GPL") or the Common Development ++ * and Distribution License("CDDL") (collectively, the "License"). You ++ * may not use this file except in compliance with the License. You can ++ * obtain a copy of the License at ++ * https://oss.oracle.com/licenses/CDDL+GPL-1.1 ++ * or LICENSE.txt. See the License for the specific ++ * language governing permissions and limitations under the License. ++ * ++ * When distributing the software, include this License Header Notice in each ++ * file and include the License file at LICENSE.txt. ++ * ++ * GPL Classpath Exception: ++ * Oracle designates this particular file as subject to the "Classpath" ++ * exception as provided by Oracle in the GPL Version 2 section of the License ++ * file that accompanied this code. ++ * ++ * Modifications: ++ * If applicable, add the following below the License Header, with the fields ++ * enclosed by brackets [] replaced by your own identifying information: ++ * "Portions Copyright [year] [name of copyright owner]" ++ * ++ * Contributor(s): ++ * If you wish your version of this file to be governed by only the CDDL or ++ * only the GPL Version 2, indicate your decision by adding "[Contributor] ++ * elects to include this software in this distribution under the [CDDL or GPL ++ * Version 2] license." If you don't indicate a single choice of license, a ++ * recipient has the option to distribute your version of this file under ++ * either the CDDL, the GPL Version 2 or to extend the choice of license to ++ * its licensees as provided above. However, if you add GPL Version 2 code ++ * and therefore, elected the GPL Version 2 license, then the option applies ++ * only if the new code is made subject to such option by the copyright ++ * holder. ++ */ ++ ++module com.sun.mail.logging { ++ ++ exports com.sun.mail.logging; ++} +diff -Nur javamail-1.6.1-orig/mail/src/main/java/module-info.java javamail-1.6.1/mail/src/main/java/module-info.java +--- javamail-1.6.1-orig/mail/src/main/java/module-info.java 1969-12-31 19:00:00.000000000 -0500 ++++ javamail-1.6.1/mail/src/main/java/module-info.java 2018-08-14 14:52:56.017653657 -0400 +@@ -0,0 +1,68 @@ ++/* ++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. ++ * ++ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. ++ * ++ * The contents of this file are subject to the terms of either the GNU ++ * General Public License Version 2 only ("GPL") or the Common Development ++ * and Distribution License("CDDL") (collectively, the "License"). You ++ * may not use this file except in compliance with the License. You can ++ * obtain a copy of the License at ++ * https://oss.oracle.com/licenses/CDDL+GPL-1.1 ++ * or LICENSE.txt. See the License for the specific ++ * language governing permissions and limitations under the License. ++ * ++ * When distributing the software, include this License Header Notice in each ++ * file and include the License file at LICENSE.txt. ++ * ++ * GPL Classpath Exception: ++ * Oracle designates this particular file as subject to the "Classpath" ++ * exception as provided by Oracle in the GPL Version 2 section of the License ++ * file that accompanied this code. ++ * ++ * Modifications: ++ * If applicable, add the following below the License Header, with the fields ++ * enclosed by brackets [] replaced by your own identifying information: ++ * "Portions Copyright [year] [name of copyright owner]" ++ * ++ * Contributor(s): ++ * If you wish your version of this file to be governed by only the CDDL or ++ * only the GPL Version 2, indicate your decision by adding "[Contributor] ++ * elects to include this software in this distribution under the [CDDL or GPL ++ * Version 2] license." If you don't indicate a single choice of license, a ++ * recipient has the option to distribute your version of this file under ++ * either the CDDL, the GPL Version 2 or to extend the choice of license to ++ * its licensees as provided above. However, if you add GPL Version 2 code ++ * and therefore, elected the GPL Version 2 license, then the option applies ++ * only if the new code is made subject to such option by the copyright ++ * holder. ++ */ ++ ++module javax.mail { ++ ++ exports com.sun.mail.util.logging; ++ exports com.sun.mail.util; ++ exports javax.mail.internet; ++ exports com.sun.mail.imap.protocol; ++ exports javax.mail.event; ++ exports javax.mail.util; ++ exports com.sun.mail.auth; ++ exports com.sun.mail.handlers; ++ exports com.sun.mail.pop3; ++ exports javax.mail; ++ exports oldtest.java.javax.mail.internet.socketfactory; ++ exports com.sun.mail.iap; ++ exports com.sun.mail.imap; ++ exports com.sun.mail.smtp; ++ exports javax.mail.search; ++ exports oldtest.java.javax.mail.internet; ++ exports com.sun.mail.test; ++ ++ requires activation; ++ requires java.datatransfer; ++ requires java.desktop; ++ requires java.logging; ++ requires java.management; ++ requires java.security.sasl; ++ requires java.xml; ++} +diff -Nur javamail-1.6.1-orig/mailapi/src/main/java/module-info.java javamail-1.6.1/mailapi/src/main/java/module-info.java +--- javamail-1.6.1-orig/mailapi/src/main/java/module-info.java 2018-08-09 11:02:16.595430222 -0400 ++++ javamail-1.6.1/mailapi/src/main/java/module-info.java 2018-08-14 14:53:20.647537044 -0400 +@@ -38,19 +38,7 @@ + * holder. + */ + +-module java.mail { +- exports javax.mail; +- exports javax.mail.event; +- exports javax.mail.internet; +- exports javax.mail.search; +- exports javax.mail.util; +- exports com.sun.mail.util; +- exports com.sun.mail.auth; +- exports com.sun.mail.handlers; ++module javax.mailapi { + +- requires transitive java.activation; +- requires java.logging; +- requires java.xml; // for text/xml handler +- requires java.desktop; // for image/jpeg handler +- requires java.security.sasl; // for OAuth2 support ++ exports javax.mailapi; + } +diff -Nur javamail-1.6.1-orig/mbox/src/main/java/module-info.java javamail-1.6.1/mbox/src/main/java/module-info.java +--- javamail-1.6.1-orig/mbox/src/main/java/module-info.java 1969-12-31 19:00:00.000000000 -0500 ++++ javamail-1.6.1/mbox/src/main/java/module-info.java 2018-08-14 14:55:08.584026031 -0400 +@@ -0,0 +1,49 @@ ++/* ++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. ++ * ++ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. ++ * ++ * The contents of this file are subject to the terms of either the GNU ++ * General Public License Version 2 only ("GPL") or the Common Development ++ * and Distribution License("CDDL") (collectively, the "License"). You ++ * may not use this file except in compliance with the License. You can ++ * obtain a copy of the License at ++ * https://oss.oracle.com/licenses/CDDL+GPL-1.1 ++ * or LICENSE.txt. See the License for the specific ++ * language governing permissions and limitations under the License. ++ * ++ * When distributing the software, include this License Header Notice in each ++ * file and include the License file at LICENSE.txt. ++ * ++ * GPL Classpath Exception: ++ * Oracle designates this particular file as subject to the "Classpath" ++ * exception as provided by Oracle in the GPL Version 2 section of the License ++ * file that accompanied this code. ++ * ++ * Modifications: ++ * If applicable, add the following below the License Header, with the fields ++ * enclosed by brackets [] replaced by your own identifying information: ++ * "Portions Copyright [year] [name of copyright owner]" ++ * ++ * Contributor(s): ++ * If you wish your version of this file to be governed by only the CDDL or ++ * only the GPL Version 2, indicate your decision by adding "[Contributor] ++ * elects to include this software in this distribution under the [CDDL or GPL ++ * Version 2] license." If you don't indicate a single choice of license, a ++ * recipient has the option to distribute your version of this file under ++ * either the CDDL, the GPL Version 2 or to extend the choice of license to ++ * its licensees as provided above. However, if you add GPL Version 2 code ++ * and therefore, elected the GPL Version 2 license, then the option applies ++ * only if the new code is made subject to such option by the copyright ++ * holder. ++ */ ++ ++module com.sun.mail.mbox { ++ ++ exports com.sun.mail.mbox; ++ exports com.sun.mail.remote; ++ ++ requires activation; ++ requires java.datatransfer; ++ requires javax.mail; ++} +diff -Nur javamail-1.6.1-orig/mkdir javamail-1.6.1/mkdir +--- javamail-1.6.1-orig/mkdir 1969-12-31 19:00:00.000000000 -0500 ++++ javamail-1.6.1/mkdir 2018-08-14 13:57:08.329678360 -0400 +@@ -0,0 +1,47 @@ ++/* ++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. ++ * ++ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. ++ * ++ * The contents of this file are subject to the terms of either the GNU ++ * General Public License Version 2 only ("GPL") or the Common Development ++ * and Distribution License("CDDL") (collectively, the "License"). You ++ * may not use this file except in compliance with the License. You can ++ * obtain a copy of the License at ++ * https://oss.oracle.com/licenses/CDDL+GPL-1.1 ++ * or LICENSE.txt. See the License for the specific ++ * language governing permissions and limitations under the License. ++ * ++ * When distributing the software, include this License Header Notice in each ++ * file and include the License file at LICENSE.txt. ++ * ++ * GPL Classpath Exception: ++ * Oracle designates this particular file as subject to the "Classpath" ++ * exception as provided by Oracle in the GPL Version 2 section of the License ++ * file that accompanied this code. ++ * ++ * Modifications: ++ * If applicable, add the following below the License Header, with the fields ++ * enclosed by brackets [] replaced by your own identifying information: ++ * "Portions Copyright [year] [name of copyright owner]" ++ * ++ * Contributor(s): ++ * If you wish your version of this file to be governed by only the CDDL or ++ * only the GPL Version 2, indicate your decision by adding "[Contributor] ++ * elects to include this software in this distribution under the [CDDL or GPL ++ * Version 2] license." If you don't indicate a single choice of license, a ++ * recipient has the option to distribute your version of this file under ++ * either the CDDL, the GPL Version 2 or to extend the choice of license to ++ * its licensees as provided above. However, if you add GPL Version 2 code ++ * and therefore, elected the GPL Version 2 license, then the option applies ++ * only if the new code is made subject to such option by the copyright ++ * holder. ++ */ ++ ++module com.sun.mail.android.mail { ++ ++ exports com.sun.mail.android.mail; ++ exports com.sun.mail.handlers; ++ ++ requires android.activation; ++} +diff -Nur javamail-1.6.1-orig/outlook/src/main/java/module-info.java javamail-1.6.1/outlook/src/main/java/module-info.java +--- javamail-1.6.1-orig/outlook/src/main/java/module-info.java 1969-12-31 19:00:00.000000000 -0500 ++++ javamail-1.6.1/outlook/src/main/java/module-info.java 2018-08-14 14:54:30.304207248 -0400 +@@ -0,0 +1,44 @@ ++/* ++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. ++ * ++ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. ++ * ++ * The contents of this file are subject to the terms of either the GNU ++ * General Public License Version 2 only ("GPL") or the Common Development ++ * and Distribution License("CDDL") (collectively, the "License"). You ++ * may not use this file except in compliance with the License. You can ++ * obtain a copy of the License at ++ * https://oss.oracle.com/licenses/CDDL+GPL-1.1 ++ * or LICENSE.txt. See the License for the specific ++ * language governing permissions and limitations under the License. ++ * ++ * When distributing the software, include this License Header Notice in each ++ * file and include the License file at LICENSE.txt. ++ * ++ * GPL Classpath Exception: ++ * Oracle designates this particular file as subject to the "Classpath" ++ * exception as provided by Oracle in the GPL Version 2 section of the License ++ * file that accompanied this code. ++ * ++ * Modifications: ++ * If applicable, add the following below the License Header, with the fields ++ * enclosed by brackets [] replaced by your own identifying information: ++ * "Portions Copyright [year] [name of copyright owner]" ++ * ++ * Contributor(s): ++ * If you wish your version of this file to be governed by only the CDDL or ++ * only the GPL Version 2, indicate your decision by adding "[Contributor] ++ * elects to include this software in this distribution under the [CDDL or GPL ++ * Version 2] license." If you don't indicate a single choice of license, a ++ * recipient has the option to distribute your version of this file under ++ * either the CDDL, the GPL Version 2 or to extend the choice of license to ++ * its licensees as provided above. However, if you add GPL Version 2 code ++ * and therefore, elected the GPL Version 2 license, then the option applies ++ * only if the new code is made subject to such option by the copyright ++ * holder. ++ */ ++ ++module com.sun.mail.outlook { ++ ++ exports com.sun.mail.outlook; ++} +diff -Nur javamail-1.6.1-orig/servlet/src/main/java/module-info.java javamail-1.6.1/servlet/src/main/java/module-info.java +--- javamail-1.6.1-orig/servlet/src/main/java/module-info.java 1969-12-31 19:00:00.000000000 -0500 ++++ javamail-1.6.1/servlet/src/main/java/module-info.java 2018-08-14 14:56:29.350643665 -0400 +@@ -0,0 +1,44 @@ ++/* ++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. ++ * ++ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. ++ * ++ * The contents of this file are subject to the terms of either the GNU ++ * General Public License Version 2 only ("GPL") or the Common Development ++ * and Distribution License("CDDL") (collectively, the "License"). You ++ * may not use this file except in compliance with the License. You can ++ * obtain a copy of the License at ++ * https://oss.oracle.com/licenses/CDDL+GPL-1.1 ++ * or LICENSE.txt. See the License for the specific ++ * language governing permissions and limitations under the License. ++ * ++ * When distributing the software, include this License Header Notice in each ++ * file and include the License file at LICENSE.txt. ++ * ++ * GPL Classpath Exception: ++ * Oracle designates this particular file as subject to the "Classpath" ++ * exception as provided by Oracle in the GPL Version 2 section of the License ++ * file that accompanied this code. ++ * ++ * Modifications: ++ * If applicable, add the following below the License Header, with the fields ++ * enclosed by brackets [] replaced by your own identifying information: ++ * "Portions Copyright [year] [name of copyright owner]" ++ * ++ * Contributor(s): ++ * If you wish your version of this file to be governed by only the CDDL or ++ * only the GPL Version 2, indicate your decision by adding "[Contributor] ++ * elects to include this software in this distribution under the [CDDL or GPL ++ * Version 2] license." If you don't indicate a single choice of license, a ++ * recipient has the option to distribute your version of this file under ++ * either the CDDL, the GPL Version 2 or to extend the choice of license to ++ * its licensees as provided above. However, if you add GPL Version 2 code ++ * and therefore, elected the GPL Version 2 license, then the option applies ++ * only if the new code is made subject to such option by the copyright ++ * holder. ++ */ ++ ++module com.sun.mail.servlet { ++ ++ exports com.sun.mail.servlet; ++} +diff -Nur javamail-1.6.1-orig/src/main/java/module-info.java javamail-1.6.1/src/main/java/module-info.java +--- javamail-1.6.1-orig/src/main/java/module-info.java 1969-12-31 19:00:00.000000000 -0500 ++++ javamail-1.6.1/src/main/java/module-info.java 2018-08-14 14:40:10.339257339 -0400 +@@ -0,0 +1,54 @@ ++/* ++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. ++ * ++ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. ++ * ++ * The contents of this file are subject to the terms of either the GNU ++ * General Public License Version 2 only ("GPL") or the Common Development ++ * and Distribution License("CDDL") (collectively, the "License"). You ++ * may not use this file except in compliance with the License. You can ++ * obtain a copy of the License at ++ * https://oss.oracle.com/licenses/CDDL+GPL-1.1 ++ * or LICENSE.txt. See the License for the specific ++ * language governing permissions and limitations under the License. ++ * ++ * When distributing the software, include this License Header Notice in each ++ * file and include the License file at LICENSE.txt. ++ * ++ * GPL Classpath Exception: ++ * Oracle designates this particular file as subject to the "Classpath" ++ * exception as provided by Oracle in the GPL Version 2 section of the License ++ * file that accompanied this code. ++ * ++ * Modifications: ++ * If applicable, add the following below the License Header, with the fields ++ * enclosed by brackets [] replaced by your own identifying information: ++ * "Portions Copyright [year] [name of copyright owner]" ++ * ++ * Contributor(s): ++ * If you wish your version of this file to be governed by only the CDDL or ++ * only the GPL Version 2, indicate your decision by adding "[Contributor] ++ * elects to include this software in this distribution under the [CDDL or GPL ++ * Version 2] license." If you don't indicate a single choice of license, a ++ * recipient has the option to distribute your version of this file under ++ * either the CDDL, the GPL Version 2 or to extend the choice of license to ++ * its licensees as provided above. However, if you add GPL Version 2 code ++ * and therefore, elected the GPL Version 2 license, then the option applies ++ * only if the new code is made subject to such option by the copyright ++ * holder. ++ */ ++ ++module com.sun.mail.all { ++ ++ exports com.sun.mail.all; ++ exports com.sun.mail.mail; ++ exports com.sun.mail.mailapi; ++ exports com.sun.mail.mailapijar; ++ exports com.sun.mail.smtp; ++ exports com.sun.mail.imap; ++ exports com.sun.mail.gimap; ++ exports com.sun.mail.pop3; ++ exports com.sun.mail.dsn; ++ exports com.sun.mail.mailhandler; ++ exports com.sun.mail.android; ++} +diff -Nur javamail-1.6.1-orig/taglib/src/main/java/module-info.java javamail-1.6.1/taglib/src/main/java/module-info.java +--- javamail-1.6.1-orig/taglib/src/main/java/module-info.java 1969-12-31 19:00:00.000000000 -0500 ++++ javamail-1.6.1/taglib/src/main/java/module-info.java 2018-08-14 14:57:13.424434998 -0400 +@@ -0,0 +1,48 @@ ++/* ++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. ++ * ++ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. ++ * ++ * The contents of this file are subject to the terms of either the GNU ++ * General Public License Version 2 only ("GPL") or the Common Development ++ * and Distribution License("CDDL") (collectively, the "License"). You ++ * may not use this file except in compliance with the License. You can ++ * obtain a copy of the License at ++ * https://oss.oracle.com/licenses/CDDL+GPL-1.1 ++ * or LICENSE.txt. See the License for the specific ++ * language governing permissions and limitations under the License. ++ * ++ * When distributing the software, include this License Header Notice in each ++ * file and include the License file at LICENSE.txt. ++ * ++ * GPL Classpath Exception: ++ * Oracle designates this particular file as subject to the "Classpath" ++ * exception as provided by Oracle in the GPL Version 2 section of the License ++ * file that accompanied this code. ++ * ++ * Modifications: ++ * If applicable, add the following below the License Header, with the fields ++ * enclosed by brackets [] replaced by your own identifying information: ++ * "Portions Copyright [year] [name of copyright owner]" ++ * ++ * Contributor(s): ++ * If you wish your version of this file to be governed by only the CDDL or ++ * only the GPL Version 2, indicate your decision by adding "[Contributor] ++ * elects to include this software in this distribution under the [CDDL or GPL ++ * Version 2] license." If you don't indicate a single choice of license, a ++ * recipient has the option to distribute your version of this file under ++ * either the CDDL, the GPL Version 2 or to extend the choice of license to ++ * its licensees as provided above. However, if you add GPL Version 2 code ++ * and therefore, elected the GPL Version 2 license, then the option applies ++ * only if the new code is made subject to such option by the copyright ++ * holder. ++ */ ++ ++module com.sun.mail.taglib { ++ ++ exports com.sun.mail.taglib; ++ exports com.sun.mail.demo; ++ ++ requires javax.mail; ++ requires jsp.api; ++} +diff -Nur javamail-1.6.1-orig/webapp/src/main/java/module-info.java javamail-1.6.1/webapp/src/main/java/module-info.java +--- javamail-1.6.1-orig/webapp/src/main/java/module-info.java 1969-12-31 19:00:00.000000000 -0500 ++++ javamail-1.6.1/webapp/src/main/java/module-info.java 2018-08-14 14:57:35.518330391 -0400 +@@ -0,0 +1,44 @@ ++/* ++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. ++ * ++ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. ++ * ++ * The contents of this file are subject to the terms of either the GNU ++ * General Public License Version 2 only ("GPL") or the Common Development ++ * and Distribution License("CDDL") (collectively, the "License"). You ++ * may not use this file except in compliance with the License. You can ++ * obtain a copy of the License at ++ * https://oss.oracle.com/licenses/CDDL+GPL-1.1 ++ * or LICENSE.txt. See the License for the specific ++ * language governing permissions and limitations under the License. ++ * ++ * When distributing the software, include this License Header Notice in each ++ * file and include the License file at LICENSE.txt. ++ * ++ * GPL Classpath Exception: ++ * Oracle designates this particular file as subject to the "Classpath" ++ * exception as provided by Oracle in the GPL Version 2 section of the License ++ * file that accompanied this code. ++ * ++ * Modifications: ++ * If applicable, add the following below the License Header, with the fields ++ * enclosed by brackets [] replaced by your own identifying information: ++ * "Portions Copyright [year] [name of copyright owner]" ++ * ++ * Contributor(s): ++ * If you wish your version of this file to be governed by only the CDDL or ++ * only the GPL Version 2, indicate your decision by adding "[Contributor] ++ * elects to include this software in this distribution under the [CDDL or GPL ++ * Version 2] license." If you don't indicate a single choice of license, a ++ * recipient has the option to distribute your version of this file under ++ * either the CDDL, the GPL Version 2 or to extend the choice of license to ++ * its licensees as provided above. However, if you add GPL Version 2 code ++ * and therefore, elected the GPL Version 2 license, then the option applies ++ * only if the new code is made subject to such option by the copyright ++ * holder. ++ */ ++ ++module com.sun.mail.webapp { ++ ++ exports com.sun.mail.webapp; ++} diff --git a/javamail/3_remove_javadoc_aggregate.patch b/javamail/3_remove_javadoc_aggregate.patch new file mode 100644 index 0000000..179e69a --- /dev/null +++ b/javamail/3_remove_javadoc_aggregate.patch @@ -0,0 +1,75 @@ +diff -Nur javamail-1.6.1-orig/pom.xml javamail-1.6.1/pom.xml +--- javamail-1.6.1-orig/pom.xml 2018-08-09 11:02:16.589430248 -0400 ++++ javamail-1.6.1/pom.xml 2018-08-15 12:15:32.888635854 -0400 +@@ -215,19 +215,6 @@ + + + org.apache.maven.plugins +- maven-javadoc-plugin +- +- +- attach-javadocs +- +- jar +- +- +- +- +- +- +- org.apache.maven.plugins + maven-gpg-plugin + 1.1 + +@@ -263,19 +250,6 @@ + true + + +- +- +- org.apache.maven.plugins +- maven-javadoc-plugin +- +- +- attach-javadocs +- +- jar +- +- +- +- + + + +@@ -717,31 +691,6 @@ + + + org.apache.maven.plugins +- maven-javadoc-plugin +- 3.0.0-M1 +- +- +- +- +- com.sun.mail +- javax.mail +- ${mail.version} +- +- +- com.sun.mail +- gimap +- ${mail.version} +- +- +- +- +- module-info.java +- +- +- +- +- +- org.apache.maven.plugins + maven-war-plugin + 2.2 + diff --git a/javamail/4_correct_javax_activation_name.patch b/javamail/4_correct_javax_activation_name.patch new file mode 100644 index 0000000..48c05c8 --- /dev/null +++ b/javamail/4_correct_javax_activation_name.patch @@ -0,0 +1,42 @@ +diff -Nur javamail-1.6.1-orig/mail/pom.xml javamail-1.6.1/mail/pom.xml +--- javamail-1.6.1-orig/mail/pom.xml 2018-08-09 11:02:16.569430334 -0400 ++++ javamail-1.6.1/mail/pom.xml 2018-08-21 11:00:16.262719786 -0400 +@@ -225,7 +225,7 @@ + + + javax.activation +- activation ++ javax.activation-api + + + junit +diff -Nur javamail-1.6.1-orig/pom.xml javamail-1.6.1/pom.xml +--- javamail-1.6.1-orig/pom.xml 2018-08-09 11:02:16.589430248 -0400 ++++ javamail-1.6.1/pom.xml 2018-08-21 10:58:13.714341191 -0400 +@@ -89,7 +89,7 @@ + + 1_6_1 + 1.6 +- 1.1 ++ 1.2 + + + ${project.groupId}.${project.artifactId} +@@ -770,7 +770,7 @@ + + + javax.activation +- activation ++ javax.activation-api + ${activation-api.version} + + +@@ -814,7 +814,7 @@ + + + javax.activation +- activation ++ javax.activation-api + + + diff --git a/javamail/5_jar_for_webapp.patch b/javamail/5_jar_for_webapp.patch new file mode 100644 index 0000000..e62fa04 --- /dev/null +++ b/javamail/5_jar_for_webapp.patch @@ -0,0 +1,12 @@ +diff -Nur javamail-1.6.1-orig/webapp/pom.xml javamail-1.6.1/webapp/pom.xml +--- javamail-1.6.1-orig/webapp/pom.xml 2018-08-09 11:02:16.593430231 -0400 ++++ javamail-1.6.1/webapp/pom.xml 2018-08-21 11:40:40.259479166 -0400 +@@ -53,7 +53,7 @@ + 4.0.0 + com.sun.mail + webapp +- war ++ jar + JavaMail API demo webapp + + diff --git a/javamail/6_servlet_module.patch b/javamail/6_servlet_module.patch new file mode 100644 index 0000000..237e236 --- /dev/null +++ b/javamail/6_servlet_module.patch @@ -0,0 +1,11 @@ +diff -Nur javamail-1.6.1-orig/pom.xml javamail-1.6.1/pom.xml +--- javamail-1.6.1-orig/pom.xml 2018-09-18 08:37:07.102441253 -0400 ++++ javamail-1.6.1/pom.xml 2018-09-18 08:37:41.380270534 -0400 +@@ -163,6 +163,7 @@ + dsn + mailhandler + android ++ servlet + + + diff --git a/javamail/7_update_activation_api_version.patch b/javamail/7_update_activation_api_version.patch new file mode 100644 index 0000000..07e584b --- /dev/null +++ b/javamail/7_update_activation_api_version.patch @@ -0,0 +1,12 @@ +diff -Nur javamail-1.6.1-orig/pom.xml javamail-1.6.1/pom.xml +--- javamail-1.6.1-orig/pom.xml 2018-10-02 11:47:14.694181502 -0400 ++++ javamail-1.6.1/pom.xml 2018-10-02 11:47:49.402988677 -0400 +@@ -89,7 +89,7 @@ + + 1_6_1 + 1.6 +- 1.2 ++ 1.2.1 + + + ${project.groupId}.${project.artifactId} diff --git a/javamail/correct-javax-activation-name.patch b/javamail/correct-javax-activation-name.patch deleted file mode 100644 index 48c05c8..0000000 --- a/javamail/correct-javax-activation-name.patch +++ /dev/null @@ -1,42 +0,0 @@ -diff -Nur javamail-1.6.1-orig/mail/pom.xml javamail-1.6.1/mail/pom.xml ---- javamail-1.6.1-orig/mail/pom.xml 2018-08-09 11:02:16.569430334 -0400 -+++ javamail-1.6.1/mail/pom.xml 2018-08-21 11:00:16.262719786 -0400 -@@ -225,7 +225,7 @@ - - - javax.activation -- activation -+ javax.activation-api - - - junit -diff -Nur javamail-1.6.1-orig/pom.xml javamail-1.6.1/pom.xml ---- javamail-1.6.1-orig/pom.xml 2018-08-09 11:02:16.589430248 -0400 -+++ javamail-1.6.1/pom.xml 2018-08-21 10:58:13.714341191 -0400 -@@ -89,7 +89,7 @@ - - 1_6_1 - 1.6 -- 1.1 -+ 1.2 - - - ${project.groupId}.${project.artifactId} -@@ -770,7 +770,7 @@ - - - javax.activation -- activation -+ javax.activation-api - ${activation-api.version} - - -@@ -814,7 +814,7 @@ - - - javax.activation -- activation -+ javax.activation-api - - - diff --git a/javamail/dont-publish.patch b/javamail/dont-publish.patch deleted file mode 100644 index 8246476..0000000 --- a/javamail/dont-publish.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -Nur javamail-1.6.1-orig/pom.xml javamail-1.6.1/pom.xml ---- javamail-1.6.1-orig/pom.xml 2018-08-09 11:02:16.589430248 -0400 -+++ javamail-1.6.1/pom.xml 2018-08-09 14:35:48.661641620 -0400 -@@ -182,7 +182,6 @@ - logging - outlook - javadoc -- publish - - - true diff --git a/javamail/ignore-broken-tests.patch b/javamail/ignore-broken-tests.patch deleted file mode 100644 index 31e5548..0000000 --- a/javamail/ignore-broken-tests.patch +++ /dev/null @@ -1,27 +0,0 @@ -diff -Nur javamail-1.6.1-orig/mail/src/test/java/com/sun/mail/util/WriteTimeoutSocketTest.java javamail-1.6.1/mail/src/test/java/com/sun/mail/util/WriteTimeoutSocketTest.java ---- javamail-1.6.1-orig/mail/src/test/java/com/sun/mail/util/WriteTimeoutSocketTest.java 2018-08-09 11:02:16.588430253 -0400 -+++ javamail-1.6.1/mail/src/test/java/com/sun/mail/util/WriteTimeoutSocketTest.java 2018-08-10 12:58:32.251319814 -0400 -@@ -62,6 +62,7 @@ - import com.sun.mail.test.TestSSLSocketFactory; - - import org.junit.Test; -+import org.junit.Ignore; - import org.junit.Rule; - import org.junit.rules.Timeout; - import static org.junit.Assert.fail; -@@ -110,6 +111,7 @@ - /** - * Test write timeouts with SSL sockets. - */ -+ @Ignore - @Test - public void testSSL() { - final Properties properties = new Properties(); -@@ -126,6 +128,7 @@ - /** - * Test write timeouts with a custom SSL socket factory. - */ -+ @Ignore - @Test - public void testSSLSocketFactory() throws Exception { - final Properties properties = new Properties(); diff --git a/javamail/jar-for-webapp.patch b/javamail/jar-for-webapp.patch deleted file mode 100644 index e62fa04..0000000 --- a/javamail/jar-for-webapp.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -Nur javamail-1.6.1-orig/webapp/pom.xml javamail-1.6.1/webapp/pom.xml ---- javamail-1.6.1-orig/webapp/pom.xml 2018-08-09 11:02:16.593430231 -0400 -+++ javamail-1.6.1/webapp/pom.xml 2018-08-21 11:40:40.259479166 -0400 -@@ -53,7 +53,7 @@ - 4.0.0 - com.sun.mail - webapp -- war -+ jar - JavaMail API demo webapp - - diff --git a/javamail/javamail.spec b/javamail/javamail.spec index 67b09cb..0a13ca9 100644 --- a/javamail/javamail.spec +++ b/javamail/javamail.spec @@ -16,16 +16,29 @@ Source0: javamail-1.6.1.tar.gz BuildArch: noarch -Patch0: ignore-broken-tests.patch -Patch1: dont-publish.patch -Patch2: module-info.patch -Patch3: remove-javadoc-aggregate.patch -Patch4: correct-javax-activation-name.patch -Patch5: jar-for-webapp.patch -Patch6: servlet-module.patch -Patch7: update-activation-api-version.patch - -BuildRequires: maven-local java-openjdk jvnet-parent maven-enforcer-plugin glassfish-hk2-maven-plugins maven-source-plugin maven-plugin-build-helper maven-plugin-bundle maven-javadoc-plugin jboss-jsp-2.2-api maven-dependency-plugin glassfish-servlet-api jaf +Patch0: 0_ignore_broken_tests.patch +Patch1: 1_dont_publish.patch +Patch2: 2_module_info.patch +Patch3: 3_remove_javadoc_aggregate.patch +Patch4: 4_correct_javax_activation_name.patch +Patch5: 5_jar_for_webapp.patch +Patch6: 6_servlet_module.patch +Patch7: 7_update_activation_api_version.patch + +BuildRequires: maven-local +BuildRequires: java-openjdk +BuildRequires: jboss-jsp-2.2-api +BuildRequires: jvnet-parent +BuildRequires: glassfish-hk2-maven-plugins +BuildRequires: glassfish-servlet-api +BuildRequires: jaf +BuildRequires: maven-dependency-plugin +BuildRequires: maven-enforcer-plugin +BuildRequires: maven-plugin-build-helper +BuildRequires: maven-plugin-bundle +BuildRequires: maven-javadoc-plugin +BuildRequires: maven-source-plugin + Requires: java-openjdk Provides: osgi(javax.mail.dsn) = %{version} diff --git a/javamail/module-info.patch b/javamail/module-info.patch deleted file mode 100644 index 89ff0e2..0000000 --- a/javamail/module-info.patch +++ /dev/null @@ -1,909 +0,0 @@ -diff -Nur javamail-1.6.1-orig/android/activation/src/main/java/module-info.java javamail-1.6.1/android/activation/src/main/java/module-info.java ---- javamail-1.6.1-orig/android/activation/src/main/java/module-info.java 1969-12-31 19:00:00.000000000 -0500 -+++ javamail-1.6.1/android/activation/src/main/java/module-info.java 2018-08-14 14:39:21.676478718 -0400 -@@ -0,0 +1,49 @@ -+/* -+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -+ * -+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. -+ * -+ * The contents of this file are subject to the terms of either the GNU -+ * General Public License Version 2 only ("GPL") or the Common Development -+ * and Distribution License("CDDL") (collectively, the "License"). You -+ * may not use this file except in compliance with the License. You can -+ * obtain a copy of the License at -+ * https://oss.oracle.com/licenses/CDDL+GPL-1.1 -+ * or LICENSE.txt. See the License for the specific -+ * language governing permissions and limitations under the License. -+ * -+ * When distributing the software, include this License Header Notice in each -+ * file and include the License file at LICENSE.txt. -+ * -+ * GPL Classpath Exception: -+ * Oracle designates this particular file as subject to the "Classpath" -+ * exception as provided by Oracle in the GPL Version 2 section of the License -+ * file that accompanied this code. -+ * -+ * Modifications: -+ * If applicable, add the following below the License Header, with the fields -+ * enclosed by brackets [] replaced by your own identifying information: -+ * "Portions Copyright [year] [name of copyright owner]" -+ * -+ * Contributor(s): -+ * If you wish your version of this file to be governed by only the CDDL or -+ * only the GPL Version 2, indicate your decision by adding "[Contributor] -+ * elects to include this software in this distribution under the [CDDL or GPL -+ * Version 2] license." If you don't indicate a single choice of license, a -+ * recipient has the option to distribute your version of this file under -+ * either the CDDL, the GPL Version 2 or to extend the choice of license to -+ * its licensees as provided above. However, if you add GPL Version 2 code -+ * and therefore, elected the GPL Version 2 license, then the option applies -+ * only if the new code is made subject to such option by the copyright -+ * holder. -+ */ -+ -+module com.sun.mail.android.activation { -+ -+ exports com.sun.mail.android.activation; -+ exports com.sun.activation.registries; -+ exports javax.activation; -+ -+ requires java.desktop; -+ requires java.logging; -+} -diff -Nur javamail-1.6.1-orig/android/mail/src/main/java/module-info.java javamail-1.6.1/android/mail/src/main/java/module-info.java ---- javamail-1.6.1-orig/android/mail/src/main/java/module-info.java 1969-12-31 19:00:00.000000000 -0500 -+++ javamail-1.6.1/android/mail/src/main/java/module-info.java 2018-08-14 14:38:20.979754833 -0400 -@@ -0,0 +1,47 @@ -+/* -+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -+ * -+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. -+ * -+ * The contents of this file are subject to the terms of either the GNU -+ * General Public License Version 2 only ("GPL") or the Common Development -+ * and Distribution License("CDDL") (collectively, the "License"). You -+ * may not use this file except in compliance with the License. You can -+ * obtain a copy of the License at -+ * https://oss.oracle.com/licenses/CDDL+GPL-1.1 -+ * or LICENSE.txt. See the License for the specific -+ * language governing permissions and limitations under the License. -+ * -+ * When distributing the software, include this License Header Notice in each -+ * file and include the License file at LICENSE.txt. -+ * -+ * GPL Classpath Exception: -+ * Oracle designates this particular file as subject to the "Classpath" -+ * exception as provided by Oracle in the GPL Version 2 section of the License -+ * file that accompanied this code. -+ * -+ * Modifications: -+ * If applicable, add the following below the License Header, with the fields -+ * enclosed by brackets [] replaced by your own identifying information: -+ * "Portions Copyright [year] [name of copyright owner]" -+ * -+ * Contributor(s): -+ * If you wish your version of this file to be governed by only the CDDL or -+ * only the GPL Version 2, indicate your decision by adding "[Contributor] -+ * elects to include this software in this distribution under the [CDDL or GPL -+ * Version 2] license." If you don't indicate a single choice of license, a -+ * recipient has the option to distribute your version of this file under -+ * either the CDDL, the GPL Version 2 or to extend the choice of license to -+ * its licensees as provided above. However, if you add GPL Version 2 code -+ * and therefore, elected the GPL Version 2 license, then the option applies -+ * only if the new code is made subject to such option by the copyright -+ * holder. -+ */ -+ -+module com.sun.mail.android.mail { -+ -+ exports com.sun.mail.android.mail; -+ exports com.sun.mail.handlers; -+ -+ requires android.activation; -+} -diff -Nur javamail-1.6.1-orig/android/src/main/java/module-info.java javamail-1.6.1/android/src/main/java/module-info.java ---- javamail-1.6.1-orig/android/src/main/java/module-info.java 1969-12-31 19:00:00.000000000 -0500 -+++ javamail-1.6.1/android/src/main/java/module-info.java 2018-08-14 14:41:14.360966121 -0400 -@@ -0,0 +1,46 @@ -+/* -+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -+ * -+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. -+ * -+ * The contents of this file are subject to the terms of either the GNU -+ * General Public License Version 2 only ("GPL") or the Common Development -+ * and Distribution License("CDDL") (collectively, the "License"). You -+ * may not use this file except in compliance with the License. You can -+ * obtain a copy of the License at -+ * https://oss.oracle.com/licenses/CDDL+GPL-1.1 -+ * or LICENSE.txt. See the License for the specific -+ * language governing permissions and limitations under the License. -+ * -+ * When distributing the software, include this License Header Notice in each -+ * file and include the License file at LICENSE.txt. -+ * -+ * GPL Classpath Exception: -+ * Oracle designates this particular file as subject to the "Classpath" -+ * exception as provided by Oracle in the GPL Version 2 section of the License -+ * file that accompanied this code. -+ * -+ * Modifications: -+ * If applicable, add the following below the License Header, with the fields -+ * enclosed by brackets [] replaced by your own identifying information: -+ * "Portions Copyright [year] [name of copyright owner]" -+ * -+ * Contributor(s): -+ * If you wish your version of this file to be governed by only the CDDL or -+ * only the GPL Version 2, indicate your decision by adding "[Contributor] -+ * elects to include this software in this distribution under the [CDDL or GPL -+ * Version 2] license." If you don't indicate a single choice of license, a -+ * recipient has the option to distribute your version of this file under -+ * either the CDDL, the GPL Version 2 or to extend the choice of license to -+ * its licensees as provided above. However, if you add GPL Version 2 code -+ * and therefore, elected the GPL Version 2 license, then the option applies -+ * only if the new code is made subject to such option by the copyright -+ * holder. -+ */ -+ -+module com.sun.mail.android { -+ -+ exports com.sun.mail.android; -+ exports com.sun.mail.android.activation; -+ exports com.sun.mail.android.mail; -+} -diff -Nur javamail-1.6.1-orig/client/src/main/java/module-info.java javamail-1.6.1/client/src/main/java/module-info.java ---- javamail-1.6.1-orig/client/src/main/java/module-info.java 1969-12-31 19:00:00.000000000 -0500 -+++ javamail-1.6.1/client/src/main/java/module-info.java 2018-08-14 14:41:42.851836521 -0400 -@@ -0,0 +1,44 @@ -+/* -+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -+ * -+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. -+ * -+ * The contents of this file are subject to the terms of either the GNU -+ * General Public License Version 2 only ("GPL") or the Common Development -+ * and Distribution License("CDDL") (collectively, the "License"). You -+ * may not use this file except in compliance with the License. You can -+ * obtain a copy of the License at -+ * https://oss.oracle.com/licenses/CDDL+GPL-1.1 -+ * or LICENSE.txt. See the License for the specific -+ * language governing permissions and limitations under the License. -+ * -+ * When distributing the software, include this License Header Notice in each -+ * file and include the License file at LICENSE.txt. -+ * -+ * GPL Classpath Exception: -+ * Oracle designates this particular file as subject to the "Classpath" -+ * exception as provided by Oracle in the GPL Version 2 section of the License -+ * file that accompanied this code. -+ * -+ * Modifications: -+ * If applicable, add the following below the License Header, with the fields -+ * enclosed by brackets [] replaced by your own identifying information: -+ * "Portions Copyright [year] [name of copyright owner]" -+ * -+ * Contributor(s): -+ * If you wish your version of this file to be governed by only the CDDL or -+ * only the GPL Version 2, indicate your decision by adding "[Contributor] -+ * elects to include this software in this distribution under the [CDDL or GPL -+ * Version 2] license." If you don't indicate a single choice of license, a -+ * recipient has the option to distribute your version of this file under -+ * either the CDDL, the GPL Version 2 or to extend the choice of license to -+ * its licensees as provided above. However, if you add GPL Version 2 code -+ * and therefore, elected the GPL Version 2 license, then the option applies -+ * only if the new code is made subject to such option by the copyright -+ * holder. -+ */ -+ -+module com.sun.mail.client { -+ -+ exports com.sun.mail.client; -+} -diff -Nur javamail-1.6.1-orig/demo/src/main/java/module-info.java javamail-1.6.1/demo/src/main/java/module-info.java ---- javamail-1.6.1-orig/demo/src/main/java/module-info.java 1969-12-31 19:00:00.000000000 -0500 -+++ javamail-1.6.1/demo/src/main/java/module-info.java 2018-08-14 14:45:28.294773335 -0400 -@@ -0,0 +1,47 @@ -+/* -+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -+ * -+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. -+ * -+ * The contents of this file are subject to the terms of either the GNU -+ * General Public License Version 2 only ("GPL") or the Common Development -+ * and Distribution License("CDDL") (collectively, the "License"). You -+ * may not use this file except in compliance with the License. You can -+ * obtain a copy of the License at -+ * https://oss.oracle.com/licenses/CDDL+GPL-1.1 -+ * or LICENSE.txt. See the License for the specific -+ * language governing permissions and limitations under the License. -+ * -+ * When distributing the software, include this License Header Notice in each -+ * file and include the License file at LICENSE.txt. -+ * -+ * GPL Classpath Exception: -+ * Oracle designates this particular file as subject to the "Classpath" -+ * exception as provided by Oracle in the GPL Version 2 section of the License -+ * file that accompanied this code. -+ * -+ * Modifications: -+ * If applicable, add the following below the License Header, with the fields -+ * enclosed by brackets [] replaced by your own identifying information: -+ * "Portions Copyright [year] [name of copyright owner]" -+ * -+ * Contributor(s): -+ * If you wish your version of this file to be governed by only the CDDL or -+ * only the GPL Version 2, indicate your decision by adding "[Contributor] -+ * elects to include this software in this distribution under the [CDDL or GPL -+ * Version 2] license." If you don't indicate a single choice of license, a -+ * recipient has the option to distribute your version of this file under -+ * either the CDDL, the GPL Version 2 or to extend the choice of license to -+ * its licensees as provided above. However, if you add GPL Version 2 code -+ * and therefore, elected the GPL Version 2 license, then the option applies -+ * only if the new code is made subject to such option by the copyright -+ * holder. -+ */ -+ -+module com.sun.mail.demo { -+ -+ exports com.sun.mail.demo; -+ exports internal; -+ -+ requires javax.mail; -+} -diff -Nur javamail-1.6.1-orig/dsn/src/main/java/module-info.java javamail-1.6.1/dsn/src/main/java/module-info.java ---- javamail-1.6.1-orig/dsn/src/main/java/module-info.java 1969-12-31 19:00:00.000000000 -0500 -+++ javamail-1.6.1/dsn/src/main/java/module-info.java 2018-08-14 14:46:03.169608217 -0400 -@@ -0,0 +1,49 @@ -+/* -+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -+ * -+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. -+ * -+ * The contents of this file are subject to the terms of either the GNU -+ * General Public License Version 2 only ("GPL") or the Common Development -+ * and Distribution License("CDDL") (collectively, the "License"). You -+ * may not use this file except in compliance with the License. You can -+ * obtain a copy of the License at -+ * https://oss.oracle.com/licenses/CDDL+GPL-1.1 -+ * or LICENSE.txt. See the License for the specific -+ * language governing permissions and limitations under the License. -+ * -+ * When distributing the software, include this License Header Notice in each -+ * file and include the License file at LICENSE.txt. -+ * -+ * GPL Classpath Exception: -+ * Oracle designates this particular file as subject to the "Classpath" -+ * exception as provided by Oracle in the GPL Version 2 section of the License -+ * file that accompanied this code. -+ * -+ * Modifications: -+ * If applicable, add the following below the License Header, with the fields -+ * enclosed by brackets [] replaced by your own identifying information: -+ * "Portions Copyright [year] [name of copyright owner]" -+ * -+ * Contributor(s): -+ * If you wish your version of this file to be governed by only the CDDL or -+ * only the GPL Version 2, indicate your decision by adding "[Contributor] -+ * elects to include this software in this distribution under the [CDDL or GPL -+ * Version 2] license." If you don't indicate a single choice of license, a -+ * recipient has the option to distribute your version of this file under -+ * either the CDDL, the GPL Version 2 or to extend the choice of license to -+ * its licensees as provided above. However, if you add GPL Version 2 code -+ * and therefore, elected the GPL Version 2 license, then the option applies -+ * only if the new code is made subject to such option by the copyright -+ * holder. -+ */ -+ -+module com.sun.mail.dsn { -+ -+ exports com.sun.mail.dsn; -+ -+ requires com.sun.mail.android.activation; -+ requires java.datatransfer; -+ requires java.logging; -+ requires javax.mail; -+} -diff -Nur javamail-1.6.1-orig/gimap/src/main/java/module-info.java javamail-1.6.1/gimap/src/main/java/module-info.java ---- javamail-1.6.1-orig/gimap/src/main/java/module-info.java 1969-12-31 19:00:00.000000000 -0500 -+++ javamail-1.6.1/gimap/src/main/java/module-info.java 2018-08-14 14:46:28.944486185 -0400 -@@ -0,0 +1,48 @@ -+/* -+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -+ * -+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. -+ * -+ * The contents of this file are subject to the terms of either the GNU -+ * General Public License Version 2 only ("GPL") or the Common Development -+ * and Distribution License("CDDL") (collectively, the "License"). You -+ * may not use this file except in compliance with the License. You can -+ * obtain a copy of the License at -+ * https://oss.oracle.com/licenses/CDDL+GPL-1.1 -+ * or LICENSE.txt. See the License for the specific -+ * language governing permissions and limitations under the License. -+ * -+ * When distributing the software, include this License Header Notice in each -+ * file and include the License file at LICENSE.txt. -+ * -+ * GPL Classpath Exception: -+ * Oracle designates this particular file as subject to the "Classpath" -+ * exception as provided by Oracle in the GPL Version 2 section of the License -+ * file that accompanied this code. -+ * -+ * Modifications: -+ * If applicable, add the following below the License Header, with the fields -+ * enclosed by brackets [] replaced by your own identifying information: -+ * "Portions Copyright [year] [name of copyright owner]" -+ * -+ * Contributor(s): -+ * If you wish your version of this file to be governed by only the CDDL or -+ * only the GPL Version 2, indicate your decision by adding "[Contributor] -+ * elects to include this software in this distribution under the [CDDL or GPL -+ * Version 2] license." If you don't indicate a single choice of license, a -+ * recipient has the option to distribute your version of this file under -+ * either the CDDL, the GPL Version 2 or to extend the choice of license to -+ * its licensees as provided above. However, if you add GPL Version 2 code -+ * and therefore, elected the GPL Version 2 license, then the option applies -+ * only if the new code is made subject to such option by the copyright -+ * holder. -+ */ -+ -+module com.sun.mail.gimap { -+ -+ exports com.sun.mail.gimap; -+ exports com.sun.mail.gimap.protocol; -+ -+ requires activation; -+ requires javax.mail; -+} -diff -Nur javamail-1.6.1-orig/javadoc/src/main/java/module-info.java javamail-1.6.1/javadoc/src/main/java/module-info.java ---- javamail-1.6.1-orig/javadoc/src/main/java/module-info.java 1969-12-31 19:00:00.000000000 -0500 -+++ javamail-1.6.1/javadoc/src/main/java/module-info.java 2018-08-14 14:52:06.017890378 -0400 -@@ -0,0 +1,44 @@ -+/* -+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -+ * -+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. -+ * -+ * The contents of this file are subject to the terms of either the GNU -+ * General Public License Version 2 only ("GPL") or the Common Development -+ * and Distribution License("CDDL") (collectively, the "License"). You -+ * may not use this file except in compliance with the License. You can -+ * obtain a copy of the License at -+ * https://oss.oracle.com/licenses/CDDL+GPL-1.1 -+ * or LICENSE.txt. See the License for the specific -+ * language governing permissions and limitations under the License. -+ * -+ * When distributing the software, include this License Header Notice in each -+ * file and include the License file at LICENSE.txt. -+ * -+ * GPL Classpath Exception: -+ * Oracle designates this particular file as subject to the "Classpath" -+ * exception as provided by Oracle in the GPL Version 2 section of the License -+ * file that accompanied this code. -+ * -+ * Modifications: -+ * If applicable, add the following below the License Header, with the fields -+ * enclosed by brackets [] replaced by your own identifying information: -+ * "Portions Copyright [year] [name of copyright owner]" -+ * -+ * Contributor(s): -+ * If you wish your version of this file to be governed by only the CDDL or -+ * only the GPL Version 2, indicate your decision by adding "[Contributor] -+ * elects to include this software in this distribution under the [CDDL or GPL -+ * Version 2] license." If you don't indicate a single choice of license, a -+ * recipient has the option to distribute your version of this file under -+ * either the CDDL, the GPL Version 2 or to extend the choice of license to -+ * its licensees as provided above. However, if you add GPL Version 2 code -+ * and therefore, elected the GPL Version 2 license, then the option applies -+ * only if the new code is made subject to such option by the copyright -+ * holder. -+ */ -+ -+module com.sun.mail.javadoc { -+ -+ exports com.sun.mail.javadoc; -+} -diff -Nur javamail-1.6.1-orig/logging/src/main/java/module-info.java javamail-1.6.1/logging/src/main/java/module-info.java ---- javamail-1.6.1-orig/logging/src/main/java/module-info.java 1969-12-31 19:00:00.000000000 -0500 -+++ javamail-1.6.1/logging/src/main/java/module-info.java 2018-08-14 14:53:51.903389062 -0400 -@@ -0,0 +1,44 @@ -+/* -+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -+ * -+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. -+ * -+ * The contents of this file are subject to the terms of either the GNU -+ * General Public License Version 2 only ("GPL") or the Common Development -+ * and Distribution License("CDDL") (collectively, the "License"). You -+ * may not use this file except in compliance with the License. You can -+ * obtain a copy of the License at -+ * https://oss.oracle.com/licenses/CDDL+GPL-1.1 -+ * or LICENSE.txt. See the License for the specific -+ * language governing permissions and limitations under the License. -+ * -+ * When distributing the software, include this License Header Notice in each -+ * file and include the License file at LICENSE.txt. -+ * -+ * GPL Classpath Exception: -+ * Oracle designates this particular file as subject to the "Classpath" -+ * exception as provided by Oracle in the GPL Version 2 section of the License -+ * file that accompanied this code. -+ * -+ * Modifications: -+ * If applicable, add the following below the License Header, with the fields -+ * enclosed by brackets [] replaced by your own identifying information: -+ * "Portions Copyright [year] [name of copyright owner]" -+ * -+ * Contributor(s): -+ * If you wish your version of this file to be governed by only the CDDL or -+ * only the GPL Version 2, indicate your decision by adding "[Contributor] -+ * elects to include this software in this distribution under the [CDDL or GPL -+ * Version 2] license." If you don't indicate a single choice of license, a -+ * recipient has the option to distribute your version of this file under -+ * either the CDDL, the GPL Version 2 or to extend the choice of license to -+ * its licensees as provided above. However, if you add GPL Version 2 code -+ * and therefore, elected the GPL Version 2 license, then the option applies -+ * only if the new code is made subject to such option by the copyright -+ * holder. -+ */ -+ -+module com.sun.mail.logging { -+ -+ exports com.sun.mail.logging; -+} -diff -Nur javamail-1.6.1-orig/mail/src/main/java/module-info.java javamail-1.6.1/mail/src/main/java/module-info.java ---- javamail-1.6.1-orig/mail/src/main/java/module-info.java 1969-12-31 19:00:00.000000000 -0500 -+++ javamail-1.6.1/mail/src/main/java/module-info.java 2018-08-14 14:52:56.017653657 -0400 -@@ -0,0 +1,68 @@ -+/* -+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -+ * -+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. -+ * -+ * The contents of this file are subject to the terms of either the GNU -+ * General Public License Version 2 only ("GPL") or the Common Development -+ * and Distribution License("CDDL") (collectively, the "License"). You -+ * may not use this file except in compliance with the License. You can -+ * obtain a copy of the License at -+ * https://oss.oracle.com/licenses/CDDL+GPL-1.1 -+ * or LICENSE.txt. See the License for the specific -+ * language governing permissions and limitations under the License. -+ * -+ * When distributing the software, include this License Header Notice in each -+ * file and include the License file at LICENSE.txt. -+ * -+ * GPL Classpath Exception: -+ * Oracle designates this particular file as subject to the "Classpath" -+ * exception as provided by Oracle in the GPL Version 2 section of the License -+ * file that accompanied this code. -+ * -+ * Modifications: -+ * If applicable, add the following below the License Header, with the fields -+ * enclosed by brackets [] replaced by your own identifying information: -+ * "Portions Copyright [year] [name of copyright owner]" -+ * -+ * Contributor(s): -+ * If you wish your version of this file to be governed by only the CDDL or -+ * only the GPL Version 2, indicate your decision by adding "[Contributor] -+ * elects to include this software in this distribution under the [CDDL or GPL -+ * Version 2] license." If you don't indicate a single choice of license, a -+ * recipient has the option to distribute your version of this file under -+ * either the CDDL, the GPL Version 2 or to extend the choice of license to -+ * its licensees as provided above. However, if you add GPL Version 2 code -+ * and therefore, elected the GPL Version 2 license, then the option applies -+ * only if the new code is made subject to such option by the copyright -+ * holder. -+ */ -+ -+module javax.mail { -+ -+ exports com.sun.mail.util.logging; -+ exports com.sun.mail.util; -+ exports javax.mail.internet; -+ exports com.sun.mail.imap.protocol; -+ exports javax.mail.event; -+ exports javax.mail.util; -+ exports com.sun.mail.auth; -+ exports com.sun.mail.handlers; -+ exports com.sun.mail.pop3; -+ exports javax.mail; -+ exports oldtest.java.javax.mail.internet.socketfactory; -+ exports com.sun.mail.iap; -+ exports com.sun.mail.imap; -+ exports com.sun.mail.smtp; -+ exports javax.mail.search; -+ exports oldtest.java.javax.mail.internet; -+ exports com.sun.mail.test; -+ -+ requires activation; -+ requires java.datatransfer; -+ requires java.desktop; -+ requires java.logging; -+ requires java.management; -+ requires java.security.sasl; -+ requires java.xml; -+} -diff -Nur javamail-1.6.1-orig/mailapi/src/main/java/module-info.java javamail-1.6.1/mailapi/src/main/java/module-info.java ---- javamail-1.6.1-orig/mailapi/src/main/java/module-info.java 2018-08-09 11:02:16.595430222 -0400 -+++ javamail-1.6.1/mailapi/src/main/java/module-info.java 2018-08-14 14:53:20.647537044 -0400 -@@ -38,19 +38,7 @@ - * holder. - */ - --module java.mail { -- exports javax.mail; -- exports javax.mail.event; -- exports javax.mail.internet; -- exports javax.mail.search; -- exports javax.mail.util; -- exports com.sun.mail.util; -- exports com.sun.mail.auth; -- exports com.sun.mail.handlers; -+module javax.mailapi { - -- requires transitive java.activation; -- requires java.logging; -- requires java.xml; // for text/xml handler -- requires java.desktop; // for image/jpeg handler -- requires java.security.sasl; // for OAuth2 support -+ exports javax.mailapi; - } -diff -Nur javamail-1.6.1-orig/mbox/src/main/java/module-info.java javamail-1.6.1/mbox/src/main/java/module-info.java ---- javamail-1.6.1-orig/mbox/src/main/java/module-info.java 1969-12-31 19:00:00.000000000 -0500 -+++ javamail-1.6.1/mbox/src/main/java/module-info.java 2018-08-14 14:55:08.584026031 -0400 -@@ -0,0 +1,49 @@ -+/* -+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -+ * -+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. -+ * -+ * The contents of this file are subject to the terms of either the GNU -+ * General Public License Version 2 only ("GPL") or the Common Development -+ * and Distribution License("CDDL") (collectively, the "License"). You -+ * may not use this file except in compliance with the License. You can -+ * obtain a copy of the License at -+ * https://oss.oracle.com/licenses/CDDL+GPL-1.1 -+ * or LICENSE.txt. See the License for the specific -+ * language governing permissions and limitations under the License. -+ * -+ * When distributing the software, include this License Header Notice in each -+ * file and include the License file at LICENSE.txt. -+ * -+ * GPL Classpath Exception: -+ * Oracle designates this particular file as subject to the "Classpath" -+ * exception as provided by Oracle in the GPL Version 2 section of the License -+ * file that accompanied this code. -+ * -+ * Modifications: -+ * If applicable, add the following below the License Header, with the fields -+ * enclosed by brackets [] replaced by your own identifying information: -+ * "Portions Copyright [year] [name of copyright owner]" -+ * -+ * Contributor(s): -+ * If you wish your version of this file to be governed by only the CDDL or -+ * only the GPL Version 2, indicate your decision by adding "[Contributor] -+ * elects to include this software in this distribution under the [CDDL or GPL -+ * Version 2] license." If you don't indicate a single choice of license, a -+ * recipient has the option to distribute your version of this file under -+ * either the CDDL, the GPL Version 2 or to extend the choice of license to -+ * its licensees as provided above. However, if you add GPL Version 2 code -+ * and therefore, elected the GPL Version 2 license, then the option applies -+ * only if the new code is made subject to such option by the copyright -+ * holder. -+ */ -+ -+module com.sun.mail.mbox { -+ -+ exports com.sun.mail.mbox; -+ exports com.sun.mail.remote; -+ -+ requires activation; -+ requires java.datatransfer; -+ requires javax.mail; -+} -diff -Nur javamail-1.6.1-orig/mkdir javamail-1.6.1/mkdir ---- javamail-1.6.1-orig/mkdir 1969-12-31 19:00:00.000000000 -0500 -+++ javamail-1.6.1/mkdir 2018-08-14 13:57:08.329678360 -0400 -@@ -0,0 +1,47 @@ -+/* -+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -+ * -+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. -+ * -+ * The contents of this file are subject to the terms of either the GNU -+ * General Public License Version 2 only ("GPL") or the Common Development -+ * and Distribution License("CDDL") (collectively, the "License"). You -+ * may not use this file except in compliance with the License. You can -+ * obtain a copy of the License at -+ * https://oss.oracle.com/licenses/CDDL+GPL-1.1 -+ * or LICENSE.txt. See the License for the specific -+ * language governing permissions and limitations under the License. -+ * -+ * When distributing the software, include this License Header Notice in each -+ * file and include the License file at LICENSE.txt. -+ * -+ * GPL Classpath Exception: -+ * Oracle designates this particular file as subject to the "Classpath" -+ * exception as provided by Oracle in the GPL Version 2 section of the License -+ * file that accompanied this code. -+ * -+ * Modifications: -+ * If applicable, add the following below the License Header, with the fields -+ * enclosed by brackets [] replaced by your own identifying information: -+ * "Portions Copyright [year] [name of copyright owner]" -+ * -+ * Contributor(s): -+ * If you wish your version of this file to be governed by only the CDDL or -+ * only the GPL Version 2, indicate your decision by adding "[Contributor] -+ * elects to include this software in this distribution under the [CDDL or GPL -+ * Version 2] license." If you don't indicate a single choice of license, a -+ * recipient has the option to distribute your version of this file under -+ * either the CDDL, the GPL Version 2 or to extend the choice of license to -+ * its licensees as provided above. However, if you add GPL Version 2 code -+ * and therefore, elected the GPL Version 2 license, then the option applies -+ * only if the new code is made subject to such option by the copyright -+ * holder. -+ */ -+ -+module com.sun.mail.android.mail { -+ -+ exports com.sun.mail.android.mail; -+ exports com.sun.mail.handlers; -+ -+ requires android.activation; -+} -diff -Nur javamail-1.6.1-orig/outlook/src/main/java/module-info.java javamail-1.6.1/outlook/src/main/java/module-info.java ---- javamail-1.6.1-orig/outlook/src/main/java/module-info.java 1969-12-31 19:00:00.000000000 -0500 -+++ javamail-1.6.1/outlook/src/main/java/module-info.java 2018-08-14 14:54:30.304207248 -0400 -@@ -0,0 +1,44 @@ -+/* -+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -+ * -+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. -+ * -+ * The contents of this file are subject to the terms of either the GNU -+ * General Public License Version 2 only ("GPL") or the Common Development -+ * and Distribution License("CDDL") (collectively, the "License"). You -+ * may not use this file except in compliance with the License. You can -+ * obtain a copy of the License at -+ * https://oss.oracle.com/licenses/CDDL+GPL-1.1 -+ * or LICENSE.txt. See the License for the specific -+ * language governing permissions and limitations under the License. -+ * -+ * When distributing the software, include this License Header Notice in each -+ * file and include the License file at LICENSE.txt. -+ * -+ * GPL Classpath Exception: -+ * Oracle designates this particular file as subject to the "Classpath" -+ * exception as provided by Oracle in the GPL Version 2 section of the License -+ * file that accompanied this code. -+ * -+ * Modifications: -+ * If applicable, add the following below the License Header, with the fields -+ * enclosed by brackets [] replaced by your own identifying information: -+ * "Portions Copyright [year] [name of copyright owner]" -+ * -+ * Contributor(s): -+ * If you wish your version of this file to be governed by only the CDDL or -+ * only the GPL Version 2, indicate your decision by adding "[Contributor] -+ * elects to include this software in this distribution under the [CDDL or GPL -+ * Version 2] license." If you don't indicate a single choice of license, a -+ * recipient has the option to distribute your version of this file under -+ * either the CDDL, the GPL Version 2 or to extend the choice of license to -+ * its licensees as provided above. However, if you add GPL Version 2 code -+ * and therefore, elected the GPL Version 2 license, then the option applies -+ * only if the new code is made subject to such option by the copyright -+ * holder. -+ */ -+ -+module com.sun.mail.outlook { -+ -+ exports com.sun.mail.outlook; -+} -diff -Nur javamail-1.6.1-orig/servlet/src/main/java/module-info.java javamail-1.6.1/servlet/src/main/java/module-info.java ---- javamail-1.6.1-orig/servlet/src/main/java/module-info.java 1969-12-31 19:00:00.000000000 -0500 -+++ javamail-1.6.1/servlet/src/main/java/module-info.java 2018-08-14 14:56:29.350643665 -0400 -@@ -0,0 +1,44 @@ -+/* -+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -+ * -+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. -+ * -+ * The contents of this file are subject to the terms of either the GNU -+ * General Public License Version 2 only ("GPL") or the Common Development -+ * and Distribution License("CDDL") (collectively, the "License"). You -+ * may not use this file except in compliance with the License. You can -+ * obtain a copy of the License at -+ * https://oss.oracle.com/licenses/CDDL+GPL-1.1 -+ * or LICENSE.txt. See the License for the specific -+ * language governing permissions and limitations under the License. -+ * -+ * When distributing the software, include this License Header Notice in each -+ * file and include the License file at LICENSE.txt. -+ * -+ * GPL Classpath Exception: -+ * Oracle designates this particular file as subject to the "Classpath" -+ * exception as provided by Oracle in the GPL Version 2 section of the License -+ * file that accompanied this code. -+ * -+ * Modifications: -+ * If applicable, add the following below the License Header, with the fields -+ * enclosed by brackets [] replaced by your own identifying information: -+ * "Portions Copyright [year] [name of copyright owner]" -+ * -+ * Contributor(s): -+ * If you wish your version of this file to be governed by only the CDDL or -+ * only the GPL Version 2, indicate your decision by adding "[Contributor] -+ * elects to include this software in this distribution under the [CDDL or GPL -+ * Version 2] license." If you don't indicate a single choice of license, a -+ * recipient has the option to distribute your version of this file under -+ * either the CDDL, the GPL Version 2 or to extend the choice of license to -+ * its licensees as provided above. However, if you add GPL Version 2 code -+ * and therefore, elected the GPL Version 2 license, then the option applies -+ * only if the new code is made subject to such option by the copyright -+ * holder. -+ */ -+ -+module com.sun.mail.servlet { -+ -+ exports com.sun.mail.servlet; -+} -diff -Nur javamail-1.6.1-orig/src/main/java/module-info.java javamail-1.6.1/src/main/java/module-info.java ---- javamail-1.6.1-orig/src/main/java/module-info.java 1969-12-31 19:00:00.000000000 -0500 -+++ javamail-1.6.1/src/main/java/module-info.java 2018-08-14 14:40:10.339257339 -0400 -@@ -0,0 +1,54 @@ -+/* -+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -+ * -+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. -+ * -+ * The contents of this file are subject to the terms of either the GNU -+ * General Public License Version 2 only ("GPL") or the Common Development -+ * and Distribution License("CDDL") (collectively, the "License"). You -+ * may not use this file except in compliance with the License. You can -+ * obtain a copy of the License at -+ * https://oss.oracle.com/licenses/CDDL+GPL-1.1 -+ * or LICENSE.txt. See the License for the specific -+ * language governing permissions and limitations under the License. -+ * -+ * When distributing the software, include this License Header Notice in each -+ * file and include the License file at LICENSE.txt. -+ * -+ * GPL Classpath Exception: -+ * Oracle designates this particular file as subject to the "Classpath" -+ * exception as provided by Oracle in the GPL Version 2 section of the License -+ * file that accompanied this code. -+ * -+ * Modifications: -+ * If applicable, add the following below the License Header, with the fields -+ * enclosed by brackets [] replaced by your own identifying information: -+ * "Portions Copyright [year] [name of copyright owner]" -+ * -+ * Contributor(s): -+ * If you wish your version of this file to be governed by only the CDDL or -+ * only the GPL Version 2, indicate your decision by adding "[Contributor] -+ * elects to include this software in this distribution under the [CDDL or GPL -+ * Version 2] license." If you don't indicate a single choice of license, a -+ * recipient has the option to distribute your version of this file under -+ * either the CDDL, the GPL Version 2 or to extend the choice of license to -+ * its licensees as provided above. However, if you add GPL Version 2 code -+ * and therefore, elected the GPL Version 2 license, then the option applies -+ * only if the new code is made subject to such option by the copyright -+ * holder. -+ */ -+ -+module com.sun.mail.all { -+ -+ exports com.sun.mail.all; -+ exports com.sun.mail.mail; -+ exports com.sun.mail.mailapi; -+ exports com.sun.mail.mailapijar; -+ exports com.sun.mail.smtp; -+ exports com.sun.mail.imap; -+ exports com.sun.mail.gimap; -+ exports com.sun.mail.pop3; -+ exports com.sun.mail.dsn; -+ exports com.sun.mail.mailhandler; -+ exports com.sun.mail.android; -+} -diff -Nur javamail-1.6.1-orig/taglib/src/main/java/module-info.java javamail-1.6.1/taglib/src/main/java/module-info.java ---- javamail-1.6.1-orig/taglib/src/main/java/module-info.java 1969-12-31 19:00:00.000000000 -0500 -+++ javamail-1.6.1/taglib/src/main/java/module-info.java 2018-08-14 14:57:13.424434998 -0400 -@@ -0,0 +1,48 @@ -+/* -+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -+ * -+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. -+ * -+ * The contents of this file are subject to the terms of either the GNU -+ * General Public License Version 2 only ("GPL") or the Common Development -+ * and Distribution License("CDDL") (collectively, the "License"). You -+ * may not use this file except in compliance with the License. You can -+ * obtain a copy of the License at -+ * https://oss.oracle.com/licenses/CDDL+GPL-1.1 -+ * or LICENSE.txt. See the License for the specific -+ * language governing permissions and limitations under the License. -+ * -+ * When distributing the software, include this License Header Notice in each -+ * file and include the License file at LICENSE.txt. -+ * -+ * GPL Classpath Exception: -+ * Oracle designates this particular file as subject to the "Classpath" -+ * exception as provided by Oracle in the GPL Version 2 section of the License -+ * file that accompanied this code. -+ * -+ * Modifications: -+ * If applicable, add the following below the License Header, with the fields -+ * enclosed by brackets [] replaced by your own identifying information: -+ * "Portions Copyright [year] [name of copyright owner]" -+ * -+ * Contributor(s): -+ * If you wish your version of this file to be governed by only the CDDL or -+ * only the GPL Version 2, indicate your decision by adding "[Contributor] -+ * elects to include this software in this distribution under the [CDDL or GPL -+ * Version 2] license." If you don't indicate a single choice of license, a -+ * recipient has the option to distribute your version of this file under -+ * either the CDDL, the GPL Version 2 or to extend the choice of license to -+ * its licensees as provided above. However, if you add GPL Version 2 code -+ * and therefore, elected the GPL Version 2 license, then the option applies -+ * only if the new code is made subject to such option by the copyright -+ * holder. -+ */ -+ -+module com.sun.mail.taglib { -+ -+ exports com.sun.mail.taglib; -+ exports com.sun.mail.demo; -+ -+ requires javax.mail; -+ requires jsp.api; -+} -diff -Nur javamail-1.6.1-orig/webapp/src/main/java/module-info.java javamail-1.6.1/webapp/src/main/java/module-info.java ---- javamail-1.6.1-orig/webapp/src/main/java/module-info.java 1969-12-31 19:00:00.000000000 -0500 -+++ javamail-1.6.1/webapp/src/main/java/module-info.java 2018-08-14 14:57:35.518330391 -0400 -@@ -0,0 +1,44 @@ -+/* -+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -+ * -+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. -+ * -+ * The contents of this file are subject to the terms of either the GNU -+ * General Public License Version 2 only ("GPL") or the Common Development -+ * and Distribution License("CDDL") (collectively, the "License"). You -+ * may not use this file except in compliance with the License. You can -+ * obtain a copy of the License at -+ * https://oss.oracle.com/licenses/CDDL+GPL-1.1 -+ * or LICENSE.txt. See the License for the specific -+ * language governing permissions and limitations under the License. -+ * -+ * When distributing the software, include this License Header Notice in each -+ * file and include the License file at LICENSE.txt. -+ * -+ * GPL Classpath Exception: -+ * Oracle designates this particular file as subject to the "Classpath" -+ * exception as provided by Oracle in the GPL Version 2 section of the License -+ * file that accompanied this code. -+ * -+ * Modifications: -+ * If applicable, add the following below the License Header, with the fields -+ * enclosed by brackets [] replaced by your own identifying information: -+ * "Portions Copyright [year] [name of copyright owner]" -+ * -+ * Contributor(s): -+ * If you wish your version of this file to be governed by only the CDDL or -+ * only the GPL Version 2, indicate your decision by adding "[Contributor] -+ * elects to include this software in this distribution under the [CDDL or GPL -+ * Version 2] license." If you don't indicate a single choice of license, a -+ * recipient has the option to distribute your version of this file under -+ * either the CDDL, the GPL Version 2 or to extend the choice of license to -+ * its licensees as provided above. However, if you add GPL Version 2 code -+ * and therefore, elected the GPL Version 2 license, then the option applies -+ * only if the new code is made subject to such option by the copyright -+ * holder. -+ */ -+ -+module com.sun.mail.webapp { -+ -+ exports com.sun.mail.webapp; -+} diff --git a/javamail/remove-javadoc-aggregate.patch b/javamail/remove-javadoc-aggregate.patch deleted file mode 100644 index 179e69a..0000000 --- a/javamail/remove-javadoc-aggregate.patch +++ /dev/null @@ -1,75 +0,0 @@ -diff -Nur javamail-1.6.1-orig/pom.xml javamail-1.6.1/pom.xml ---- javamail-1.6.1-orig/pom.xml 2018-08-09 11:02:16.589430248 -0400 -+++ javamail-1.6.1/pom.xml 2018-08-15 12:15:32.888635854 -0400 -@@ -215,19 +215,6 @@ - - - org.apache.maven.plugins -- maven-javadoc-plugin -- -- -- attach-javadocs -- -- jar -- -- -- -- -- -- -- org.apache.maven.plugins - maven-gpg-plugin - 1.1 - -@@ -263,19 +250,6 @@ - true - - -- -- -- org.apache.maven.plugins -- maven-javadoc-plugin -- -- -- attach-javadocs -- -- jar -- -- -- -- - - - -@@ -717,31 +691,6 @@ - - - org.apache.maven.plugins -- maven-javadoc-plugin -- 3.0.0-M1 -- -- -- -- -- com.sun.mail -- javax.mail -- ${mail.version} -- -- -- com.sun.mail -- gimap -- ${mail.version} -- -- -- -- -- module-info.java -- -- -- -- -- -- org.apache.maven.plugins - maven-war-plugin - 2.2 - diff --git a/javamail/servlet-module.patch b/javamail/servlet-module.patch deleted file mode 100644 index 237e236..0000000 --- a/javamail/servlet-module.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -Nur javamail-1.6.1-orig/pom.xml javamail-1.6.1/pom.xml ---- javamail-1.6.1-orig/pom.xml 2018-09-18 08:37:07.102441253 -0400 -+++ javamail-1.6.1/pom.xml 2018-09-18 08:37:41.380270534 -0400 -@@ -163,6 +163,7 @@ - dsn - mailhandler - android -+ servlet - - - diff --git a/javamail/update-activation-api-version.patch b/javamail/update-activation-api-version.patch deleted file mode 100644 index 07e584b..0000000 --- a/javamail/update-activation-api-version.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -Nur javamail-1.6.1-orig/pom.xml javamail-1.6.1/pom.xml ---- javamail-1.6.1-orig/pom.xml 2018-10-02 11:47:14.694181502 -0400 -+++ javamail-1.6.1/pom.xml 2018-10-02 11:47:49.402988677 -0400 -@@ -89,7 +89,7 @@ - - 1_6_1 - 1.6 -- 1.2 -+ 1.2.1 - - - ${project.groupId}.${project.artifactId} diff --git a/javamail/vendor-name.patch b/javamail/vendor-name.patch deleted file mode 100644 index 3704322..0000000 --- a/javamail/vendor-name.patch +++ /dev/null @@ -1,18 +0,0 @@ -diff -Nur javamail-1.6.1-orig/dsn/src/main/resources/META-INF/MANIFEST.MF javamail-1.6.1/dsn/src/main/resources/META-INF/MANIFEST.MF ---- javamail-1.6.1-orig/dsn/src/main/resources/META-INF/MANIFEST.MF 2018-08-09 11:02:16.567430343 -0400 -+++ javamail-1.6.1/dsn/src/main/resources/META-INF/MANIFEST.MF 2018-09-17 11:35:14.770214172 -0400 -@@ -1,9 +1,9 @@ - Manifest-Version: 1.0 --Extension-Name: com.sun.mail.dsn --Specification-Title: com.sun.mail.dsn -+Extension-Name: javax.mail.dsn -+Specification-Title: javax.mail.dsn - Specification-Version: ${mail.spec.version} - Specification-Vendor: ${project.organization.name} --Implementation-Title: com.sun.mail.dsn -+Implementation-Title: javax.mail.dsn - Implementation-Version: ${mail.version} - Implementation-Vendor: ${project.organization.name} --Implementation-Vendor-Id: com.sun -+Implementation-Vendor-Id: javax - diff --git a/jmc-core/jmc-core.spec b/jmc-core/jmc-core.spec index 458bc09..48c5cd2 100644 --- a/jmc-core/jmc-core.spec +++ b/jmc-core/jmc-core.spec @@ -13,7 +13,9 @@ URL: http://openjdk.java.net/projects/jmc/ # tar czf jmc-core-7.0.0.tar.gz jmc-core-7.0.0/ Source0: jmc-core-7.0.0.tar.gz -BuildRequires: maven-local java-openjdk javapackages-tools +BuildRequires: java-openjdk +BuildRequires: javapackages-tools +BuildRequires: maven-local BuildRequires: owasp-java-encoder Requires: java-openjdk diff --git a/jmc/0_remove_twitter.patch b/jmc/0_remove_twitter.patch new file mode 100644 index 0000000..ec1a406 --- /dev/null +++ b/jmc/0_remove_twitter.patch @@ -0,0 +1,1708 @@ +diff -Nur jmc-7.0.0-orig/application/org.openjdk.jmc.console.twitter/build.properties jmc-7.0.0/application/org.openjdk.jmc.console.twitter/build.properties +--- jmc-7.0.0-orig/application/org.openjdk.jmc.console.twitter/build.properties 2018-10-02 14:13:12.842624647 -0400 ++++ jmc-7.0.0/application/org.openjdk.jmc.console.twitter/build.properties 1969-12-31 19:00:00.000000000 -0500 +@@ -1,39 +0,0 @@ +-# +-# Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. +-# +-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +-# +-# The contents of this file are subject to the terms of either the Universal Permissive License +-# v 1.0 as shown at http://oss.oracle.com/licenses/upl +-# +-# or the following license: +-# +-# Redistribution and use in source and binary forms, with or without modification, are permitted +-# provided that the following conditions are met: +-# +-# 1. Redistributions of source code must retain the above copyright notice, this list of conditions +-# and the following disclaimer. +-# +-# 2. Redistributions in binary form must reproduce the above copyright notice, this list of +-# conditions and the following disclaimer in the documentation and/or other materials provided with +-# the distribution. +-# +-# 3. Neither the name of the copyright holder nor the names of its contributors may be used to +-# endorse or promote products derived from this software without specific prior written permission. +-# +-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR +-# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +-# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +-# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +-# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +-# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY +-# WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +-# +-source.. = src/main/java/ +-output.. = target/classes/ +-bin.includes = META-INF/,\ +- .,\ +- plugin.xml,\ +- icons/ +-pde.match.rule.bundle=compatible +diff -Nur jmc-7.0.0-orig/application/org.openjdk.jmc.console.twitter/.classpath jmc-7.0.0/application/org.openjdk.jmc.console.twitter/.classpath +--- jmc-7.0.0-orig/application/org.openjdk.jmc.console.twitter/.classpath 2018-10-02 14:13:12.842624647 -0400 ++++ jmc-7.0.0/application/org.openjdk.jmc.console.twitter/.classpath 1969-12-31 19:00:00.000000000 -0500 +@@ -1,7 +0,0 @@ +- +- +- +- +- +- +- +Binary files jmc-7.0.0-orig/application/org.openjdk.jmc.console.twitter/icons/twitter.png and jmc-7.0.0/application/org.openjdk.jmc.console.twitter/icons/twitter.png differ +diff -Nur jmc-7.0.0-orig/application/org.openjdk.jmc.console.twitter/META-INF/MANIFEST.MF jmc-7.0.0/application/org.openjdk.jmc.console.twitter/META-INF/MANIFEST.MF +--- jmc-7.0.0-orig/application/org.openjdk.jmc.console.twitter/META-INF/MANIFEST.MF 2018-10-02 14:13:12.842624647 -0400 ++++ jmc-7.0.0/application/org.openjdk.jmc.console.twitter/META-INF/MANIFEST.MF 1969-12-31 19:00:00.000000000 -0500 +@@ -1,17 +0,0 @@ +-Manifest-Version: 1.0 +-Bundle-ManifestVersion: 2 +-Bundle-Name: Twitter +-Bundle-SymbolicName: org.openjdk.jmc.console.twitter;singleton:=true +-Bundle-Version: 1.0.2.qualifier +-Bundle-Activator: org.openjdk.jmc.console.twitter.TwitterPlugin +-Bundle-Vendor: Oracle Corporation +-Require-Bundle: org.openjdk.jmc.rjmx, +- org.openjdk.jmc.ui, +- org.eclipse.core.net +-Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +-Bundle-ActivationPolicy: lazy +-Import-Package: twitter4j, +- twitter4j.auth, +- twitter4j.conf, +- twitter4j.api +-Automatic-Module-Name: org.openjdk.jmc.console.twitter +diff -Nur jmc-7.0.0-orig/application/org.openjdk.jmc.console.twitter/plugin.xml jmc-7.0.0/application/org.openjdk.jmc.console.twitter/plugin.xml +--- jmc-7.0.0-orig/application/org.openjdk.jmc.console.twitter/plugin.xml 2018-10-02 14:13:12.842624647 -0400 ++++ jmc-7.0.0/application/org.openjdk.jmc.console.twitter/plugin.xml 1969-12-31 19:00:00.000000000 -0500 +@@ -1,92 +0,0 @@ +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +\ No newline at end of file +diff -Nur jmc-7.0.0-orig/application/org.openjdk.jmc.console.twitter/pom.xml jmc-7.0.0/application/org.openjdk.jmc.console.twitter/pom.xml +--- jmc-7.0.0-orig/application/org.openjdk.jmc.console.twitter/pom.xml 2018-10-02 14:13:12.842624647 -0400 ++++ jmc-7.0.0/application/org.openjdk.jmc.console.twitter/pom.xml 1969-12-31 19:00:00.000000000 -0500 +@@ -1,44 +0,0 @@ +- +- +- +- 4.0.0 +- +- org.openjdk.jmc +- missioncontrol.application +- 7.0.0-SNAPSHOT +- +- org.openjdk.jmc.console.twitter +- 1.0.2-SNAPSHOT +- eclipse-plugin +- +diff -Nur jmc-7.0.0-orig/application/org.openjdk.jmc.console.twitter/.project jmc-7.0.0/application/org.openjdk.jmc.console.twitter/.project +--- jmc-7.0.0-orig/application/org.openjdk.jmc.console.twitter/.project 2018-10-02 14:13:12.842624647 -0400 ++++ jmc-7.0.0/application/org.openjdk.jmc.console.twitter/.project 1969-12-31 19:00:00.000000000 -0500 +@@ -1,34 +0,0 @@ +- +- +- org.openjdk.jmc.console.twitter +- +- +- +- +- +- org.eclipse.jdt.core.javabuilder +- +- +- +- +- org.eclipse.pde.ManifestBuilder +- +- +- +- +- org.eclipse.pde.SchemaBuilder +- +- +- +- +- org.eclipse.m2e.core.maven2Builder +- +- +- +- +- +- org.eclipse.m2e.core.maven2Nature +- org.eclipse.pde.PluginNature +- org.eclipse.jdt.core.javanature +- +- +diff -Nur jmc-7.0.0-orig/application/org.openjdk.jmc.console.twitter/.settings/org.eclipse.jdt.core.prefs jmc-7.0.0/application/org.openjdk.jmc.console.twitter/.settings/org.eclipse.jdt.core.prefs +--- jmc-7.0.0-orig/application/org.openjdk.jmc.console.twitter/.settings/org.eclipse.jdt.core.prefs 2018-10-02 14:13:12.842624647 -0400 ++++ jmc-7.0.0/application/org.openjdk.jmc.console.twitter/.settings/org.eclipse.jdt.core.prefs 1969-12-31 19:00:00.000000000 -0500 +@@ -1,2 +0,0 @@ +-eclipse.preferences.version=1 +-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore +diff -Nur jmc-7.0.0-orig/application/org.openjdk.jmc.console.twitter/src/main/java/org/openjdk/jmc/console/twitter/SendMessage.java jmc-7.0.0/application/org.openjdk.jmc.console.twitter/src/main/java/org/openjdk/jmc/console/twitter/SendMessage.java +--- jmc-7.0.0-orig/application/org.openjdk.jmc.console.twitter/src/main/java/org/openjdk/jmc/console/twitter/SendMessage.java 2018-10-02 14:13:12.843624641 -0400 ++++ jmc-7.0.0/application/org.openjdk.jmc.console.twitter/src/main/java/org/openjdk/jmc/console/twitter/SendMessage.java 1969-12-31 19:00:00.000000000 -0500 +@@ -1,71 +0,0 @@ +-/* +- * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. +- * +- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +- * +- * The contents of this file are subject to the terms of either the Universal Permissive License +- * v 1.0 as shown at http://oss.oracle.com/licenses/upl +- * +- * or the following license: +- * +- * Redistribution and use in source and binary forms, with or without modification, are permitted +- * provided that the following conditions are met: +- * +- * 1. Redistributions of source code must retain the above copyright notice, this list of conditions +- * and the following disclaimer. +- * +- * 2. Redistributions in binary form must reproduce the above copyright notice, this list of +- * conditions and the following disclaimer in the documentation and/or other materials provided with +- * the distribution. +- * +- * 3. Neither the name of the copyright holder nor the names of its contributors may be used to +- * endorse or promote products derived from this software without specific prior written permission. +- * +- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR +- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +- * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY +- * WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +- */ +-package org.openjdk.jmc.console.twitter; +- +-import org.openjdk.jmc.rjmx.IConnectionHandle; +-import org.openjdk.jmc.rjmx.triggers.IActivatableTriggerAction; +-import org.openjdk.jmc.rjmx.triggers.TriggerAction; +-import org.openjdk.jmc.rjmx.triggers.TriggerEvent; +- +-/** +- * Sends a direct message from one user to another +- */ +-public class SendMessage extends TriggerAction implements IActivatableTriggerAction { +- private static final String FROM_FIELD = "from"; //$NON-NLS-1$ +- private static final String TO_FIELD = "to"; //$NON-NLS-1$ +- private static final String MESSAGE_FIELD = "message"; //$NON-NLS-1$ +- +- public SendMessage() { +- +- } +- +- @Override +- public void handleNotificationEvent(TriggerEvent event) throws Exception { +- String from = getSetting(FROM_FIELD).getString(); +- String to = getSetting(TO_FIELD).getString(); +- String message = TwitterPlugin.createMessage(getSetting(MESSAGE_FIELD).getString(), event); +- +- if (from != null && to != null && message != null) { +- send(from, to, message); +- } +- } +- +- private void send(String from, String to, String message) throws Exception { +- TwitterPlugin.getDefault().sendDirectMessage(from, to, message); +- } +- +- @Override +- public boolean isActivatable(IConnectionHandle handle) { +- return TwitterPlugin.getDefault().verifyAuthorizedUser(getSetting(FROM_FIELD).getString()); +- } +-} +diff -Nur jmc-7.0.0-orig/application/org.openjdk.jmc.console.twitter/src/main/java/org/openjdk/jmc/console/twitter/Tweeter.java jmc-7.0.0/application/org.openjdk.jmc.console.twitter/src/main/java/org/openjdk/jmc/console/twitter/Tweeter.java +--- jmc-7.0.0-orig/application/org.openjdk.jmc.console.twitter/src/main/java/org/openjdk/jmc/console/twitter/Tweeter.java 2018-10-02 14:13:12.843624641 -0400 ++++ jmc-7.0.0/application/org.openjdk.jmc.console.twitter/src/main/java/org/openjdk/jmc/console/twitter/Tweeter.java 1969-12-31 19:00:00.000000000 -0500 +@@ -1,96 +0,0 @@ +-/* +- * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. +- * +- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +- * +- * The contents of this file are subject to the terms of either the Universal Permissive License +- * v 1.0 as shown at http://oss.oracle.com/licenses/upl +- * +- * or the following license: +- * +- * Redistribution and use in source and binary forms, with or without modification, are permitted +- * provided that the following conditions are met: +- * +- * 1. Redistributions of source code must retain the above copyright notice, this list of conditions +- * and the following disclaimer. +- * +- * 2. Redistributions in binary form must reproduce the above copyright notice, this list of +- * conditions and the following disclaimer in the documentation and/or other materials provided with +- * the distribution. +- * +- * 3. Neither the name of the copyright holder nor the names of its contributors may be used to +- * endorse or promote products derived from this software without specific prior written permission. +- * +- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR +- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +- * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY +- * WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +- */ +-package org.openjdk.jmc.console.twitter; +- +-import org.eclipse.ui.IMemento; +- +-/** +- * Holds information about a user and it's access credentials. +- */ +-public final class Tweeter { +- +- private static final String TOKEN = "token"; //$NON-NLS-1$ +- private static final String TOKEN_SECRET = "tokenSecret"; //$NON-NLS-1$ +- private static final String USERNAME = "username"; //$NON-NLS-1$ +- +- private final String username; +- private final String token; +- private final String tokenSecret; +- +- public Tweeter(IMemento memento) { +- this(memento.getString(USERNAME), memento.getString(TOKEN), memento.getString(TOKEN_SECRET)); +- } +- +- public Tweeter(String username, String token, String tokenSecret) { +- this.username = username; +- this.token = token; +- this.tokenSecret = tokenSecret; +- } +- +- public String getUsername() { +- return username; +- } +- +- public String getToken() { +- return token; +- } +- +- public String getTokenSecret() { +- return tokenSecret; +- } +- +- public void saveState(IMemento memento) { +- memento.putString(USERNAME, username); +- memento.putString(TOKEN, token); +- memento.putString(TOKEN_SECRET, tokenSecret); +- } +- +- @Override +- public boolean equals(Object o) { +- if (o instanceof Tweeter) { +- Tweeter that = (Tweeter) o; +- return that.username.equals(username); +- } +- return false; +- } +- +- @Override +- public int hashCode() { +- return username.hashCode(); +- } +- +- @Override +- public String toString() { +- return username; +- } +-} +diff -Nur jmc-7.0.0-orig/application/org.openjdk.jmc.console.twitter/src/main/java/org/openjdk/jmc/console/twitter/TwitterPlugin.java jmc-7.0.0/application/org.openjdk.jmc.console.twitter/src/main/java/org/openjdk/jmc/console/twitter/TwitterPlugin.java +--- jmc-7.0.0-orig/application/org.openjdk.jmc.console.twitter/src/main/java/org/openjdk/jmc/console/twitter/TwitterPlugin.java 2018-10-02 14:13:12.843624641 -0400 ++++ jmc-7.0.0/application/org.openjdk.jmc.console.twitter/src/main/java/org/openjdk/jmc/console/twitter/TwitterPlugin.java 1969-12-31 19:00:00.000000000 -0500 +@@ -1,347 +0,0 @@ +-/* +- * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. +- * +- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +- * +- * The contents of this file are subject to the terms of either the Universal Permissive License +- * v 1.0 as shown at http://oss.oracle.com/licenses/upl +- * +- * or the following license: +- * +- * Redistribution and use in source and binary forms, with or without modification, are permitted +- * provided that the following conditions are met: +- * +- * 1. Redistributions of source code must retain the above copyright notice, this list of conditions +- * and the following disclaimer. +- * +- * 2. Redistributions in binary form must reproduce the above copyright notice, this list of +- * conditions and the following disclaimer in the documentation and/or other materials provided with +- * the distribution. +- * +- * 3. Neither the name of the copyright holder nor the names of its contributors may be used to +- * endorse or promote products derived from this software without specific prior written permission. +- * +- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR +- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +- * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY +- * WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +- */ +-package org.openjdk.jmc.console.twitter; +- +-import java.net.URI; +-import java.net.URISyntaxException; +-import java.util.ArrayList; +-import java.util.List; +-import java.util.logging.Level; +-import java.util.logging.Logger; +- +-import org.eclipse.core.net.proxy.IProxyChangeEvent; +-import org.eclipse.core.net.proxy.IProxyChangeListener; +-import org.eclipse.core.net.proxy.IProxyData; +-import org.eclipse.core.net.proxy.IProxyService; +-import org.eclipse.core.runtime.preferences.InstanceScope; +-import org.eclipse.jface.dialogs.MessageDialog; +-import org.eclipse.swt.program.Program; +-import org.eclipse.ui.IMemento; +-import org.eclipse.ui.XMLMemento; +-import org.eclipse.ui.plugin.AbstractUIPlugin; +-import org.osgi.framework.BundleContext; +-import org.osgi.service.prefs.BackingStoreException; +- +-import org.openjdk.jmc.rjmx.triggers.TriggerEvent; +-import org.openjdk.jmc.ui.misc.DialogToolkit; +-import org.openjdk.jmc.ui.misc.MementoToolkit; +- +-import twitter4j.Twitter; +-import twitter4j.TwitterException; +-import twitter4j.TwitterFactory; +-import twitter4j.auth.AccessToken; +-import twitter4j.auth.RequestToken; +-import twitter4j.conf.ConfigurationBuilder; +- +-/** +- * The activator class controls the plug-in life cycle for the Twitter plug-in.- +- */ +-public class TwitterPlugin extends AbstractUIPlugin { +- private static final String VARIABLE_VALUE = "{value}"; +- private static final String VARIABLE_STATE = "{state}"; +- +- private static final String TWEETERS_PREF_KEY = "tweeters"; +- private static final String TWEETER_TAG = "tweeter"; +- +- private static final String CONSUMER_KEY_PREF_KEY = "consumer_key"; +- private static final String CONSUMER_SECRET_PREF_KEY = "consumer_secret"; +- +- // The plug-in ID +- public static final String PLUGIN_ID = "org.openjdk.jmc.twitter"; //$NON-NLS-1$ +- +- final static Logger LOGGER = Logger.getLogger(PLUGIN_ID); +- +- // The shared instance +- private static TwitterPlugin plugin; +- +- private String consumerKey; +- private String consumerSecret; +- private List tweeters = new ArrayList<>(); +- private TwitterFactory twitterFactory; +- +- private final IProxyChangeListener proxyListener; +- private IProxyService proxyService; +- +- /** +- * The constructor +- */ +- public TwitterPlugin() { +- proxyListener = new IProxyChangeListener() { +- @Override +- public void proxyInfoChanged(IProxyChangeEvent event) { +- recreateFactory(); +- } +- }; +- } +- +- @Override +- public void start(BundleContext context) throws Exception { +- super.start(context); +- proxyService = setupProxyService(context); +- plugin = this; +- consumerKey = InstanceScope.INSTANCE.getNode(PLUGIN_ID).get(CONSUMER_KEY_PREF_KEY, null); +- consumerSecret = InstanceScope.INSTANCE.getNode(PLUGIN_ID).get(CONSUMER_SECRET_PREF_KEY, null); +- +- IMemento state = MementoToolkit +- .fromString(InstanceScope.INSTANCE.getNode(PLUGIN_ID).get(TWEETERS_PREF_KEY, null)); +- if (state != null) { +- for (IMemento tweeter : state.getChildren(TWEETER_TAG)) { +- tweeters.add(new Tweeter(tweeter)); +- } +- } +- twitterFactory = createTwitterFactory(); +- } +- +- private IProxyService setupProxyService(BundleContext context) { +- IProxyService service = context.getService(context.getServiceReference(IProxyService.class)); +- service.addProxyChangeListener(proxyListener); +- return service; +- } +- +- private TwitterFactory createTwitterFactory() { +- ConfigurationBuilder cb = new ConfigurationBuilder(); +- try { +- IProxyData[] data = proxyService.select(new URI("http://api.twitter.com")); //$NON-NLS-1$ +- String host = null; +- int port = -1; +- for (IProxyData proxyData : data) { +- if (proxyData.getHost() != null) { +- host = proxyData.getHost(); +- port = proxyData.getPort(); +- break; +- } +- } +- if (host != null) { +- cb.setHttpProxyHost(host); +- } +- if (port != -1) { +- +- cb.setHttpProxyPort(port); +- } else { +- cb.setHttpProxyPort(80); +- } +- } catch (URISyntaxException e) { +- // Should never happen... +- e.printStackTrace(); +- } +- return new TwitterFactory(cb.build()); +- } +- +- @Override +- public void stop(BundleContext context) throws Exception { +- try { +- plugin = null; +- proxyService.removeProxyChangeListener(proxyListener); +- proxyService = null; +- storeStateToPreferences(); +- } finally { +- // Implicitly stores preference store. +- super.stop(context); +- } +- } +- +- private void storeStateToPreferences() { +- XMLMemento tweeterState = XMLMemento.createWriteRoot("root"); +- for (Tweeter t : tweeters) { +- t.saveState(tweeterState.createChild(TWEETER_TAG)); +- } +- InstanceScope.INSTANCE.getNode(PLUGIN_ID).put(TWEETERS_PREF_KEY, MementoToolkit.asString(tweeterState)); +- if (consumerKey != null) { +- InstanceScope.INSTANCE.getNode(PLUGIN_ID).put(CONSUMER_KEY_PREF_KEY, consumerKey); +- } +- if (consumerSecret != null) { +- InstanceScope.INSTANCE.getNode(PLUGIN_ID).put(CONSUMER_SECRET_PREF_KEY, consumerSecret); +- } +- } +- +- /** +- * Returns the shared instance +- * +- * @return the shared instance +- */ +- public static TwitterPlugin getDefault() { +- return plugin; +- } +- +- public RequestToken authorize(Twitter twitter) { +- try { +- twitter.setOAuthConsumer(consumerKey, consumerSecret); +- } catch (IllegalStateException e) { +- // Using log level info, since it's probably only since this was done before. +- TwitterPlugin.LOGGER.log(Level.INFO, +- "Could not set OAuth Consumer. Most likely this has already been done before.", e); +- } +- RequestToken requestToken; +- try { +- requestToken = twitter.getOAuthRequestToken(); +- Program.launch(requestToken.getAuthorizationURL()); +- return requestToken; +- } catch (TwitterException e) { +- TwitterPlugin.LOGGER.log(Level.SEVERE, "Could not request token!", e); +- DialogToolkit.showException(null, "Problem when Authorizing", +- "Problem when trying to connect to Twitter for authorization. Check your network and proxy settings. If you make any changes, a restart may be required. \n\nException message: " +- + e.getMessage(), +- e); +- } +- return null; +- } +- +- public Tweeter getAuthorizedTweeter(String username) { +- for (Tweeter tweeter : tweeters) { +- if (username.equals(tweeter.getUsername())) { +- return tweeter; +- } +- } +- return null; +- } +- +- public void updateStatus(String username, String message) throws TwitterException { +- Tweeter tweeter = getAuthorizedTweeter(username); +- if (tweeter != null) { +- AccessToken at = createAccessToken(tweeter); +- Twitter twitter = twitterFactory.getInstance(); +- twitter.setOAuthConsumer(consumerKey, consumerSecret); +- twitter.setOAuthAccessToken(at); +- twitter.updateStatus(message); +- return; +- } else { +- throw new TwitterException(String.format( +- "Attempted to update status for an account not defined in the preferences. Please set up the account (%s) in preferences first.", +- username)); +- } +- } +- +- private AccessToken createAccessToken(Tweeter tweeter) { +- return new AccessToken(tweeter.getToken(), tweeter.getTokenSecret()); +- } +- +- public void addTweeter(Twitter twitter, RequestToken rt, String pin) { +- try { +- AccessToken accessToken; +- if (pin.length() > 0) { +- accessToken = twitter.getOAuthAccessToken(rt, pin); +- } else { +- accessToken = twitter.getOAuthAccessToken(); +- } +- +- String screenName = accessToken.getScreenName(); +- if (screenName != null && screenName.length() > 0) { +- Tweeter tweeter = new Tweeter(accessToken.getScreenName(), accessToken.getToken(), +- accessToken.getTokenSecret()); +- if (!tweeters.contains(tweeter)) { +- tweeters.add(tweeter); +- } +- storeAndSavePrefs(); +- } else { +- DialogToolkit.showError(null, "Invalid User", "The authorized user is invalid."); +- } +- MessageDialog.openInformation(null, "Twitter Authorization", +- "Access credentials created successfully for user " + screenName + "."); +- } catch (TwitterException ex) { +- DialogToolkit.showException(null, "Error storing access token", ex); +- } +- } +- +- private void storeAndSavePrefs() { +- storeStateToPreferences(); +- try { +- InstanceScope.INSTANCE.getNode(PLUGIN_ID).flush(); +- } catch (BackingStoreException e) { +- getLogger().log(Level.WARNING, "Failed to store to preferences!", e); +- } +- } +- +- public void setConsumerKeyAndSecret(String consumerKey, String consumerSecret) { +- this.consumerKey = consumerKey; +- this.consumerSecret = consumerSecret; +- storeAndSavePrefs(); +- } +- +- public void removeTweeter(Tweeter tweeter) { +- tweeters.remove(tweeter); +- } +- +- public List getTweeters() { +- return tweeters; +- } +- +- public Twitter getTwitter() { +- return twitterFactory.getInstance(); +- } +- +- public Logger getLogger() { +- return LOGGER; +- } +- +- public void sendDirectMessage(String from, String to, String message) throws Exception { +- Tweeter tweeter = getAuthorizedTweeter(from); +- if (tweeter != null) { +- AccessToken at = createAccessToken(tweeter); +- Twitter twitter = twitterFactory.getInstance(); +- twitter.setOAuthConsumer(consumerKey, consumerSecret); +- twitter.setOAuthAccessToken(at); +- twitter.sendDirectMessage(to, message); +- } else { +- throw new Exception(String.format( +- "Attempted to send direct message from account not defined in the preferences. Please set up the account (%s) in preferences first.", +- from)); +- } +- } +- +- private void recreateFactory() { +- twitterFactory = createTwitterFactory(); +- } +- +- public static String createMessage(String msg, TriggerEvent event) { +- String result = msg.replace(VARIABLE_STATE, getStateString(event)); +- result = result.replace(VARIABLE_VALUE, String.valueOf(event.getTriggerValue())); +- if (result.length() > 140) { +- result = result.substring(0, 137) + "..."; +- } +- return result; +- } +- +- private static String getStateString(TriggerEvent event) { +- return event.wasTriggered() ? "triggered" : "recovered"; +- } +- +- public boolean verifyAuthorizedUser(String username) { +- if (getAuthorizedTweeter(username) != null) { +- return true; +- } else { +- DialogToolkit.showError(null, "Unauthorized Twitter User", +- "User " + username + " has not been authorized in Preferences"); +- return false; +- } +- } +-} +diff -Nur jmc-7.0.0-orig/application/org.openjdk.jmc.console.twitter/src/main/java/org/openjdk/jmc/console/twitter/TwitterPreferencePage.java jmc-7.0.0/application/org.openjdk.jmc.console.twitter/src/main/java/org/openjdk/jmc/console/twitter/TwitterPreferencePage.java +--- jmc-7.0.0-orig/application/org.openjdk.jmc.console.twitter/src/main/java/org/openjdk/jmc/console/twitter/TwitterPreferencePage.java 2018-10-02 14:13:12.843624641 -0400 ++++ jmc-7.0.0/application/org.openjdk.jmc.console.twitter/src/main/java/org/openjdk/jmc/console/twitter/TwitterPreferencePage.java 1969-12-31 19:00:00.000000000 -0500 +@@ -1,259 +0,0 @@ +-/* +- * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. +- * +- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +- * +- * The contents of this file are subject to the terms of either the Universal Permissive License +- * v 1.0 as shown at http://oss.oracle.com/licenses/upl +- * +- * or the following license: +- * +- * Redistribution and use in source and binary forms, with or without modification, are permitted +- * provided that the following conditions are met: +- * +- * 1. Redistributions of source code must retain the above copyright notice, this list of conditions +- * and the following disclaimer. +- * +- * 2. Redistributions in binary form must reproduce the above copyright notice, this list of +- * conditions and the following disclaimer in the documentation and/or other materials provided with +- * the distribution. +- * +- * 3. Neither the name of the copyright holder nor the names of its contributors may be used to +- * endorse or promote products derived from this software without specific prior written permission. +- * +- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR +- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +- * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY +- * WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +- */ +-package org.openjdk.jmc.console.twitter; +- +-import org.eclipse.jface.preference.PreferencePage; +-import org.eclipse.jface.resource.ImageDescriptor; +-import org.eclipse.jface.viewers.ArrayContentProvider; +-import org.eclipse.jface.viewers.ColumnWeightData; +-import org.eclipse.jface.viewers.ISelectionChangedListener; +-import org.eclipse.jface.viewers.IStructuredSelection; +-import org.eclipse.jface.viewers.SelectionChangedEvent; +-import org.eclipse.jface.viewers.TableLayout; +-import org.eclipse.jface.viewers.TableViewer; +-import org.eclipse.swt.SWT; +-import org.eclipse.swt.events.ModifyEvent; +-import org.eclipse.swt.events.ModifyListener; +-import org.eclipse.swt.events.SelectionAdapter; +-import org.eclipse.swt.events.SelectionEvent; +-import org.eclipse.swt.layout.GridData; +-import org.eclipse.swt.layout.GridLayout; +-import org.eclipse.swt.widgets.Button; +-import org.eclipse.swt.widgets.Composite; +-import org.eclipse.swt.widgets.Control; +-import org.eclipse.swt.widgets.Label; +-import org.eclipse.swt.widgets.Table; +-import org.eclipse.swt.widgets.TableColumn; +-import org.eclipse.swt.widgets.Text; +-import org.eclipse.ui.IWorkbench; +-import org.eclipse.ui.IWorkbenchPreferencePage; +- +-import twitter4j.Twitter; +-import twitter4j.auth.RequestToken; +- +-/** +- * Preference page that configures {@link TwitterPlugin} +- */ +-public class TwitterPreferencePage extends PreferencePage implements IWorkbenchPreferencePage { +- private Text m_pin; +- private Text m_consumerKey; +- private Text m_consumerSecret; +- private Button finishButton; +- private RequestToken m_requestToken; +- private Control m_authorizationButton; +- private Twitter m_twitter; +- private TableViewer m_viewer; +- private Control m_removeButton; +- +- public TwitterPreferencePage() { +- +- } +- +- public TwitterPreferencePage(String title) { +- super(title); +- } +- +- public TwitterPreferencePage(String title, ImageDescriptor image) { +- super(title, image); +- } +- +- @Override +- public void init(IWorkbench workbench) { +- +- } +- +- @Override +- protected Control createContents(Composite parent) { +- resetTwitter(); +- +- Composite container = new Composite(parent, SWT.NONE); +- container.setLayout(new GridLayout(3, false)); +- +- writeText(container, +- "Before an application, like JDK Mission Control, is allowed to tweet, the application needs to be authorized."); +- writeText(container, +- "You must first set up your own new 'Application' in Twitter (apps.twitter.com) which Mission Control will use to post from. Enter the Consumer Key and Secret for your application below."); +- writeText(container, +- "Finally click Authorize to start authorization. A web browser will appear where you will grant Mission Control permission. The Twitter user you log in as in the web browser will be the one you can use from within Mission Control."); +- +- m_consumerKey = createMandatoryTextField(container, "Consumer Key:", 2); +- m_consumerSecret = createMandatoryTextField(container, "Consumer Secret:", 2); +- +- GridData gd2 = new GridData(SWT.FILL, SWT.FILL, false, false); +- m_authorizationButton = createAuthorizeButton(container); +- m_authorizationButton.setLayoutData(gd2); +- +- writeText(container, "Then enter the PIN that is shown in the web browser and click Add."); +- +- m_pin = createMandatoryTextField(container, "PIN:", 1); +- m_pin.setEnabled(false); +- GridData gd4 = new GridData(SWT.FILL, SWT.FILL, false, false); +- finishButton = createAddButton(container); +- finishButton.setLayoutData(gd4); +- finishButton.setEnabled(false); +- +- writeText(container, "Authorized Users:"); +- GridData gd10 = new GridData(SWT.FILL, SWT.FILL, true, true); +- gd10.horizontalSpan = 2; +- gd10.verticalSpan = 2; +- m_viewer = createTableViewer(container); +- m_viewer.getControl().setLayoutData(gd10); +- +- GridData gd11 = new GridData(SWT.FILL, SWT.BEGINNING, false, false); +- gd11.verticalSpan = 2; +- m_removeButton = createRemoveButton(container); +- m_removeButton.setLayoutData(gd11); +- m_removeButton.setEnabled(false); +- hookViewerRefresh(); +- +- return container; +- } +- +- private Text createMandatoryTextField(Composite container, String caption, int textSpan) { +- GridData gdLabel = new GridData(SWT.FILL, SWT.CENTER, false, false); +- Label label = new Label(container, SWT.NONE); +- label.setText(caption); +- label.setLayoutData(gdLabel); +- GridData gdField = new GridData(SWT.FILL, SWT.FILL, true, false); +- gdField.horizontalSpan = textSpan; +- Text field = createTextField(container); +- field.setLayoutData(gdField); +- return field; +- } +- +- private void resetTwitter() { +- m_twitter = TwitterPlugin.getDefault().getTwitter(); +- m_requestToken = null; +- } +- +- void updateEnablement() { +- m_removeButton.setEnabled(TwitterPlugin.getDefault().getTweeters().size() > 0); +- } +- +- private void hookViewerRefresh() { +- m_viewer.addSelectionChangedListener(new ISelectionChangedListener() { +- @Override +- public void selectionChanged(SelectionChangedEvent event) { +- updateEnablement(); +- } +- }); +- } +- +- private Button createRemoveButton(Composite container) { +- Button b = new Button(container, SWT.NONE); +- b.setText("Remove"); +- b.addSelectionListener(new SelectionAdapter() { +- @Override +- public void widgetSelected(SelectionEvent e) { +- IStructuredSelection ss = (IStructuredSelection) m_viewer.getSelection(); +- if (!ss.isEmpty()) { +- TwitterPlugin.getDefault().removeTweeter((Tweeter) ss.getFirstElement()); +- m_viewer.refresh(); +- } +- } +- }); +- return b; +- } +- +- private TableViewer createTableViewer(Composite parent) { +- Table table = new Table(parent, SWT.BORDER | SWT.FULL_SELECTION | SWT.SINGLE); +- table.setLinesVisible(true); +- +- final TableViewer viewer = new TableViewer(table); +- new TableColumn(table, SWT.NONE); +- TableLayout tl = new TableLayout(); +- tl.addColumnData(new ColumnWeightData(1)); +- table.setLayout(tl); +- viewer.setContentProvider(new ArrayContentProvider()); +- viewer.setInput(TwitterPlugin.getDefault().getTweeters()); +- return viewer; +- } +- +- @Override +- public boolean performOk() { +- return true; +- } +- +- private void writeText(Composite parent, String text) { +- GridData gd0 = new GridData(SWT.FILL, SWT.FILL, false, false); +- gd0.horizontalSpan = 3; +- gd0.widthHint = 200; +- Label desc = new Label(parent, SWT.WRAP); +- desc.setText(text); +- desc.setLayoutData(gd0); +- } +- +- private Text createTextField(Composite container) { +- final Text t = new Text(container, SWT.BORDER); +- t.addModifyListener(new ModifyListener() { +- +- @Override +- public void modifyText(ModifyEvent e) { +- finishButton.setEnabled(t.getText().length() > 0); +- } +- }); +- return t; +- } +- +- private Button createAddButton(final Composite container) { +- Button b = new Button(container, SWT.NONE); +- b.setText("Add"); +- b.addSelectionListener(new SelectionAdapter() { +- @Override +- public void widgetSelected(SelectionEvent e) { +- TwitterPlugin.getDefault().addTweeter(m_twitter, m_requestToken, m_pin.getText().trim()); +- m_pin.setText(""); +- m_viewer.refresh(); +- } +- }); +- return b; +- } +- +- private Button createAuthorizeButton(Composite container) { +- Button b = new Button(container, SWT.NONE); +- b.setText("Authorize"); +- b.addSelectionListener(new SelectionAdapter() { +- @Override +- public void widgetSelected(SelectionEvent e) { +- resetTwitter(); +- TwitterPlugin.getDefault().setConsumerKeyAndSecret(m_consumerKey.getText().trim(), +- m_consumerSecret.getText().trim()); +- m_requestToken = TwitterPlugin.getDefault().authorize(m_twitter); +- boolean enabled = m_requestToken != null; +- finishButton.setEnabled(enabled); +- m_pin.setEnabled(enabled); +- } +- }); +- return b; +- } +-} +diff -Nur jmc-7.0.0-orig/application/org.openjdk.jmc.console.twitter/src/main/java/org/openjdk/jmc/console/twitter/UpdateStatus.java jmc-7.0.0/application/org.openjdk.jmc.console.twitter/src/main/java/org/openjdk/jmc/console/twitter/UpdateStatus.java +--- jmc-7.0.0-orig/application/org.openjdk.jmc.console.twitter/src/main/java/org/openjdk/jmc/console/twitter/UpdateStatus.java 2018-10-02 14:13:12.843624641 -0400 ++++ jmc-7.0.0/application/org.openjdk.jmc.console.twitter/src/main/java/org/openjdk/jmc/console/twitter/UpdateStatus.java 1969-12-31 19:00:00.000000000 -0500 +@@ -1,70 +0,0 @@ +-/* +- * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. +- * +- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +- * +- * The contents of this file are subject to the terms of either the Universal Permissive License +- * v 1.0 as shown at http://oss.oracle.com/licenses/upl +- * +- * or the following license: +- * +- * Redistribution and use in source and binary forms, with or without modification, are permitted +- * provided that the following conditions are met: +- * +- * 1. Redistributions of source code must retain the above copyright notice, this list of conditions +- * and the following disclaimer. +- * +- * 2. Redistributions in binary form must reproduce the above copyright notice, this list of +- * conditions and the following disclaimer in the documentation and/or other materials provided with +- * the distribution. +- * +- * 3. Neither the name of the copyright holder nor the names of its contributors may be used to +- * endorse or promote products derived from this software without specific prior written permission. +- * +- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR +- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +- * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY +- * WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +- */ +-package org.openjdk.jmc.console.twitter; +- +-import org.openjdk.jmc.rjmx.IConnectionHandle; +-import org.openjdk.jmc.rjmx.triggers.IActivatableTriggerAction; +-import org.openjdk.jmc.rjmx.triggers.TriggerAction; +-import org.openjdk.jmc.rjmx.triggers.TriggerEvent; +- +-import twitter4j.TwitterException; +- +-/** +- * Action that updates the status. +- */ +-public class UpdateStatus extends TriggerAction implements IActivatableTriggerAction { +- private static final String USERNAME_FIELD = "username"; //$NON-NLS-1$ +- private static final String MESSAGE_FIELD = "message"; //$NON-NLS-1$ +- +- public UpdateStatus() { +- // Do nothing +- } +- +- @Override +- public void handleNotificationEvent(TriggerEvent event) throws TwitterException { +- String username = getSetting(USERNAME_FIELD).getString(); +- String message = TwitterPlugin.createMessage(getSetting(MESSAGE_FIELD).getString(), event); +- if (username != null && message != null) { +- updateStatus(username, message); +- } +- } +- +- private void updateStatus(String username, String message) throws TwitterException { +- TwitterPlugin.getDefault().updateStatus(username, message); +- } +- +- @Override +- public boolean isActivatable(IConnectionHandle handle) { +- return TwitterPlugin.getDefault().verifyAuthorizedUser(getSetting(USERNAME_FIELD).getString()); +- } +-} +diff -Nur jmc-7.0.0-orig/application/org.openjdk.jmc.feature.twitter/build.properties jmc-7.0.0/application/org.openjdk.jmc.feature.twitter/build.properties +--- jmc-7.0.0-orig/application/org.openjdk.jmc.feature.twitter/build.properties 2018-10-02 14:13:12.860624547 -0400 ++++ jmc-7.0.0/application/org.openjdk.jmc.feature.twitter/build.properties 1969-12-31 19:00:00.000000000 -0500 +@@ -1,36 +0,0 @@ +-# +-# Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. +-# +-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +-# +-# The contents of this file are subject to the terms of either the Universal Permissive License +-# v 1.0 as shown at http://oss.oracle.com/licenses/upl +-# +-# or the following license: +-# +-# Redistribution and use in source and binary forms, with or without modification, are permitted +-# provided that the following conditions are met: +-# +-# 1. Redistributions of source code must retain the above copyright notice, this list of conditions +-# and the following disclaimer. +-# +-# 2. Redistributions in binary form must reproduce the above copyright notice, this list of +-# conditions and the following disclaimer in the documentation and/or other materials provided with +-# the distribution. +-# +-# 3. Neither the name of the copyright holder nor the names of its contributors may be used to +-# endorse or promote products derived from this software without specific prior written permission. +-# +-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR +-# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +-# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +-# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +-# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +-# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY +-# WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +-# +-bin.includes = feature.xml,\ +- feature.properties +-pde.match.rule.feature=compatible +-pde.match.rule.bundle=compatible +diff -Nur jmc-7.0.0-orig/application/org.openjdk.jmc.feature.twitter/feature.properties jmc-7.0.0/application/org.openjdk.jmc.feature.twitter/feature.properties +--- jmc-7.0.0-orig/application/org.openjdk.jmc.feature.twitter/feature.properties 2018-10-02 14:13:12.860624547 -0400 ++++ jmc-7.0.0/application/org.openjdk.jmc.feature.twitter/feature.properties 1969-12-31 19:00:00.000000000 -0500 +@@ -1,37 +0,0 @@ +-# +-# Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. +-# +-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +-# +-# The contents of this file are subject to the terms of either the Universal Permissive License +-# v 1.0 as shown at http://oss.oracle.com/licenses/upl +-# +-# or the following license: +-# +-# Redistribution and use in source and binary forms, with or without modification, are permitted +-# provided that the following conditions are met: +-# +-# 1. Redistributions of source code must retain the above copyright notice, this list of conditions +-# and the following disclaimer. +-# +-# 2. Redistributions in binary form must reproduce the above copyright notice, this list of +-# conditions and the following disclaimer in the documentation and/or other materials provided with +-# the distribution. +-# +-# 3. Neither the name of the copyright holder nor the names of its contributors may be used to +-# endorse or promote products derived from this software without specific prior written permission. +-# +-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR +-# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +-# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +-# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +-# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +-# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY +-# WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +-# +-name=Twitter Action +-provider=Oracle Corporation +-copyright=Copyright \u00A9 2018, Oracle and/or its affiliates. All rights reserved. +-description=This feature makes a twitter action available among the trigger actions. A user defined message will be tweeted whenever a rule with this action triggers. +-descriptionUrl=http://www.oracle.com/missioncontrol +diff -Nur jmc-7.0.0-orig/application/org.openjdk.jmc.feature.twitter/feature.xml jmc-7.0.0/application/org.openjdk.jmc.feature.twitter/feature.xml +--- jmc-7.0.0-orig/application/org.openjdk.jmc.feature.twitter/feature.xml 2018-10-02 14:13:12.860624547 -0400 ++++ jmc-7.0.0/application/org.openjdk.jmc.feature.twitter/feature.xml 1969-12-31 19:00:00.000000000 -0500 +@@ -1,73 +0,0 @@ +- +- +- +- +- +- %description +- +- +- +- %copyright +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +\ No newline at end of file +diff -Nur jmc-7.0.0-orig/application/org.openjdk.jmc.feature.twitter/pom.xml jmc-7.0.0/application/org.openjdk.jmc.feature.twitter/pom.xml +--- jmc-7.0.0-orig/application/org.openjdk.jmc.feature.twitter/pom.xml 2018-10-02 14:13:12.860624547 -0400 ++++ jmc-7.0.0/application/org.openjdk.jmc.feature.twitter/pom.xml 1969-12-31 19:00:00.000000000 -0500 +@@ -1,44 +0,0 @@ +- +- +- +- 4.0.0 +- +- org.openjdk.jmc +- missioncontrol.application +- 7.0.0-SNAPSHOT +- +- org.openjdk.jmc.feature.twitter +- 1.0.2-SNAPSHOT +- eclipse-feature +- +diff -Nur jmc-7.0.0-orig/application/org.openjdk.jmc.feature.twitter/.project jmc-7.0.0/application/org.openjdk.jmc.feature.twitter/.project +--- jmc-7.0.0-orig/application/org.openjdk.jmc.feature.twitter/.project 2018-10-02 14:13:12.860624547 -0400 ++++ jmc-7.0.0/application/org.openjdk.jmc.feature.twitter/.project 1969-12-31 19:00:00.000000000 -0500 +@@ -1,23 +0,0 @@ +- +- +- org.openjdk.jmc.feature.twitter +- +- +- +- +- +- org.eclipse.pde.FeatureBuilder +- +- +- +- +- org.eclipse.m2e.core.maven2Builder +- +- +- +- +- +- org.eclipse.m2e.core.maven2Nature +- org.eclipse.pde.FeatureNature +- +- +diff -Nur jmc-7.0.0-orig/application/org.openjdk.jmc.rjmx/META-INF/MANIFEST.MF jmc-7.0.0/application/org.openjdk.jmc.rjmx/META-INF/MANIFEST.MF +--- jmc-7.0.0-orig/application/org.openjdk.jmc.rjmx/META-INF/MANIFEST.MF 2018-10-02 14:13:12.918624226 -0400 ++++ jmc-7.0.0/application/org.openjdk.jmc.rjmx/META-INF/MANIFEST.MF 2018-10-02 14:13:27.922541079 -0400 +@@ -54,7 +54,6 @@ + org.openjdk.jmc.rjmx.triggers; + x-friends:="org.openjdk.jmc.console.ui.notification, + org.openjdk.jmc.alert, +- org.openjdk.jmc.console.twitter, + org.openjdk.jmc.rjmx.test", + org.openjdk.jmc.rjmx.triggers.actions.internal;x-friends:="org.openjdk.jmc.console.ui.notification", + org.openjdk.jmc.rjmx.triggers.condition.internal;x-friends:="org.openjdk.jmc.console.ui.notification,org.openjdk.jmc.test.jemmy", +diff -Nur jmc-7.0.0-orig/application/org.openjdk.jmc.updatesite.ide/category.xml jmc-7.0.0/application/org.openjdk.jmc.updatesite.ide/category.xml +--- jmc-7.0.0-orig/application/org.openjdk.jmc.updatesite.ide/category.xml 2018-10-02 14:13:12.944624082 -0400 ++++ jmc-7.0.0/application/org.openjdk.jmc.updatesite.ide/category.xml 2018-10-02 14:13:27.923541073 -0400 +@@ -55,10 +55,6 @@ + id="org.openjdk.jmc.feature.console.ui.subscriptions" version="0.0.0"> + + +- +- +- + +diff -Nur jmc-7.0.0-orig/application/org.openjdk.jmc.updatesite.ide/feature.xml jmc-7.0.0/application/org.openjdk.jmc.updatesite.ide/feature.xml +--- jmc-7.0.0-orig/application/org.openjdk.jmc.updatesite.ide/feature.xml 2018-10-02 14:13:12.944624082 -0400 ++++ jmc-7.0.0/application/org.openjdk.jmc.updatesite.ide/feature.xml 2018-10-02 14:13:27.923541073 -0400 +@@ -67,10 +67,6 @@ + version="0.0.0"/> + + +- +- + +diff -Nur jmc-7.0.0-orig/application/org.openjdk.jmc.updatesite.rcp/category.xml jmc-7.0.0/application/org.openjdk.jmc.updatesite.rcp/category.xml +--- jmc-7.0.0-orig/application/org.openjdk.jmc.updatesite.rcp/category.xml 2018-10-02 14:13:12.945624076 -0400 ++++ jmc-7.0.0/application/org.openjdk.jmc.updatesite.rcp/category.xml 2018-10-02 14:13:27.924541068 -0400 +@@ -55,10 +55,6 @@ + id="org.openjdk.jmc.feature.console.ui.subscriptions" version="0.0.0"> + + +- +- +- + +diff -Nur jmc-7.0.0-orig/application/org.openjdk.jmc.updatesite.rcp/feature.xml jmc-7.0.0/application/org.openjdk.jmc.updatesite.rcp/feature.xml +--- jmc-7.0.0-orig/application/org.openjdk.jmc.updatesite.rcp/feature.xml 2018-10-02 14:13:12.945624076 -0400 ++++ jmc-7.0.0/application/org.openjdk.jmc.updatesite.rcp/feature.xml 2018-10-02 14:13:27.924541068 -0400 +@@ -67,10 +67,6 @@ + version="0.0.0"/> + + +- +- + +diff -Nur jmc-7.0.0-orig/application/pom.xml jmc-7.0.0/application/pom.xml +--- jmc-7.0.0-orig/application/pom.xml 2018-10-02 14:13:12.810624824 -0400 ++++ jmc-7.0.0/application/pom.xml 2018-10-02 14:13:27.924541068 -0400 +@@ -50,7 +50,6 @@ + org.openjdk.jmc.console.jconsole + org.openjdk.jmc.console.pde + org.openjdk.jmc.console.persistence +- org.openjdk.jmc.console.twitter + org.openjdk.jmc.console.ui + org.openjdk.jmc.console.ui.diagnostic + org.openjdk.jmc.console.ui.mbeanbrowser +@@ -72,7 +71,6 @@ + org.openjdk.jmc.feature.pde + org.openjdk.jmc.feature.rcp + org.openjdk.jmc.feature.rcp.update +- org.openjdk.jmc.feature.twitter + org.openjdk.jmc.flightrecorder.configuration + org.openjdk.jmc.flightrecorder.controlpanel.ui + org.openjdk.jmc.flightrecorder.controlpanel.ui.configuration +diff -Nur "jmc-7.0.0-orig/configuration/ide/eclipse/launchers/JMC Eclipse plug-ins.launch" "jmc-7.0.0/configuration/ide/eclipse/launchers/JMC Eclipse plug-ins.launch" +--- "jmc-7.0.0-orig/configuration/ide/eclipse/launchers/JMC Eclipse plug-ins.launch" 2018-10-02 14:13:12.946624070 -0400 ++++ "jmc-7.0.0/configuration/ide/eclipse/launchers/JMC Eclipse plug-ins.launch" 2018-10-02 14:13:27.925541063 -0400 +@@ -105,7 +105,6 @@ + + + +- + + + +diff -Nur "jmc-7.0.0-orig/configuration/ide/eclipse/launchers/JMC RCP plug-ins.launch" "jmc-7.0.0/configuration/ide/eclipse/launchers/JMC RCP plug-ins.launch" +--- "jmc-7.0.0-orig/configuration/ide/eclipse/launchers/JMC RCP plug-ins.launch" 2018-10-02 14:13:12.946624070 -0400 ++++ "jmc-7.0.0/configuration/ide/eclipse/launchers/JMC RCP plug-ins.launch" 2018-10-02 14:13:27.925541063 -0400 +@@ -86,7 +86,6 @@ + + + +- + + + +diff -Nur "jmc-7.0.0-orig/configuration/ide/eclipse/launchers/Remote RCP Debugging.launch" "jmc-7.0.0/configuration/ide/eclipse/launchers/Remote RCP Debugging.launch" +--- "jmc-7.0.0-orig/configuration/ide/eclipse/launchers/Remote RCP Debugging.launch" 2018-10-02 14:13:12.946624070 -0400 ++++ "jmc-7.0.0/configuration/ide/eclipse/launchers/Remote RCP Debugging.launch" 2018-10-02 14:13:27.925541063 -0400 +@@ -39,7 +39,7 @@ + + + +- ++ + + + +diff -Nur jmc-7.0.0-orig/license/THIRDPARTYREADME.txt jmc-7.0.0/license/THIRDPARTYREADME.txt +--- jmc-7.0.0-orig/license/THIRDPARTYREADME.txt 2018-10-02 14:13:12.980623882 -0400 ++++ jmc-7.0.0/license/THIRDPARTYREADME.txt 2018-10-02 14:13:27.926541057 -0400 +@@ -367,187 +367,3 @@ + STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + OF THE POSSIBILITY OF SUCH DAMAGE. +- +- +-%% The following notice is provided with respect to Twitter4J 4.0.6, +-which may be included with this product. +- +- +- 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. +- +-Twitter4J SUBCOMPONENTS: +- +-Twitter4J includes software from JSON.org to parse JSON response from the Twitter API. You can see the license term at http://www.JSON.org/license.html +diff -Nur jmc-7.0.0-orig/releng/platform-definitions/platform-definition-oxygen/platform-definition-oxygen.target jmc-7.0.0/releng/platform-definitions/platform-definition-oxygen/platform-definition-oxygen.target +--- jmc-7.0.0-orig/releng/platform-definitions/platform-definition-oxygen/platform-definition-oxygen.target 2018-10-02 14:13:12.767625062 -0400 ++++ jmc-7.0.0/releng/platform-definitions/platform-definition-oxygen/platform-definition-oxygen.target 2018-10-02 14:16:24.041564980 -0400 +@@ -40,7 +40,6 @@ + + + +- + + + +diff -Nur jmc-7.0.0-orig/releng/platform-definitions/platform-definition-photon/platform-definition-photon.target jmc-7.0.0/releng/platform-definitions/platform-definition-photon/platform-definition-photon.target +--- jmc-7.0.0-orig/releng/platform-definitions/platform-definition-photon/platform-definition-photon.target 2018-10-02 14:13:12.768625056 -0400 ++++ jmc-7.0.0/releng/platform-definitions/platform-definition-photon/platform-definition-photon.target 2018-10-02 14:16:12.568628607 -0400 +@@ -40,7 +40,6 @@ + + + +- + + + +diff -Nur jmc-7.0.0-orig/releng/third-party/pom.xml jmc-7.0.0/releng/third-party/pom.xml +--- jmc-7.0.0-orig/releng/third-party/pom.xml 2018-10-02 14:13:12.768625056 -0400 ++++ jmc-7.0.0/releng/third-party/pom.xml 2018-10-02 14:13:27.926541057 -0400 +@@ -53,9 +53,6 @@ + + + +- org.twitter4j:twitter4j-core:4.0.6 +- +- + javax.mail:mailapi:1.4 + true + diff --git a/jmc/1_local_osgi.patch b/jmc/1_local_osgi.patch new file mode 100644 index 0000000..79ea9af --- /dev/null +++ b/jmc/1_local_osgi.patch @@ -0,0 +1,84 @@ +diff -Nur jmc-7.0.0-orig/application/org.openjdk.jmc.console.ui/META-INF/MANIFEST.MF jmc-7.0.0/application/org.openjdk.jmc.console.ui/META-INF/MANIFEST.MF +--- jmc-7.0.0-orig/application/org.openjdk.jmc.console.ui/META-INF/MANIFEST.MF 2018-10-02 14:19:19.088594234 -0400 ++++ jmc-7.0.0/application/org.openjdk.jmc.console.ui/META-INF/MANIFEST.MF 2018-10-02 14:21:09.728980661 -0400 +@@ -10,7 +10,7 @@ + Require-Bundle: org.openjdk.jmc.rjmx.ui;visibility:=reexport, + org.eclipse.e4.core.contexts;bundle-version="1.3.0", + org.eclipse.e4.core.di;bundle-version="1.3.0";visibility:=reexport, +- javax.annotation;bundle-version="1.0.0";visibility:=reexport, ++ javax.annotation;bundle-version="1.2.1";visibility:=reexport, + javax.inject;bundle-version="1.0.0";visibility:=reexport, + org.openjdk.jmc.commands + Bundle-ActivationPolicy: lazy +@@ -22,7 +22,7 @@ + org.openjdk.jmc.console.ui.editor, + org.openjdk.jmc.console.ui.editor.internal;x-friends:="org.openjdk.jmc.console.ui.mbeanbrowser,org.openjdk.jmc.rcp.intro" + Bundle-ClassPath: . +-Import-Package: javax.annotation;version="1.0.0", ++Import-Package: javax.annotation;version="1.2.1", + javax.inject;version="1.0.0" + Automatic-Module-Name: org.openjdk.jmc.console.ui + +diff -Nur jmc-7.0.0-orig/releng/platform-definitions/platform-definition-oxygen/platform-definition-oxygen.target jmc-7.0.0/releng/platform-definitions/platform-definition-oxygen/platform-definition-oxygen.target +--- jmc-7.0.0-orig/releng/platform-definitions/platform-definition-oxygen/platform-definition-oxygen.target 2018-10-02 14:19:19.005594694 -0400 ++++ jmc-7.0.0/releng/platform-definitions/platform-definition-oxygen/platform-definition-oxygen.target 2018-10-02 14:23:14.663287807 -0400 +@@ -32,27 +32,5 @@ + WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + --> + +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- + + +diff -Nur jmc-7.0.0-orig/releng/platform-definitions/platform-definition-photon/platform-definition-photon.target jmc-7.0.0/releng/platform-definitions/platform-definition-photon/platform-definition-photon.target +--- jmc-7.0.0-orig/releng/platform-definitions/platform-definition-photon/platform-definition-photon.target 2018-10-02 14:19:19.006594689 -0400 ++++ jmc-7.0.0/releng/platform-definitions/platform-definition-photon/platform-definition-photon.target 2018-10-02 14:22:51.447416561 -0400 +@@ -32,28 +32,5 @@ + WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + --> + +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- + + diff --git a/jmc/2_javamail.patch b/jmc/2_javamail.patch new file mode 100644 index 0000000..7a0e145 --- /dev/null +++ b/jmc/2_javamail.patch @@ -0,0 +1,73 @@ +diff -Nur jmc-7.0.0-orig/application/org.openjdk.jmc.feature.core/feature.xml jmc-7.0.0/application/org.openjdk.jmc.feature.core/feature.xml +--- jmc-7.0.0-orig/application/org.openjdk.jmc.feature.core/feature.xml 2018-10-02 14:24:20.879920610 -0400 ++++ jmc-7.0.0/application/org.openjdk.jmc.feature.core/feature.xml 2018-10-02 14:26:28.039215412 -0400 +@@ -161,38 +161,38 @@ + unpack="false"/> + + + + + + + + + + + +- +\ No newline at end of file ++ +diff -Nur jmc-7.0.0-orig/releng/third-party/pom.xml jmc-7.0.0/releng/third-party/pom.xml +--- jmc-7.0.0-orig/releng/third-party/pom.xml 2018-10-02 14:24:20.790921103 -0400 ++++ jmc-7.0.0/releng/third-party/pom.xml 2018-10-02 14:28:21.894584017 -0400 +@@ -61,16 +61,16 @@ + + + +- javax.mail:imap:1.4 ++ com.sun.mail:imap:1.4 + + +- javax.mail:pop3:1.4 ++ com.sun.mail:pop3:1.4 + + +- javax.mail:smtp:1.4 ++ com.sun.mail:smtp:1.4 + + +- javax.mail:dsn:1.4 ++ com.sun.mail:dsn:1.4 + + + org.owasp.encoder:encoder:1.2.1 diff --git a/jmc/javamail.patch b/jmc/javamail.patch deleted file mode 100644 index 7a0e145..0000000 --- a/jmc/javamail.patch +++ /dev/null @@ -1,73 +0,0 @@ -diff -Nur jmc-7.0.0-orig/application/org.openjdk.jmc.feature.core/feature.xml jmc-7.0.0/application/org.openjdk.jmc.feature.core/feature.xml ---- jmc-7.0.0-orig/application/org.openjdk.jmc.feature.core/feature.xml 2018-10-02 14:24:20.879920610 -0400 -+++ jmc-7.0.0/application/org.openjdk.jmc.feature.core/feature.xml 2018-10-02 14:26:28.039215412 -0400 -@@ -161,38 +161,38 @@ - unpack="false"/> - - - - - - - - - - - -- -\ No newline at end of file -+ -diff -Nur jmc-7.0.0-orig/releng/third-party/pom.xml jmc-7.0.0/releng/third-party/pom.xml ---- jmc-7.0.0-orig/releng/third-party/pom.xml 2018-10-02 14:24:20.790921103 -0400 -+++ jmc-7.0.0/releng/third-party/pom.xml 2018-10-02 14:28:21.894584017 -0400 -@@ -61,16 +61,16 @@ - - - -- javax.mail:imap:1.4 -+ com.sun.mail:imap:1.4 - - -- javax.mail:pop3:1.4 -+ com.sun.mail:pop3:1.4 - - -- javax.mail:smtp:1.4 -+ com.sun.mail:smtp:1.4 - - -- javax.mail:dsn:1.4 -+ com.sun.mail:dsn:1.4 - - - org.owasp.encoder:encoder:1.2.1 diff --git a/jmc/jmc.spec b/jmc/jmc.spec index 035a0e0..25916c0 100644 --- a/jmc/jmc.spec +++ b/jmc/jmc.spec @@ -14,9 +14,9 @@ URL: http://openjdk.java.net/projects/jmc/ # tar czf jmc-7.0.0.tar.gz jmc-7.0.0/ Source0: jmc-7.0.0.tar.gz -Patch0: remove-twitter.patch -Patch1: local-osgi.patch -Patch2: javamail.patch +Patch0: 0_remove_twitter.patch +Patch1: 1_local_osgi.patch +Patch2: 2_javamail.patch BuildRequires: maven-local java-openjdk tycho openjfx icu glassfish-el glassfish-annotation-api atinject glassfish-jsp-api glassfish-jsp ant batik batik-css apache-commons-codec apache-commons-io apache-commons-jxpath apache-commons-logging felix-gogo-command felix-gogo-runtime felix-gogo-shell felix-scr httpcomponents-client httpcomponents-core lucene-analysis lucene-analyzers-smartcn lucene apiguardian eclipse-jdt eclipse-nls-ja eclipse-nls-zh eclipse-platform eclipse-ecf-core eclipse-emf-core eclipse-pde jetty-continuation jetty-http jetty-io jetty-security jetty-server jetty-servlet jetty-util eclipse-equinox-osgi eclipse-swt hamcrest-core junit junit5 opentest4j sat4j sac xml-commons-apis xz-java tycho javamail owasp-java-encoder jmc-core diff --git a/jmc/local-osgi.patch b/jmc/local-osgi.patch deleted file mode 100644 index 79ea9af..0000000 --- a/jmc/local-osgi.patch +++ /dev/null @@ -1,84 +0,0 @@ -diff -Nur jmc-7.0.0-orig/application/org.openjdk.jmc.console.ui/META-INF/MANIFEST.MF jmc-7.0.0/application/org.openjdk.jmc.console.ui/META-INF/MANIFEST.MF ---- jmc-7.0.0-orig/application/org.openjdk.jmc.console.ui/META-INF/MANIFEST.MF 2018-10-02 14:19:19.088594234 -0400 -+++ jmc-7.0.0/application/org.openjdk.jmc.console.ui/META-INF/MANIFEST.MF 2018-10-02 14:21:09.728980661 -0400 -@@ -10,7 +10,7 @@ - Require-Bundle: org.openjdk.jmc.rjmx.ui;visibility:=reexport, - org.eclipse.e4.core.contexts;bundle-version="1.3.0", - org.eclipse.e4.core.di;bundle-version="1.3.0";visibility:=reexport, -- javax.annotation;bundle-version="1.0.0";visibility:=reexport, -+ javax.annotation;bundle-version="1.2.1";visibility:=reexport, - javax.inject;bundle-version="1.0.0";visibility:=reexport, - org.openjdk.jmc.commands - Bundle-ActivationPolicy: lazy -@@ -22,7 +22,7 @@ - org.openjdk.jmc.console.ui.editor, - org.openjdk.jmc.console.ui.editor.internal;x-friends:="org.openjdk.jmc.console.ui.mbeanbrowser,org.openjdk.jmc.rcp.intro" - Bundle-ClassPath: . --Import-Package: javax.annotation;version="1.0.0", -+Import-Package: javax.annotation;version="1.2.1", - javax.inject;version="1.0.0" - Automatic-Module-Name: org.openjdk.jmc.console.ui - -diff -Nur jmc-7.0.0-orig/releng/platform-definitions/platform-definition-oxygen/platform-definition-oxygen.target jmc-7.0.0/releng/platform-definitions/platform-definition-oxygen/platform-definition-oxygen.target ---- jmc-7.0.0-orig/releng/platform-definitions/platform-definition-oxygen/platform-definition-oxygen.target 2018-10-02 14:19:19.005594694 -0400 -+++ jmc-7.0.0/releng/platform-definitions/platform-definition-oxygen/platform-definition-oxygen.target 2018-10-02 14:23:14.663287807 -0400 -@@ -32,27 +32,5 @@ - WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - --> - -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- - - -diff -Nur jmc-7.0.0-orig/releng/platform-definitions/platform-definition-photon/platform-definition-photon.target jmc-7.0.0/releng/platform-definitions/platform-definition-photon/platform-definition-photon.target ---- jmc-7.0.0-orig/releng/platform-definitions/platform-definition-photon/platform-definition-photon.target 2018-10-02 14:19:19.006594689 -0400 -+++ jmc-7.0.0/releng/platform-definitions/platform-definition-photon/platform-definition-photon.target 2018-10-02 14:22:51.447416561 -0400 -@@ -32,28 +32,5 @@ - WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - --> - -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- - - diff --git a/jmc/remove-twitter.patch b/jmc/remove-twitter.patch deleted file mode 100644 index ec1a406..0000000 --- a/jmc/remove-twitter.patch +++ /dev/null @@ -1,1708 +0,0 @@ -diff -Nur jmc-7.0.0-orig/application/org.openjdk.jmc.console.twitter/build.properties jmc-7.0.0/application/org.openjdk.jmc.console.twitter/build.properties ---- jmc-7.0.0-orig/application/org.openjdk.jmc.console.twitter/build.properties 2018-10-02 14:13:12.842624647 -0400 -+++ jmc-7.0.0/application/org.openjdk.jmc.console.twitter/build.properties 1969-12-31 19:00:00.000000000 -0500 -@@ -1,39 +0,0 @@ --# --# Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. --# --# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. --# --# The contents of this file are subject to the terms of either the Universal Permissive License --# v 1.0 as shown at http://oss.oracle.com/licenses/upl --# --# or the following license: --# --# Redistribution and use in source and binary forms, with or without modification, are permitted --# provided that the following conditions are met: --# --# 1. Redistributions of source code must retain the above copyright notice, this list of conditions --# and the following disclaimer. --# --# 2. Redistributions in binary form must reproduce the above copyright notice, this list of --# conditions and the following disclaimer in the documentation and/or other materials provided with --# the distribution. --# --# 3. Neither the name of the copyright holder nor the names of its contributors may be used to --# endorse or promote products derived from this software without specific prior written permission. --# --# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR --# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND --# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR --# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL --# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, --# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, --# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY --# WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --# --source.. = src/main/java/ --output.. = target/classes/ --bin.includes = META-INF/,\ -- .,\ -- plugin.xml,\ -- icons/ --pde.match.rule.bundle=compatible -diff -Nur jmc-7.0.0-orig/application/org.openjdk.jmc.console.twitter/.classpath jmc-7.0.0/application/org.openjdk.jmc.console.twitter/.classpath ---- jmc-7.0.0-orig/application/org.openjdk.jmc.console.twitter/.classpath 2018-10-02 14:13:12.842624647 -0400 -+++ jmc-7.0.0/application/org.openjdk.jmc.console.twitter/.classpath 1969-12-31 19:00:00.000000000 -0500 -@@ -1,7 +0,0 @@ -- -- -- -- -- -- -- -Binary files jmc-7.0.0-orig/application/org.openjdk.jmc.console.twitter/icons/twitter.png and jmc-7.0.0/application/org.openjdk.jmc.console.twitter/icons/twitter.png differ -diff -Nur jmc-7.0.0-orig/application/org.openjdk.jmc.console.twitter/META-INF/MANIFEST.MF jmc-7.0.0/application/org.openjdk.jmc.console.twitter/META-INF/MANIFEST.MF ---- jmc-7.0.0-orig/application/org.openjdk.jmc.console.twitter/META-INF/MANIFEST.MF 2018-10-02 14:13:12.842624647 -0400 -+++ jmc-7.0.0/application/org.openjdk.jmc.console.twitter/META-INF/MANIFEST.MF 1969-12-31 19:00:00.000000000 -0500 -@@ -1,17 +0,0 @@ --Manifest-Version: 1.0 --Bundle-ManifestVersion: 2 --Bundle-Name: Twitter --Bundle-SymbolicName: org.openjdk.jmc.console.twitter;singleton:=true --Bundle-Version: 1.0.2.qualifier --Bundle-Activator: org.openjdk.jmc.console.twitter.TwitterPlugin --Bundle-Vendor: Oracle Corporation --Require-Bundle: org.openjdk.jmc.rjmx, -- org.openjdk.jmc.ui, -- org.eclipse.core.net --Bundle-RequiredExecutionEnvironment: JavaSE-1.8 --Bundle-ActivationPolicy: lazy --Import-Package: twitter4j, -- twitter4j.auth, -- twitter4j.conf, -- twitter4j.api --Automatic-Module-Name: org.openjdk.jmc.console.twitter -diff -Nur jmc-7.0.0-orig/application/org.openjdk.jmc.console.twitter/plugin.xml jmc-7.0.0/application/org.openjdk.jmc.console.twitter/plugin.xml ---- jmc-7.0.0-orig/application/org.openjdk.jmc.console.twitter/plugin.xml 2018-10-02 14:13:12.842624647 -0400 -+++ jmc-7.0.0/application/org.openjdk.jmc.console.twitter/plugin.xml 1969-12-31 19:00:00.000000000 -0500 -@@ -1,92 +0,0 @@ -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -\ No newline at end of file -diff -Nur jmc-7.0.0-orig/application/org.openjdk.jmc.console.twitter/pom.xml jmc-7.0.0/application/org.openjdk.jmc.console.twitter/pom.xml ---- jmc-7.0.0-orig/application/org.openjdk.jmc.console.twitter/pom.xml 2018-10-02 14:13:12.842624647 -0400 -+++ jmc-7.0.0/application/org.openjdk.jmc.console.twitter/pom.xml 1969-12-31 19:00:00.000000000 -0500 -@@ -1,44 +0,0 @@ -- -- -- -- 4.0.0 -- -- org.openjdk.jmc -- missioncontrol.application -- 7.0.0-SNAPSHOT -- -- org.openjdk.jmc.console.twitter -- 1.0.2-SNAPSHOT -- eclipse-plugin -- -diff -Nur jmc-7.0.0-orig/application/org.openjdk.jmc.console.twitter/.project jmc-7.0.0/application/org.openjdk.jmc.console.twitter/.project ---- jmc-7.0.0-orig/application/org.openjdk.jmc.console.twitter/.project 2018-10-02 14:13:12.842624647 -0400 -+++ jmc-7.0.0/application/org.openjdk.jmc.console.twitter/.project 1969-12-31 19:00:00.000000000 -0500 -@@ -1,34 +0,0 @@ -- -- -- org.openjdk.jmc.console.twitter -- -- -- -- -- -- org.eclipse.jdt.core.javabuilder -- -- -- -- -- org.eclipse.pde.ManifestBuilder -- -- -- -- -- org.eclipse.pde.SchemaBuilder -- -- -- -- -- org.eclipse.m2e.core.maven2Builder -- -- -- -- -- -- org.eclipse.m2e.core.maven2Nature -- org.eclipse.pde.PluginNature -- org.eclipse.jdt.core.javanature -- -- -diff -Nur jmc-7.0.0-orig/application/org.openjdk.jmc.console.twitter/.settings/org.eclipse.jdt.core.prefs jmc-7.0.0/application/org.openjdk.jmc.console.twitter/.settings/org.eclipse.jdt.core.prefs ---- jmc-7.0.0-orig/application/org.openjdk.jmc.console.twitter/.settings/org.eclipse.jdt.core.prefs 2018-10-02 14:13:12.842624647 -0400 -+++ jmc-7.0.0/application/org.openjdk.jmc.console.twitter/.settings/org.eclipse.jdt.core.prefs 1969-12-31 19:00:00.000000000 -0500 -@@ -1,2 +0,0 @@ --eclipse.preferences.version=1 --org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore -diff -Nur jmc-7.0.0-orig/application/org.openjdk.jmc.console.twitter/src/main/java/org/openjdk/jmc/console/twitter/SendMessage.java jmc-7.0.0/application/org.openjdk.jmc.console.twitter/src/main/java/org/openjdk/jmc/console/twitter/SendMessage.java ---- jmc-7.0.0-orig/application/org.openjdk.jmc.console.twitter/src/main/java/org/openjdk/jmc/console/twitter/SendMessage.java 2018-10-02 14:13:12.843624641 -0400 -+++ jmc-7.0.0/application/org.openjdk.jmc.console.twitter/src/main/java/org/openjdk/jmc/console/twitter/SendMessage.java 1969-12-31 19:00:00.000000000 -0500 -@@ -1,71 +0,0 @@ --/* -- * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. -- * -- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -- * -- * The contents of this file are subject to the terms of either the Universal Permissive License -- * v 1.0 as shown at http://oss.oracle.com/licenses/upl -- * -- * or the following license: -- * -- * Redistribution and use in source and binary forms, with or without modification, are permitted -- * provided that the following conditions are met: -- * -- * 1. Redistributions of source code must retain the above copyright notice, this list of conditions -- * and the following disclaimer. -- * -- * 2. Redistributions in binary form must reproduce the above copyright notice, this list of -- * conditions and the following disclaimer in the documentation and/or other materials provided with -- * the distribution. -- * -- * 3. Neither the name of the copyright holder nor the names of its contributors may be used to -- * endorse or promote products derived from this software without specific prior written permission. -- * -- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR -- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND -- * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR -- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY -- * WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- */ --package org.openjdk.jmc.console.twitter; -- --import org.openjdk.jmc.rjmx.IConnectionHandle; --import org.openjdk.jmc.rjmx.triggers.IActivatableTriggerAction; --import org.openjdk.jmc.rjmx.triggers.TriggerAction; --import org.openjdk.jmc.rjmx.triggers.TriggerEvent; -- --/** -- * Sends a direct message from one user to another -- */ --public class SendMessage extends TriggerAction implements IActivatableTriggerAction { -- private static final String FROM_FIELD = "from"; //$NON-NLS-1$ -- private static final String TO_FIELD = "to"; //$NON-NLS-1$ -- private static final String MESSAGE_FIELD = "message"; //$NON-NLS-1$ -- -- public SendMessage() { -- -- } -- -- @Override -- public void handleNotificationEvent(TriggerEvent event) throws Exception { -- String from = getSetting(FROM_FIELD).getString(); -- String to = getSetting(TO_FIELD).getString(); -- String message = TwitterPlugin.createMessage(getSetting(MESSAGE_FIELD).getString(), event); -- -- if (from != null && to != null && message != null) { -- send(from, to, message); -- } -- } -- -- private void send(String from, String to, String message) throws Exception { -- TwitterPlugin.getDefault().sendDirectMessage(from, to, message); -- } -- -- @Override -- public boolean isActivatable(IConnectionHandle handle) { -- return TwitterPlugin.getDefault().verifyAuthorizedUser(getSetting(FROM_FIELD).getString()); -- } --} -diff -Nur jmc-7.0.0-orig/application/org.openjdk.jmc.console.twitter/src/main/java/org/openjdk/jmc/console/twitter/Tweeter.java jmc-7.0.0/application/org.openjdk.jmc.console.twitter/src/main/java/org/openjdk/jmc/console/twitter/Tweeter.java ---- jmc-7.0.0-orig/application/org.openjdk.jmc.console.twitter/src/main/java/org/openjdk/jmc/console/twitter/Tweeter.java 2018-10-02 14:13:12.843624641 -0400 -+++ jmc-7.0.0/application/org.openjdk.jmc.console.twitter/src/main/java/org/openjdk/jmc/console/twitter/Tweeter.java 1969-12-31 19:00:00.000000000 -0500 -@@ -1,96 +0,0 @@ --/* -- * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. -- * -- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -- * -- * The contents of this file are subject to the terms of either the Universal Permissive License -- * v 1.0 as shown at http://oss.oracle.com/licenses/upl -- * -- * or the following license: -- * -- * Redistribution and use in source and binary forms, with or without modification, are permitted -- * provided that the following conditions are met: -- * -- * 1. Redistributions of source code must retain the above copyright notice, this list of conditions -- * and the following disclaimer. -- * -- * 2. Redistributions in binary form must reproduce the above copyright notice, this list of -- * conditions and the following disclaimer in the documentation and/or other materials provided with -- * the distribution. -- * -- * 3. Neither the name of the copyright holder nor the names of its contributors may be used to -- * endorse or promote products derived from this software without specific prior written permission. -- * -- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR -- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND -- * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR -- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY -- * WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- */ --package org.openjdk.jmc.console.twitter; -- --import org.eclipse.ui.IMemento; -- --/** -- * Holds information about a user and it's access credentials. -- */ --public final class Tweeter { -- -- private static final String TOKEN = "token"; //$NON-NLS-1$ -- private static final String TOKEN_SECRET = "tokenSecret"; //$NON-NLS-1$ -- private static final String USERNAME = "username"; //$NON-NLS-1$ -- -- private final String username; -- private final String token; -- private final String tokenSecret; -- -- public Tweeter(IMemento memento) { -- this(memento.getString(USERNAME), memento.getString(TOKEN), memento.getString(TOKEN_SECRET)); -- } -- -- public Tweeter(String username, String token, String tokenSecret) { -- this.username = username; -- this.token = token; -- this.tokenSecret = tokenSecret; -- } -- -- public String getUsername() { -- return username; -- } -- -- public String getToken() { -- return token; -- } -- -- public String getTokenSecret() { -- return tokenSecret; -- } -- -- public void saveState(IMemento memento) { -- memento.putString(USERNAME, username); -- memento.putString(TOKEN, token); -- memento.putString(TOKEN_SECRET, tokenSecret); -- } -- -- @Override -- public boolean equals(Object o) { -- if (o instanceof Tweeter) { -- Tweeter that = (Tweeter) o; -- return that.username.equals(username); -- } -- return false; -- } -- -- @Override -- public int hashCode() { -- return username.hashCode(); -- } -- -- @Override -- public String toString() { -- return username; -- } --} -diff -Nur jmc-7.0.0-orig/application/org.openjdk.jmc.console.twitter/src/main/java/org/openjdk/jmc/console/twitter/TwitterPlugin.java jmc-7.0.0/application/org.openjdk.jmc.console.twitter/src/main/java/org/openjdk/jmc/console/twitter/TwitterPlugin.java ---- jmc-7.0.0-orig/application/org.openjdk.jmc.console.twitter/src/main/java/org/openjdk/jmc/console/twitter/TwitterPlugin.java 2018-10-02 14:13:12.843624641 -0400 -+++ jmc-7.0.0/application/org.openjdk.jmc.console.twitter/src/main/java/org/openjdk/jmc/console/twitter/TwitterPlugin.java 1969-12-31 19:00:00.000000000 -0500 -@@ -1,347 +0,0 @@ --/* -- * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. -- * -- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -- * -- * The contents of this file are subject to the terms of either the Universal Permissive License -- * v 1.0 as shown at http://oss.oracle.com/licenses/upl -- * -- * or the following license: -- * -- * Redistribution and use in source and binary forms, with or without modification, are permitted -- * provided that the following conditions are met: -- * -- * 1. Redistributions of source code must retain the above copyright notice, this list of conditions -- * and the following disclaimer. -- * -- * 2. Redistributions in binary form must reproduce the above copyright notice, this list of -- * conditions and the following disclaimer in the documentation and/or other materials provided with -- * the distribution. -- * -- * 3. Neither the name of the copyright holder nor the names of its contributors may be used to -- * endorse or promote products derived from this software without specific prior written permission. -- * -- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR -- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND -- * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR -- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY -- * WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- */ --package org.openjdk.jmc.console.twitter; -- --import java.net.URI; --import java.net.URISyntaxException; --import java.util.ArrayList; --import java.util.List; --import java.util.logging.Level; --import java.util.logging.Logger; -- --import org.eclipse.core.net.proxy.IProxyChangeEvent; --import org.eclipse.core.net.proxy.IProxyChangeListener; --import org.eclipse.core.net.proxy.IProxyData; --import org.eclipse.core.net.proxy.IProxyService; --import org.eclipse.core.runtime.preferences.InstanceScope; --import org.eclipse.jface.dialogs.MessageDialog; --import org.eclipse.swt.program.Program; --import org.eclipse.ui.IMemento; --import org.eclipse.ui.XMLMemento; --import org.eclipse.ui.plugin.AbstractUIPlugin; --import org.osgi.framework.BundleContext; --import org.osgi.service.prefs.BackingStoreException; -- --import org.openjdk.jmc.rjmx.triggers.TriggerEvent; --import org.openjdk.jmc.ui.misc.DialogToolkit; --import org.openjdk.jmc.ui.misc.MementoToolkit; -- --import twitter4j.Twitter; --import twitter4j.TwitterException; --import twitter4j.TwitterFactory; --import twitter4j.auth.AccessToken; --import twitter4j.auth.RequestToken; --import twitter4j.conf.ConfigurationBuilder; -- --/** -- * The activator class controls the plug-in life cycle for the Twitter plug-in.- -- */ --public class TwitterPlugin extends AbstractUIPlugin { -- private static final String VARIABLE_VALUE = "{value}"; -- private static final String VARIABLE_STATE = "{state}"; -- -- private static final String TWEETERS_PREF_KEY = "tweeters"; -- private static final String TWEETER_TAG = "tweeter"; -- -- private static final String CONSUMER_KEY_PREF_KEY = "consumer_key"; -- private static final String CONSUMER_SECRET_PREF_KEY = "consumer_secret"; -- -- // The plug-in ID -- public static final String PLUGIN_ID = "org.openjdk.jmc.twitter"; //$NON-NLS-1$ -- -- final static Logger LOGGER = Logger.getLogger(PLUGIN_ID); -- -- // The shared instance -- private static TwitterPlugin plugin; -- -- private String consumerKey; -- private String consumerSecret; -- private List tweeters = new ArrayList<>(); -- private TwitterFactory twitterFactory; -- -- private final IProxyChangeListener proxyListener; -- private IProxyService proxyService; -- -- /** -- * The constructor -- */ -- public TwitterPlugin() { -- proxyListener = new IProxyChangeListener() { -- @Override -- public void proxyInfoChanged(IProxyChangeEvent event) { -- recreateFactory(); -- } -- }; -- } -- -- @Override -- public void start(BundleContext context) throws Exception { -- super.start(context); -- proxyService = setupProxyService(context); -- plugin = this; -- consumerKey = InstanceScope.INSTANCE.getNode(PLUGIN_ID).get(CONSUMER_KEY_PREF_KEY, null); -- consumerSecret = InstanceScope.INSTANCE.getNode(PLUGIN_ID).get(CONSUMER_SECRET_PREF_KEY, null); -- -- IMemento state = MementoToolkit -- .fromString(InstanceScope.INSTANCE.getNode(PLUGIN_ID).get(TWEETERS_PREF_KEY, null)); -- if (state != null) { -- for (IMemento tweeter : state.getChildren(TWEETER_TAG)) { -- tweeters.add(new Tweeter(tweeter)); -- } -- } -- twitterFactory = createTwitterFactory(); -- } -- -- private IProxyService setupProxyService(BundleContext context) { -- IProxyService service = context.getService(context.getServiceReference(IProxyService.class)); -- service.addProxyChangeListener(proxyListener); -- return service; -- } -- -- private TwitterFactory createTwitterFactory() { -- ConfigurationBuilder cb = new ConfigurationBuilder(); -- try { -- IProxyData[] data = proxyService.select(new URI("http://api.twitter.com")); //$NON-NLS-1$ -- String host = null; -- int port = -1; -- for (IProxyData proxyData : data) { -- if (proxyData.getHost() != null) { -- host = proxyData.getHost(); -- port = proxyData.getPort(); -- break; -- } -- } -- if (host != null) { -- cb.setHttpProxyHost(host); -- } -- if (port != -1) { -- -- cb.setHttpProxyPort(port); -- } else { -- cb.setHttpProxyPort(80); -- } -- } catch (URISyntaxException e) { -- // Should never happen... -- e.printStackTrace(); -- } -- return new TwitterFactory(cb.build()); -- } -- -- @Override -- public void stop(BundleContext context) throws Exception { -- try { -- plugin = null; -- proxyService.removeProxyChangeListener(proxyListener); -- proxyService = null; -- storeStateToPreferences(); -- } finally { -- // Implicitly stores preference store. -- super.stop(context); -- } -- } -- -- private void storeStateToPreferences() { -- XMLMemento tweeterState = XMLMemento.createWriteRoot("root"); -- for (Tweeter t : tweeters) { -- t.saveState(tweeterState.createChild(TWEETER_TAG)); -- } -- InstanceScope.INSTANCE.getNode(PLUGIN_ID).put(TWEETERS_PREF_KEY, MementoToolkit.asString(tweeterState)); -- if (consumerKey != null) { -- InstanceScope.INSTANCE.getNode(PLUGIN_ID).put(CONSUMER_KEY_PREF_KEY, consumerKey); -- } -- if (consumerSecret != null) { -- InstanceScope.INSTANCE.getNode(PLUGIN_ID).put(CONSUMER_SECRET_PREF_KEY, consumerSecret); -- } -- } -- -- /** -- * Returns the shared instance -- * -- * @return the shared instance -- */ -- public static TwitterPlugin getDefault() { -- return plugin; -- } -- -- public RequestToken authorize(Twitter twitter) { -- try { -- twitter.setOAuthConsumer(consumerKey, consumerSecret); -- } catch (IllegalStateException e) { -- // Using log level info, since it's probably only since this was done before. -- TwitterPlugin.LOGGER.log(Level.INFO, -- "Could not set OAuth Consumer. Most likely this has already been done before.", e); -- } -- RequestToken requestToken; -- try { -- requestToken = twitter.getOAuthRequestToken(); -- Program.launch(requestToken.getAuthorizationURL()); -- return requestToken; -- } catch (TwitterException e) { -- TwitterPlugin.LOGGER.log(Level.SEVERE, "Could not request token!", e); -- DialogToolkit.showException(null, "Problem when Authorizing", -- "Problem when trying to connect to Twitter for authorization. Check your network and proxy settings. If you make any changes, a restart may be required. \n\nException message: " -- + e.getMessage(), -- e); -- } -- return null; -- } -- -- public Tweeter getAuthorizedTweeter(String username) { -- for (Tweeter tweeter : tweeters) { -- if (username.equals(tweeter.getUsername())) { -- return tweeter; -- } -- } -- return null; -- } -- -- public void updateStatus(String username, String message) throws TwitterException { -- Tweeter tweeter = getAuthorizedTweeter(username); -- if (tweeter != null) { -- AccessToken at = createAccessToken(tweeter); -- Twitter twitter = twitterFactory.getInstance(); -- twitter.setOAuthConsumer(consumerKey, consumerSecret); -- twitter.setOAuthAccessToken(at); -- twitter.updateStatus(message); -- return; -- } else { -- throw new TwitterException(String.format( -- "Attempted to update status for an account not defined in the preferences. Please set up the account (%s) in preferences first.", -- username)); -- } -- } -- -- private AccessToken createAccessToken(Tweeter tweeter) { -- return new AccessToken(tweeter.getToken(), tweeter.getTokenSecret()); -- } -- -- public void addTweeter(Twitter twitter, RequestToken rt, String pin) { -- try { -- AccessToken accessToken; -- if (pin.length() > 0) { -- accessToken = twitter.getOAuthAccessToken(rt, pin); -- } else { -- accessToken = twitter.getOAuthAccessToken(); -- } -- -- String screenName = accessToken.getScreenName(); -- if (screenName != null && screenName.length() > 0) { -- Tweeter tweeter = new Tweeter(accessToken.getScreenName(), accessToken.getToken(), -- accessToken.getTokenSecret()); -- if (!tweeters.contains(tweeter)) { -- tweeters.add(tweeter); -- } -- storeAndSavePrefs(); -- } else { -- DialogToolkit.showError(null, "Invalid User", "The authorized user is invalid."); -- } -- MessageDialog.openInformation(null, "Twitter Authorization", -- "Access credentials created successfully for user " + screenName + "."); -- } catch (TwitterException ex) { -- DialogToolkit.showException(null, "Error storing access token", ex); -- } -- } -- -- private void storeAndSavePrefs() { -- storeStateToPreferences(); -- try { -- InstanceScope.INSTANCE.getNode(PLUGIN_ID).flush(); -- } catch (BackingStoreException e) { -- getLogger().log(Level.WARNING, "Failed to store to preferences!", e); -- } -- } -- -- public void setConsumerKeyAndSecret(String consumerKey, String consumerSecret) { -- this.consumerKey = consumerKey; -- this.consumerSecret = consumerSecret; -- storeAndSavePrefs(); -- } -- -- public void removeTweeter(Tweeter tweeter) { -- tweeters.remove(tweeter); -- } -- -- public List getTweeters() { -- return tweeters; -- } -- -- public Twitter getTwitter() { -- return twitterFactory.getInstance(); -- } -- -- public Logger getLogger() { -- return LOGGER; -- } -- -- public void sendDirectMessage(String from, String to, String message) throws Exception { -- Tweeter tweeter = getAuthorizedTweeter(from); -- if (tweeter != null) { -- AccessToken at = createAccessToken(tweeter); -- Twitter twitter = twitterFactory.getInstance(); -- twitter.setOAuthConsumer(consumerKey, consumerSecret); -- twitter.setOAuthAccessToken(at); -- twitter.sendDirectMessage(to, message); -- } else { -- throw new Exception(String.format( -- "Attempted to send direct message from account not defined in the preferences. Please set up the account (%s) in preferences first.", -- from)); -- } -- } -- -- private void recreateFactory() { -- twitterFactory = createTwitterFactory(); -- } -- -- public static String createMessage(String msg, TriggerEvent event) { -- String result = msg.replace(VARIABLE_STATE, getStateString(event)); -- result = result.replace(VARIABLE_VALUE, String.valueOf(event.getTriggerValue())); -- if (result.length() > 140) { -- result = result.substring(0, 137) + "..."; -- } -- return result; -- } -- -- private static String getStateString(TriggerEvent event) { -- return event.wasTriggered() ? "triggered" : "recovered"; -- } -- -- public boolean verifyAuthorizedUser(String username) { -- if (getAuthorizedTweeter(username) != null) { -- return true; -- } else { -- DialogToolkit.showError(null, "Unauthorized Twitter User", -- "User " + username + " has not been authorized in Preferences"); -- return false; -- } -- } --} -diff -Nur jmc-7.0.0-orig/application/org.openjdk.jmc.console.twitter/src/main/java/org/openjdk/jmc/console/twitter/TwitterPreferencePage.java jmc-7.0.0/application/org.openjdk.jmc.console.twitter/src/main/java/org/openjdk/jmc/console/twitter/TwitterPreferencePage.java ---- jmc-7.0.0-orig/application/org.openjdk.jmc.console.twitter/src/main/java/org/openjdk/jmc/console/twitter/TwitterPreferencePage.java 2018-10-02 14:13:12.843624641 -0400 -+++ jmc-7.0.0/application/org.openjdk.jmc.console.twitter/src/main/java/org/openjdk/jmc/console/twitter/TwitterPreferencePage.java 1969-12-31 19:00:00.000000000 -0500 -@@ -1,259 +0,0 @@ --/* -- * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. -- * -- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -- * -- * The contents of this file are subject to the terms of either the Universal Permissive License -- * v 1.0 as shown at http://oss.oracle.com/licenses/upl -- * -- * or the following license: -- * -- * Redistribution and use in source and binary forms, with or without modification, are permitted -- * provided that the following conditions are met: -- * -- * 1. Redistributions of source code must retain the above copyright notice, this list of conditions -- * and the following disclaimer. -- * -- * 2. Redistributions in binary form must reproduce the above copyright notice, this list of -- * conditions and the following disclaimer in the documentation and/or other materials provided with -- * the distribution. -- * -- * 3. Neither the name of the copyright holder nor the names of its contributors may be used to -- * endorse or promote products derived from this software without specific prior written permission. -- * -- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR -- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND -- * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR -- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY -- * WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- */ --package org.openjdk.jmc.console.twitter; -- --import org.eclipse.jface.preference.PreferencePage; --import org.eclipse.jface.resource.ImageDescriptor; --import org.eclipse.jface.viewers.ArrayContentProvider; --import org.eclipse.jface.viewers.ColumnWeightData; --import org.eclipse.jface.viewers.ISelectionChangedListener; --import org.eclipse.jface.viewers.IStructuredSelection; --import org.eclipse.jface.viewers.SelectionChangedEvent; --import org.eclipse.jface.viewers.TableLayout; --import org.eclipse.jface.viewers.TableViewer; --import org.eclipse.swt.SWT; --import org.eclipse.swt.events.ModifyEvent; --import org.eclipse.swt.events.ModifyListener; --import org.eclipse.swt.events.SelectionAdapter; --import org.eclipse.swt.events.SelectionEvent; --import org.eclipse.swt.layout.GridData; --import org.eclipse.swt.layout.GridLayout; --import org.eclipse.swt.widgets.Button; --import org.eclipse.swt.widgets.Composite; --import org.eclipse.swt.widgets.Control; --import org.eclipse.swt.widgets.Label; --import org.eclipse.swt.widgets.Table; --import org.eclipse.swt.widgets.TableColumn; --import org.eclipse.swt.widgets.Text; --import org.eclipse.ui.IWorkbench; --import org.eclipse.ui.IWorkbenchPreferencePage; -- --import twitter4j.Twitter; --import twitter4j.auth.RequestToken; -- --/** -- * Preference page that configures {@link TwitterPlugin} -- */ --public class TwitterPreferencePage extends PreferencePage implements IWorkbenchPreferencePage { -- private Text m_pin; -- private Text m_consumerKey; -- private Text m_consumerSecret; -- private Button finishButton; -- private RequestToken m_requestToken; -- private Control m_authorizationButton; -- private Twitter m_twitter; -- private TableViewer m_viewer; -- private Control m_removeButton; -- -- public TwitterPreferencePage() { -- -- } -- -- public TwitterPreferencePage(String title) { -- super(title); -- } -- -- public TwitterPreferencePage(String title, ImageDescriptor image) { -- super(title, image); -- } -- -- @Override -- public void init(IWorkbench workbench) { -- -- } -- -- @Override -- protected Control createContents(Composite parent) { -- resetTwitter(); -- -- Composite container = new Composite(parent, SWT.NONE); -- container.setLayout(new GridLayout(3, false)); -- -- writeText(container, -- "Before an application, like JDK Mission Control, is allowed to tweet, the application needs to be authorized."); -- writeText(container, -- "You must first set up your own new 'Application' in Twitter (apps.twitter.com) which Mission Control will use to post from. Enter the Consumer Key and Secret for your application below."); -- writeText(container, -- "Finally click Authorize to start authorization. A web browser will appear where you will grant Mission Control permission. The Twitter user you log in as in the web browser will be the one you can use from within Mission Control."); -- -- m_consumerKey = createMandatoryTextField(container, "Consumer Key:", 2); -- m_consumerSecret = createMandatoryTextField(container, "Consumer Secret:", 2); -- -- GridData gd2 = new GridData(SWT.FILL, SWT.FILL, false, false); -- m_authorizationButton = createAuthorizeButton(container); -- m_authorizationButton.setLayoutData(gd2); -- -- writeText(container, "Then enter the PIN that is shown in the web browser and click Add."); -- -- m_pin = createMandatoryTextField(container, "PIN:", 1); -- m_pin.setEnabled(false); -- GridData gd4 = new GridData(SWT.FILL, SWT.FILL, false, false); -- finishButton = createAddButton(container); -- finishButton.setLayoutData(gd4); -- finishButton.setEnabled(false); -- -- writeText(container, "Authorized Users:"); -- GridData gd10 = new GridData(SWT.FILL, SWT.FILL, true, true); -- gd10.horizontalSpan = 2; -- gd10.verticalSpan = 2; -- m_viewer = createTableViewer(container); -- m_viewer.getControl().setLayoutData(gd10); -- -- GridData gd11 = new GridData(SWT.FILL, SWT.BEGINNING, false, false); -- gd11.verticalSpan = 2; -- m_removeButton = createRemoveButton(container); -- m_removeButton.setLayoutData(gd11); -- m_removeButton.setEnabled(false); -- hookViewerRefresh(); -- -- return container; -- } -- -- private Text createMandatoryTextField(Composite container, String caption, int textSpan) { -- GridData gdLabel = new GridData(SWT.FILL, SWT.CENTER, false, false); -- Label label = new Label(container, SWT.NONE); -- label.setText(caption); -- label.setLayoutData(gdLabel); -- GridData gdField = new GridData(SWT.FILL, SWT.FILL, true, false); -- gdField.horizontalSpan = textSpan; -- Text field = createTextField(container); -- field.setLayoutData(gdField); -- return field; -- } -- -- private void resetTwitter() { -- m_twitter = TwitterPlugin.getDefault().getTwitter(); -- m_requestToken = null; -- } -- -- void updateEnablement() { -- m_removeButton.setEnabled(TwitterPlugin.getDefault().getTweeters().size() > 0); -- } -- -- private void hookViewerRefresh() { -- m_viewer.addSelectionChangedListener(new ISelectionChangedListener() { -- @Override -- public void selectionChanged(SelectionChangedEvent event) { -- updateEnablement(); -- } -- }); -- } -- -- private Button createRemoveButton(Composite container) { -- Button b = new Button(container, SWT.NONE); -- b.setText("Remove"); -- b.addSelectionListener(new SelectionAdapter() { -- @Override -- public void widgetSelected(SelectionEvent e) { -- IStructuredSelection ss = (IStructuredSelection) m_viewer.getSelection(); -- if (!ss.isEmpty()) { -- TwitterPlugin.getDefault().removeTweeter((Tweeter) ss.getFirstElement()); -- m_viewer.refresh(); -- } -- } -- }); -- return b; -- } -- -- private TableViewer createTableViewer(Composite parent) { -- Table table = new Table(parent, SWT.BORDER | SWT.FULL_SELECTION | SWT.SINGLE); -- table.setLinesVisible(true); -- -- final TableViewer viewer = new TableViewer(table); -- new TableColumn(table, SWT.NONE); -- TableLayout tl = new TableLayout(); -- tl.addColumnData(new ColumnWeightData(1)); -- table.setLayout(tl); -- viewer.setContentProvider(new ArrayContentProvider()); -- viewer.setInput(TwitterPlugin.getDefault().getTweeters()); -- return viewer; -- } -- -- @Override -- public boolean performOk() { -- return true; -- } -- -- private void writeText(Composite parent, String text) { -- GridData gd0 = new GridData(SWT.FILL, SWT.FILL, false, false); -- gd0.horizontalSpan = 3; -- gd0.widthHint = 200; -- Label desc = new Label(parent, SWT.WRAP); -- desc.setText(text); -- desc.setLayoutData(gd0); -- } -- -- private Text createTextField(Composite container) { -- final Text t = new Text(container, SWT.BORDER); -- t.addModifyListener(new ModifyListener() { -- -- @Override -- public void modifyText(ModifyEvent e) { -- finishButton.setEnabled(t.getText().length() > 0); -- } -- }); -- return t; -- } -- -- private Button createAddButton(final Composite container) { -- Button b = new Button(container, SWT.NONE); -- b.setText("Add"); -- b.addSelectionListener(new SelectionAdapter() { -- @Override -- public void widgetSelected(SelectionEvent e) { -- TwitterPlugin.getDefault().addTweeter(m_twitter, m_requestToken, m_pin.getText().trim()); -- m_pin.setText(""); -- m_viewer.refresh(); -- } -- }); -- return b; -- } -- -- private Button createAuthorizeButton(Composite container) { -- Button b = new Button(container, SWT.NONE); -- b.setText("Authorize"); -- b.addSelectionListener(new SelectionAdapter() { -- @Override -- public void widgetSelected(SelectionEvent e) { -- resetTwitter(); -- TwitterPlugin.getDefault().setConsumerKeyAndSecret(m_consumerKey.getText().trim(), -- m_consumerSecret.getText().trim()); -- m_requestToken = TwitterPlugin.getDefault().authorize(m_twitter); -- boolean enabled = m_requestToken != null; -- finishButton.setEnabled(enabled); -- m_pin.setEnabled(enabled); -- } -- }); -- return b; -- } --} -diff -Nur jmc-7.0.0-orig/application/org.openjdk.jmc.console.twitter/src/main/java/org/openjdk/jmc/console/twitter/UpdateStatus.java jmc-7.0.0/application/org.openjdk.jmc.console.twitter/src/main/java/org/openjdk/jmc/console/twitter/UpdateStatus.java ---- jmc-7.0.0-orig/application/org.openjdk.jmc.console.twitter/src/main/java/org/openjdk/jmc/console/twitter/UpdateStatus.java 2018-10-02 14:13:12.843624641 -0400 -+++ jmc-7.0.0/application/org.openjdk.jmc.console.twitter/src/main/java/org/openjdk/jmc/console/twitter/UpdateStatus.java 1969-12-31 19:00:00.000000000 -0500 -@@ -1,70 +0,0 @@ --/* -- * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. -- * -- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -- * -- * The contents of this file are subject to the terms of either the Universal Permissive License -- * v 1.0 as shown at http://oss.oracle.com/licenses/upl -- * -- * or the following license: -- * -- * Redistribution and use in source and binary forms, with or without modification, are permitted -- * provided that the following conditions are met: -- * -- * 1. Redistributions of source code must retain the above copyright notice, this list of conditions -- * and the following disclaimer. -- * -- * 2. Redistributions in binary form must reproduce the above copyright notice, this list of -- * conditions and the following disclaimer in the documentation and/or other materials provided with -- * the distribution. -- * -- * 3. Neither the name of the copyright holder nor the names of its contributors may be used to -- * endorse or promote products derived from this software without specific prior written permission. -- * -- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR -- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND -- * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR -- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY -- * WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- */ --package org.openjdk.jmc.console.twitter; -- --import org.openjdk.jmc.rjmx.IConnectionHandle; --import org.openjdk.jmc.rjmx.triggers.IActivatableTriggerAction; --import org.openjdk.jmc.rjmx.triggers.TriggerAction; --import org.openjdk.jmc.rjmx.triggers.TriggerEvent; -- --import twitter4j.TwitterException; -- --/** -- * Action that updates the status. -- */ --public class UpdateStatus extends TriggerAction implements IActivatableTriggerAction { -- private static final String USERNAME_FIELD = "username"; //$NON-NLS-1$ -- private static final String MESSAGE_FIELD = "message"; //$NON-NLS-1$ -- -- public UpdateStatus() { -- // Do nothing -- } -- -- @Override -- public void handleNotificationEvent(TriggerEvent event) throws TwitterException { -- String username = getSetting(USERNAME_FIELD).getString(); -- String message = TwitterPlugin.createMessage(getSetting(MESSAGE_FIELD).getString(), event); -- if (username != null && message != null) { -- updateStatus(username, message); -- } -- } -- -- private void updateStatus(String username, String message) throws TwitterException { -- TwitterPlugin.getDefault().updateStatus(username, message); -- } -- -- @Override -- public boolean isActivatable(IConnectionHandle handle) { -- return TwitterPlugin.getDefault().verifyAuthorizedUser(getSetting(USERNAME_FIELD).getString()); -- } --} -diff -Nur jmc-7.0.0-orig/application/org.openjdk.jmc.feature.twitter/build.properties jmc-7.0.0/application/org.openjdk.jmc.feature.twitter/build.properties ---- jmc-7.0.0-orig/application/org.openjdk.jmc.feature.twitter/build.properties 2018-10-02 14:13:12.860624547 -0400 -+++ jmc-7.0.0/application/org.openjdk.jmc.feature.twitter/build.properties 1969-12-31 19:00:00.000000000 -0500 -@@ -1,36 +0,0 @@ --# --# Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. --# --# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. --# --# The contents of this file are subject to the terms of either the Universal Permissive License --# v 1.0 as shown at http://oss.oracle.com/licenses/upl --# --# or the following license: --# --# Redistribution and use in source and binary forms, with or without modification, are permitted --# provided that the following conditions are met: --# --# 1. Redistributions of source code must retain the above copyright notice, this list of conditions --# and the following disclaimer. --# --# 2. Redistributions in binary form must reproduce the above copyright notice, this list of --# conditions and the following disclaimer in the documentation and/or other materials provided with --# the distribution. --# --# 3. Neither the name of the copyright holder nor the names of its contributors may be used to --# endorse or promote products derived from this software without specific prior written permission. --# --# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR --# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND --# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR --# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL --# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, --# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, --# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY --# WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --# --bin.includes = feature.xml,\ -- feature.properties --pde.match.rule.feature=compatible --pde.match.rule.bundle=compatible -diff -Nur jmc-7.0.0-orig/application/org.openjdk.jmc.feature.twitter/feature.properties jmc-7.0.0/application/org.openjdk.jmc.feature.twitter/feature.properties ---- jmc-7.0.0-orig/application/org.openjdk.jmc.feature.twitter/feature.properties 2018-10-02 14:13:12.860624547 -0400 -+++ jmc-7.0.0/application/org.openjdk.jmc.feature.twitter/feature.properties 1969-12-31 19:00:00.000000000 -0500 -@@ -1,37 +0,0 @@ --# --# Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. --# --# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. --# --# The contents of this file are subject to the terms of either the Universal Permissive License --# v 1.0 as shown at http://oss.oracle.com/licenses/upl --# --# or the following license: --# --# Redistribution and use in source and binary forms, with or without modification, are permitted --# provided that the following conditions are met: --# --# 1. Redistributions of source code must retain the above copyright notice, this list of conditions --# and the following disclaimer. --# --# 2. Redistributions in binary form must reproduce the above copyright notice, this list of --# conditions and the following disclaimer in the documentation and/or other materials provided with --# the distribution. --# --# 3. Neither the name of the copyright holder nor the names of its contributors may be used to --# endorse or promote products derived from this software without specific prior written permission. --# --# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR --# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND --# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR --# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL --# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, --# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, --# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY --# WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --# --name=Twitter Action --provider=Oracle Corporation --copyright=Copyright \u00A9 2018, Oracle and/or its affiliates. All rights reserved. --description=This feature makes a twitter action available among the trigger actions. A user defined message will be tweeted whenever a rule with this action triggers. --descriptionUrl=http://www.oracle.com/missioncontrol -diff -Nur jmc-7.0.0-orig/application/org.openjdk.jmc.feature.twitter/feature.xml jmc-7.0.0/application/org.openjdk.jmc.feature.twitter/feature.xml ---- jmc-7.0.0-orig/application/org.openjdk.jmc.feature.twitter/feature.xml 2018-10-02 14:13:12.860624547 -0400 -+++ jmc-7.0.0/application/org.openjdk.jmc.feature.twitter/feature.xml 1969-12-31 19:00:00.000000000 -0500 -@@ -1,73 +0,0 @@ -- -- -- -- -- -- %description -- -- -- -- %copyright -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -\ No newline at end of file -diff -Nur jmc-7.0.0-orig/application/org.openjdk.jmc.feature.twitter/pom.xml jmc-7.0.0/application/org.openjdk.jmc.feature.twitter/pom.xml ---- jmc-7.0.0-orig/application/org.openjdk.jmc.feature.twitter/pom.xml 2018-10-02 14:13:12.860624547 -0400 -+++ jmc-7.0.0/application/org.openjdk.jmc.feature.twitter/pom.xml 1969-12-31 19:00:00.000000000 -0500 -@@ -1,44 +0,0 @@ -- -- -- -- 4.0.0 -- -- org.openjdk.jmc -- missioncontrol.application -- 7.0.0-SNAPSHOT -- -- org.openjdk.jmc.feature.twitter -- 1.0.2-SNAPSHOT -- eclipse-feature -- -diff -Nur jmc-7.0.0-orig/application/org.openjdk.jmc.feature.twitter/.project jmc-7.0.0/application/org.openjdk.jmc.feature.twitter/.project ---- jmc-7.0.0-orig/application/org.openjdk.jmc.feature.twitter/.project 2018-10-02 14:13:12.860624547 -0400 -+++ jmc-7.0.0/application/org.openjdk.jmc.feature.twitter/.project 1969-12-31 19:00:00.000000000 -0500 -@@ -1,23 +0,0 @@ -- -- -- org.openjdk.jmc.feature.twitter -- -- -- -- -- -- org.eclipse.pde.FeatureBuilder -- -- -- -- -- org.eclipse.m2e.core.maven2Builder -- -- -- -- -- -- org.eclipse.m2e.core.maven2Nature -- org.eclipse.pde.FeatureNature -- -- -diff -Nur jmc-7.0.0-orig/application/org.openjdk.jmc.rjmx/META-INF/MANIFEST.MF jmc-7.0.0/application/org.openjdk.jmc.rjmx/META-INF/MANIFEST.MF ---- jmc-7.0.0-orig/application/org.openjdk.jmc.rjmx/META-INF/MANIFEST.MF 2018-10-02 14:13:12.918624226 -0400 -+++ jmc-7.0.0/application/org.openjdk.jmc.rjmx/META-INF/MANIFEST.MF 2018-10-02 14:13:27.922541079 -0400 -@@ -54,7 +54,6 @@ - org.openjdk.jmc.rjmx.triggers; - x-friends:="org.openjdk.jmc.console.ui.notification, - org.openjdk.jmc.alert, -- org.openjdk.jmc.console.twitter, - org.openjdk.jmc.rjmx.test", - org.openjdk.jmc.rjmx.triggers.actions.internal;x-friends:="org.openjdk.jmc.console.ui.notification", - org.openjdk.jmc.rjmx.triggers.condition.internal;x-friends:="org.openjdk.jmc.console.ui.notification,org.openjdk.jmc.test.jemmy", -diff -Nur jmc-7.0.0-orig/application/org.openjdk.jmc.updatesite.ide/category.xml jmc-7.0.0/application/org.openjdk.jmc.updatesite.ide/category.xml ---- jmc-7.0.0-orig/application/org.openjdk.jmc.updatesite.ide/category.xml 2018-10-02 14:13:12.944624082 -0400 -+++ jmc-7.0.0/application/org.openjdk.jmc.updatesite.ide/category.xml 2018-10-02 14:13:27.923541073 -0400 -@@ -55,10 +55,6 @@ - id="org.openjdk.jmc.feature.console.ui.subscriptions" version="0.0.0"> - - -- -- -- - -diff -Nur jmc-7.0.0-orig/application/org.openjdk.jmc.updatesite.ide/feature.xml jmc-7.0.0/application/org.openjdk.jmc.updatesite.ide/feature.xml ---- jmc-7.0.0-orig/application/org.openjdk.jmc.updatesite.ide/feature.xml 2018-10-02 14:13:12.944624082 -0400 -+++ jmc-7.0.0/application/org.openjdk.jmc.updatesite.ide/feature.xml 2018-10-02 14:13:27.923541073 -0400 -@@ -67,10 +67,6 @@ - version="0.0.0"/> - - -- -- - -diff -Nur jmc-7.0.0-orig/application/org.openjdk.jmc.updatesite.rcp/category.xml jmc-7.0.0/application/org.openjdk.jmc.updatesite.rcp/category.xml ---- jmc-7.0.0-orig/application/org.openjdk.jmc.updatesite.rcp/category.xml 2018-10-02 14:13:12.945624076 -0400 -+++ jmc-7.0.0/application/org.openjdk.jmc.updatesite.rcp/category.xml 2018-10-02 14:13:27.924541068 -0400 -@@ -55,10 +55,6 @@ - id="org.openjdk.jmc.feature.console.ui.subscriptions" version="0.0.0"> - - -- -- -- - -diff -Nur jmc-7.0.0-orig/application/org.openjdk.jmc.updatesite.rcp/feature.xml jmc-7.0.0/application/org.openjdk.jmc.updatesite.rcp/feature.xml ---- jmc-7.0.0-orig/application/org.openjdk.jmc.updatesite.rcp/feature.xml 2018-10-02 14:13:12.945624076 -0400 -+++ jmc-7.0.0/application/org.openjdk.jmc.updatesite.rcp/feature.xml 2018-10-02 14:13:27.924541068 -0400 -@@ -67,10 +67,6 @@ - version="0.0.0"/> - - -- -- - -diff -Nur jmc-7.0.0-orig/application/pom.xml jmc-7.0.0/application/pom.xml ---- jmc-7.0.0-orig/application/pom.xml 2018-10-02 14:13:12.810624824 -0400 -+++ jmc-7.0.0/application/pom.xml 2018-10-02 14:13:27.924541068 -0400 -@@ -50,7 +50,6 @@ - org.openjdk.jmc.console.jconsole - org.openjdk.jmc.console.pde - org.openjdk.jmc.console.persistence -- org.openjdk.jmc.console.twitter - org.openjdk.jmc.console.ui - org.openjdk.jmc.console.ui.diagnostic - org.openjdk.jmc.console.ui.mbeanbrowser -@@ -72,7 +71,6 @@ - org.openjdk.jmc.feature.pde - org.openjdk.jmc.feature.rcp - org.openjdk.jmc.feature.rcp.update -- org.openjdk.jmc.feature.twitter - org.openjdk.jmc.flightrecorder.configuration - org.openjdk.jmc.flightrecorder.controlpanel.ui - org.openjdk.jmc.flightrecorder.controlpanel.ui.configuration -diff -Nur "jmc-7.0.0-orig/configuration/ide/eclipse/launchers/JMC Eclipse plug-ins.launch" "jmc-7.0.0/configuration/ide/eclipse/launchers/JMC Eclipse plug-ins.launch" ---- "jmc-7.0.0-orig/configuration/ide/eclipse/launchers/JMC Eclipse plug-ins.launch" 2018-10-02 14:13:12.946624070 -0400 -+++ "jmc-7.0.0/configuration/ide/eclipse/launchers/JMC Eclipse plug-ins.launch" 2018-10-02 14:13:27.925541063 -0400 -@@ -105,7 +105,6 @@ - - - -- - - - -diff -Nur "jmc-7.0.0-orig/configuration/ide/eclipse/launchers/JMC RCP plug-ins.launch" "jmc-7.0.0/configuration/ide/eclipse/launchers/JMC RCP plug-ins.launch" ---- "jmc-7.0.0-orig/configuration/ide/eclipse/launchers/JMC RCP plug-ins.launch" 2018-10-02 14:13:12.946624070 -0400 -+++ "jmc-7.0.0/configuration/ide/eclipse/launchers/JMC RCP plug-ins.launch" 2018-10-02 14:13:27.925541063 -0400 -@@ -86,7 +86,6 @@ - - - -- - - - -diff -Nur "jmc-7.0.0-orig/configuration/ide/eclipse/launchers/Remote RCP Debugging.launch" "jmc-7.0.0/configuration/ide/eclipse/launchers/Remote RCP Debugging.launch" ---- "jmc-7.0.0-orig/configuration/ide/eclipse/launchers/Remote RCP Debugging.launch" 2018-10-02 14:13:12.946624070 -0400 -+++ "jmc-7.0.0/configuration/ide/eclipse/launchers/Remote RCP Debugging.launch" 2018-10-02 14:13:27.925541063 -0400 -@@ -39,7 +39,7 @@ - - - -- -+ - - - -diff -Nur jmc-7.0.0-orig/license/THIRDPARTYREADME.txt jmc-7.0.0/license/THIRDPARTYREADME.txt ---- jmc-7.0.0-orig/license/THIRDPARTYREADME.txt 2018-10-02 14:13:12.980623882 -0400 -+++ jmc-7.0.0/license/THIRDPARTYREADME.txt 2018-10-02 14:13:27.926541057 -0400 -@@ -367,187 +367,3 @@ - STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - OF THE POSSIBILITY OF SUCH DAMAGE. -- -- --%% The following notice is provided with respect to Twitter4J 4.0.6, --which may be included with this product. -- -- -- 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. -- --Twitter4J SUBCOMPONENTS: -- --Twitter4J includes software from JSON.org to parse JSON response from the Twitter API. You can see the license term at http://www.JSON.org/license.html -diff -Nur jmc-7.0.0-orig/releng/platform-definitions/platform-definition-oxygen/platform-definition-oxygen.target jmc-7.0.0/releng/platform-definitions/platform-definition-oxygen/platform-definition-oxygen.target ---- jmc-7.0.0-orig/releng/platform-definitions/platform-definition-oxygen/platform-definition-oxygen.target 2018-10-02 14:13:12.767625062 -0400 -+++ jmc-7.0.0/releng/platform-definitions/platform-definition-oxygen/platform-definition-oxygen.target 2018-10-02 14:16:24.041564980 -0400 -@@ -40,7 +40,6 @@ - - - -- - - - -diff -Nur jmc-7.0.0-orig/releng/platform-definitions/platform-definition-photon/platform-definition-photon.target jmc-7.0.0/releng/platform-definitions/platform-definition-photon/platform-definition-photon.target ---- jmc-7.0.0-orig/releng/platform-definitions/platform-definition-photon/platform-definition-photon.target 2018-10-02 14:13:12.768625056 -0400 -+++ jmc-7.0.0/releng/platform-definitions/platform-definition-photon/platform-definition-photon.target 2018-10-02 14:16:12.568628607 -0400 -@@ -40,7 +40,6 @@ - - - -- - - - -diff -Nur jmc-7.0.0-orig/releng/third-party/pom.xml jmc-7.0.0/releng/third-party/pom.xml ---- jmc-7.0.0-orig/releng/third-party/pom.xml 2018-10-02 14:13:12.768625056 -0400 -+++ jmc-7.0.0/releng/third-party/pom.xml 2018-10-02 14:13:27.926541057 -0400 -@@ -53,9 +53,6 @@ - - - -- org.twitter4j:twitter4j-core:4.0.6 -- -- - javax.mail:mailapi:1.4 - true - diff --git a/owasp-java-encoder/0_manifest.patch b/owasp-java-encoder/0_manifest.patch new file mode 100644 index 0000000..5d00b69 --- /dev/null +++ b/owasp-java-encoder/0_manifest.patch @@ -0,0 +1,136 @@ +diff -Nur owasp-java-encoder-1.2.1-orig/META-INF/MANIFEST.MF owasp-java-encoder-1.2.1/META-INF/MANIFEST.MF +--- owasp-java-encoder-1.2.1-orig/META-INF/MANIFEST.MF 1969-12-31 19:00:00.000000000 -0500 ++++ owasp-java-encoder-1.2.1/META-INF/MANIFEST.MF 2018-08-07 11:59:15.923471361 -0400 +@@ -0,0 +1,9 @@ ++Manifest-Version: 1.0 ++Bnd-LastModified: 1533328833261 ++Bundle-ManifestVersion: 2 ++Bundle-Name: org.owasp.encoder ++Bundle-SymbolicName: org.owasp.encoder ++Bundle-Version: 1.2.1 ++Created-By: 1.8.0_181 (Oracle Corporation) ++Export-Package: org.owasp.encoder ++Tool: Bnd-1.50.0 +diff -Nur owasp-java-encoder-1.2.1-orig/META-INF/maven/org.owasp.encoder/encoder/pom.properties owasp-java-encoder-1.2.1/META-INF/maven/org.owasp.encoder/encoder/pom.properties +--- owasp-java-encoder-1.2.1-orig/META-INF/maven/org.owasp.encoder/encoder/pom.properties 1969-12-31 19:00:00.000000000 -0500 ++++ owasp-java-encoder-1.2.1/META-INF/maven/org.owasp.encoder/encoder/pom.properties 2018-08-07 11:59:15.924471357 -0400 +@@ -0,0 +1,4 @@ ++#Created by Apache Maven 3.5.2 ++version=1.2.1 ++groupId=org.owasp.encoder ++artifactId=encoder +diff -Nur owasp-java-encoder-1.2.1-orig/META-INF/maven/org.owasp.encoder/encoder/pom.xml owasp-java-encoder-1.2.1/META-INF/maven/org.owasp.encoder/encoder/pom.xml +--- owasp-java-encoder-1.2.1-orig/META-INF/maven/org.owasp.encoder/encoder/pom.xml 1969-12-31 19:00:00.000000000 -0500 ++++ owasp-java-encoder-1.2.1/META-INF/maven/org.owasp.encoder/encoder/pom.xml 2018-08-07 11:59:15.924471357 -0400 +@@ -0,0 +1,99 @@ ++ ++ ++ ++ ++ 4.0.0 ++ ++ ++ org.owasp.encoder ++ encoder-parent ++ 1.2.1 ++ ++ ++ encoder ++ jar ++ ++ Java Encoder ++ ++ The OWASP Encoders package is a collection of high-performance low-overhead ++ contextual encoders, that when utilized correctly, is an effective tool in ++ preventing Web Application security vulnerabilities such as Cross-Site ++ Scripting. ++ ++ ++ ++ ++ ++ org.apache.maven.plugins ++ maven-surefire-plugin ++ ++ ++ org/owasp/encoder/BenchmarkTest.java ++ ++ ++ ++ ++ ++ ++ ++ benchmark ++ ++ ++ ++ org.apache.maven.plugins ++ maven-failsafe-plugin ++ ++ -Xmx1024m -XX:MaxPermSize=256m ++ ++ org/owasp/encoder/BenchmarkTest.java ++ ++ ++ ++ ++ ++ integration-test ++ verify ++ ++ ++ ++ ++ ++ ++ ++ ++ +diff -Nur owasp-java-encoder-1.2.1-orig/pom.xml owasp-java-encoder-1.2.1/pom.xml +--- owasp-java-encoder-1.2.1-orig/pom.xml 2017-02-19 07:20:04.000000000 -0500 ++++ owasp-java-encoder-1.2.1/pom.xml 2018-08-07 11:59:37.190375923 -0400 +@@ -54,8 +54,6 @@ + + + core +- jsp +- esapi + + + https://www.owasp.org/index.php/OWASP_Java_Encoder_Project diff --git a/owasp-java-encoder/manifest.patch b/owasp-java-encoder/manifest.patch deleted file mode 100644 index 5d00b69..0000000 --- a/owasp-java-encoder/manifest.patch +++ /dev/null @@ -1,136 +0,0 @@ -diff -Nur owasp-java-encoder-1.2.1-orig/META-INF/MANIFEST.MF owasp-java-encoder-1.2.1/META-INF/MANIFEST.MF ---- owasp-java-encoder-1.2.1-orig/META-INF/MANIFEST.MF 1969-12-31 19:00:00.000000000 -0500 -+++ owasp-java-encoder-1.2.1/META-INF/MANIFEST.MF 2018-08-07 11:59:15.923471361 -0400 -@@ -0,0 +1,9 @@ -+Manifest-Version: 1.0 -+Bnd-LastModified: 1533328833261 -+Bundle-ManifestVersion: 2 -+Bundle-Name: org.owasp.encoder -+Bundle-SymbolicName: org.owasp.encoder -+Bundle-Version: 1.2.1 -+Created-By: 1.8.0_181 (Oracle Corporation) -+Export-Package: org.owasp.encoder -+Tool: Bnd-1.50.0 -diff -Nur owasp-java-encoder-1.2.1-orig/META-INF/maven/org.owasp.encoder/encoder/pom.properties owasp-java-encoder-1.2.1/META-INF/maven/org.owasp.encoder/encoder/pom.properties ---- owasp-java-encoder-1.2.1-orig/META-INF/maven/org.owasp.encoder/encoder/pom.properties 1969-12-31 19:00:00.000000000 -0500 -+++ owasp-java-encoder-1.2.1/META-INF/maven/org.owasp.encoder/encoder/pom.properties 2018-08-07 11:59:15.924471357 -0400 -@@ -0,0 +1,4 @@ -+#Created by Apache Maven 3.5.2 -+version=1.2.1 -+groupId=org.owasp.encoder -+artifactId=encoder -diff -Nur owasp-java-encoder-1.2.1-orig/META-INF/maven/org.owasp.encoder/encoder/pom.xml owasp-java-encoder-1.2.1/META-INF/maven/org.owasp.encoder/encoder/pom.xml ---- owasp-java-encoder-1.2.1-orig/META-INF/maven/org.owasp.encoder/encoder/pom.xml 1969-12-31 19:00:00.000000000 -0500 -+++ owasp-java-encoder-1.2.1/META-INF/maven/org.owasp.encoder/encoder/pom.xml 2018-08-07 11:59:15.924471357 -0400 -@@ -0,0 +1,99 @@ -+ -+ -+ -+ -+ 4.0.0 -+ -+ -+ org.owasp.encoder -+ encoder-parent -+ 1.2.1 -+ -+ -+ encoder -+ jar -+ -+ Java Encoder -+ -+ The OWASP Encoders package is a collection of high-performance low-overhead -+ contextual encoders, that when utilized correctly, is an effective tool in -+ preventing Web Application security vulnerabilities such as Cross-Site -+ Scripting. -+ -+ -+ -+ -+ -+ org.apache.maven.plugins -+ maven-surefire-plugin -+ -+ -+ org/owasp/encoder/BenchmarkTest.java -+ -+ -+ -+ -+ -+ -+ -+ benchmark -+ -+ -+ -+ org.apache.maven.plugins -+ maven-failsafe-plugin -+ -+ -Xmx1024m -XX:MaxPermSize=256m -+ -+ org/owasp/encoder/BenchmarkTest.java -+ -+ -+ -+ -+ -+ integration-test -+ verify -+ -+ -+ -+ -+ -+ -+ -+ -+ -diff -Nur owasp-java-encoder-1.2.1-orig/pom.xml owasp-java-encoder-1.2.1/pom.xml ---- owasp-java-encoder-1.2.1-orig/pom.xml 2017-02-19 07:20:04.000000000 -0500 -+++ owasp-java-encoder-1.2.1/pom.xml 2018-08-07 11:59:37.190375923 -0400 -@@ -54,8 +54,6 @@ - - - core -- jsp -- esapi - - - https://www.owasp.org/index.php/OWASP_Java_Encoder_Project diff --git a/owasp-java-encoder/owasp-java-encoder.spec b/owasp-java-encoder/owasp-java-encoder.spec index ebf6e6d..f9cb93c 100644 --- a/owasp-java-encoder/owasp-java-encoder.spec +++ b/owasp-java-encoder/owasp-java-encoder.spec @@ -7,9 +7,14 @@ License: ASL 2.0 URL: https://github.com/OWASP/owasp-java-encoder/ Source0: https://github.com/OWASP/owasp-java-encoder/archive/v1.2.1.tar.gz -Patch0: manifest.patch +Patch0: 0_manifest.patch + +BuildRequires: java-openjdk +BuildRequires: junit +BuildRequires: maven-local +BuildRequires: maven-source-plugin +BuildRequires: sonatype-oss-parent -BuildRequires: maven-local java-openjdk junit sonatype-oss-parent maven-source-plugin Requires: java-openjdk From 5d6b71cbaacfa7f9e7df0a395a9085cbd904ab1a Mon Sep 17 00:00:00 2001 From: Alex Macdonald Date: Oct 09 2018 15:23:18 +0000 Subject: [PATCH 2/3] include shell scripts to download and cleanup sources to tarballs --- diff --git a/ee4j/generate_ee4j_tarball.sh b/ee4j/generate_ee4j_tarball.sh new file mode 100644 index 0000000..daa8ea7 --- /dev/null +++ b/ee4j/generate_ee4j_tarball.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +wget https://github.com/eclipse-ee4j/ee4j/archive/1.0.1.tar.gz diff --git a/jaf/generate_jaf_tarball.sh b/jaf/generate_jaf_tarball.sh new file mode 100644 index 0000000..152b600 --- /dev/null +++ b/jaf/generate_jaf_tarball.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +wget https://github.com/eclipse-ee4j/jaf/archive/initial-contribution.tar.gz +tar xzf initial-contribution.tar.gz +rm initial-contribution.tar.gz +mv jaf-initial-contribution/ jaf-1.2.1/ +tar czf jaf-1.2.1.tar.gz jaf-1.2.1/ +rm -r jaf-1.2.1 diff --git a/javamail/generate_javamail_tarball.sh b/javamail/generate_javamail_tarball.sh new file mode 100644 index 0000000..62de8fd --- /dev/null +++ b/javamail/generate_javamail_tarball.sh @@ -0,0 +1,8 @@ +#!/bin/sh + +wget https://github.com/javaee/javamail/archive/JAVAMAIL-1_6_1.tar.gz +tar xzf JAVAMAIL-1_6_1.tar.gz +rm JAVAMAIL-1_6_1.tar.gz +mv javamail-JAVAMAIL-1_6_1/ javamail-1.6.1/ +tar czf javamail-1.6.1.tar.gz javamail-1.6.1/ +rm -r javamail-1.6.1/ diff --git a/jmc-core/generate_jmc_core_tarball.sh b/jmc-core/generate_jmc_core_tarball.sh new file mode 100644 index 0000000..846e425 --- /dev/null +++ b/jmc-core/generate_jmc_core_tarball.sh @@ -0,0 +1,8 @@ +#!/bin/sh + +wget http://hg.openjdk.java.net/jmc/jmc/archive/9ebfa2888b8f.tar.gz +tar xzf 9ebfa2888b8f.tar.gz +rm 9ebfa2888b8f.tar.gz +cp -r jmc-9ebfa2888b8f/core/ jmc-core-7.0.0/ +tar czf jmc-core-7.0.0.tar.gz jmc-core-7.0.0/ +rm -r jmc-core-7.0.0/ jmc-9ebfa2888b8f \ No newline at end of file diff --git a/jmc/generate_jmc_tarball.sh b/jmc/generate_jmc_tarball.sh new file mode 100644 index 0000000..d5e954f --- /dev/null +++ b/jmc/generate_jmc_tarball.sh @@ -0,0 +1,8 @@ +#!/bin/sh + +wget http://hg.openjdk.java.net/jmc/jmc/archive/tip.tar.gz +tar xzf tip.tar.gz +rm tip.tar.gz +mv jmc-tip/ jmc-7.0.0/ +tar czf jmc-7.0.0.tar.gz jmc-7.0.0/ +rm -r jmc-7.0.0/core/ From 67bbd7218610e08b872977364071ee16c7c07f76 Mon Sep 17 00:00:00 2001 From: Alex Macdonald Date: Oct 09 2018 15:23:18 +0000 Subject: [PATCH 3/3] update jmc and jmc-core files for newest changeset --- diff --git a/jmc-core/generate_jmc_core_tarball.sh b/jmc-core/generate_jmc_core_tarball.sh index 846e425..9962fce 100644 --- a/jmc-core/generate_jmc_core_tarball.sh +++ b/jmc-core/generate_jmc_core_tarball.sh @@ -1,8 +1,8 @@ #!/bin/sh -wget http://hg.openjdk.java.net/jmc/jmc/archive/9ebfa2888b8f.tar.gz -tar xzf 9ebfa2888b8f.tar.gz -rm 9ebfa2888b8f.tar.gz -cp -r jmc-9ebfa2888b8f/core/ jmc-core-7.0.0/ +wget http://hg.openjdk.java.net/jmc/jmc/archive/ba12bfb55277.tar.gz +tar xzf ba12bfb55277.tar.gz +rm ba12bfb55277.tar.gz +cp -r jmc-ba12bfb55277/core/ jmc-core-7.0.0/ tar czf jmc-core-7.0.0.tar.gz jmc-core-7.0.0/ -rm -r jmc-core-7.0.0/ jmc-9ebfa2888b8f \ No newline at end of file +rm -r jmc-core-7.0.0/ jmc-ba12bfb55277 \ No newline at end of file diff --git a/jmc-core/jmc-core.spec b/jmc-core/jmc-core.spec index 48c5cd2..03b6edf 100644 --- a/jmc-core/jmc-core.spec +++ b/jmc-core/jmc-core.spec @@ -6,10 +6,10 @@ Summary: Java Mission Control is a profiling and diagnostics tool License: UPL URL: http://openjdk.java.net/projects/jmc/ -# original source: http://hg.openjdk.java.net/jmc/jmc/archive/9ebfa2888b8f.tar.gz -# wget http://hg.openjdk.java.net/jmc/jmc/archive/9ebfa2888b8f.tar.gz -# tar xzf 9ebfa2888b8f.tar.gz -# cp -r jmc-9ebfa2888b8f/core/ jmc-core-7.0.0/ +# original source: http://hg.openjdk.java.net/jmc/jmc/archive/ba12bfb55277.tar.gz +# wget http://hg.openjdk.java.net/jmc/jmc/archive/ba12bfb55277.tar.gz +# tar xzf ba12bfb55277.tar.gz +# cp -r jmc-ba12bfb55277/core/ jmc-core-7.0.0/ # tar czf jmc-core-7.0.0.tar.gz jmc-core-7.0.0/ Source0: jmc-core-7.0.0.tar.gz diff --git a/jmc/generate_jmc_tarball.sh b/jmc/generate_jmc_tarball.sh index d5e954f..13f0eba 100644 --- a/jmc/generate_jmc_tarball.sh +++ b/jmc/generate_jmc_tarball.sh @@ -1,8 +1,8 @@ #!/bin/sh -wget http://hg.openjdk.java.net/jmc/jmc/archive/tip.tar.gz -tar xzf tip.tar.gz -rm tip.tar.gz -mv jmc-tip/ jmc-7.0.0/ +wget http://hg.openjdk.java.net/jmc/jmc/archive/ba12bfb55277.tar.gz +tar xzf ba12bfb55277.tar.gz +rm ba12bfb55277.tar.gz +mv jmc-ba12bfb55277/ jmc-7.0.0/ tar czf jmc-7.0.0.tar.gz jmc-7.0.0/ rm -r jmc-7.0.0/core/