From 5f750de843ddaf6a7d54530faa5dad824695fc52 Mon Sep 17 00:00:00 2001
From: Jie Kang <jkang@redhat.com>
Date: Oct 17 2018 14:46:25 +0000
Subject: Update jmc packaging files


---

diff --git a/directory-maven-plugin/directory-maven-plugin.spec b/directory-maven-plugin/directory-maven-plugin.spec
index 394845e..3ccd759 100644
--- a/directory-maven-plugin/directory-maven-plugin.spec
+++ b/directory-maven-plugin/directory-maven-plugin.spec
@@ -10,6 +10,9 @@ URL:        https://github.com/jdcasey/directory-maven-plugin
 #   wget https://github.com/jdcasey/directory-maven-plugin/archive/directory-maven-plugin-0.3.1.tar.gz
 Source0:    directory-maven-plugin-0.3.1.tar.gz
 
+
+Patch0:     0_update-ddp-version.patch
+
 BuildRequires:  javapackages-tools maven-local
 BuildRequires:  sonatype-oss-parent 
 BuildRequires:  maven-parent maven-plugin-plugin maven-javadoc-plugin
@@ -32,6 +35,8 @@ plugin parameter.
 %prep
 %setup -q
 
+%patch0 -p1
+
 %build
 %mvn_build
 
diff --git a/jmc/1_javamail.patch b/jmc/1_javamail.patch
index a3de447..b16787e 100644
--- a/jmc/1_javamail.patch
+++ b/jmc/1_javamail.patch
@@ -1,36 +1,40 @@
 diff --git a/application/org.openjdk.jmc.feature.core/feature.xml b/application/org.openjdk.jmc.feature.core/feature.xml
 --- a/application/org.openjdk.jmc.feature.core/feature.xml
 +++ b/application/org.openjdk.jmc.feature.core/feature.xml
-@@ -168,28 +168,28 @@
+@@ -161,35 +161,7 @@
           unpack="false"/>
  
     <plugin
+-         id="javax.mail.api"
+-         download-size="0"
+-         install-size="0"
+-         version="0.0.0"
+-         unpack="false"/>
+-
+-   <plugin
 -         id="javax.mail.dsn"
-+         id="com.sun.mail.dsn"
-          download-size="0"
-          install-size="0"
-          version="0.0.0"
-          unpack="false"/>
- 
-    <plugin
+-         download-size="0"
+-         install-size="0"
+-         version="0.0.0"
+-         unpack="false"/>
+-
+-   <plugin
 -         id="javax.mail.imap"
-+         id="com.sun.mail.imap"
-          download-size="0"
-          install-size="0"
-          version="0.0.0"
-          unpack="false"/>
- 
-    <plugin
+-         download-size="0"
+-         install-size="0"
+-         version="0.0.0"
+-         unpack="false"/>
+-
+-   <plugin
 -         id="javax.mail.pop3"
-+         id="com.sun.mail.pop3"
-          download-size="0"
-          install-size="0"
-          version="0.0.0"
-          unpack="false"/>
- 
-    <plugin
+-         download-size="0"
+-         install-size="0"
+-         version="0.0.0"
+-         unpack="false"/>
+-
+-   <plugin
 -         id="javax.mail.smtp"
-+         id="com.sun.mail.smtp"
++         id="com.sun.mail.javax.mail"
           download-size="0"
           install-size="0"
           version="0.0.0"
diff --git a/jmc/2_javax.patch b/jmc/2_javax.patch
index b1525fa..3715ef1 100644
--- a/jmc/2_javax.patch
+++ b/jmc/2_javax.patch
@@ -1,3 +1,6 @@
+# HG changeset patch
+# Parent  9811e26788e979f5275fefd7e09222fcf30e91be
+
 diff --git a/application/org.openjdk.jmc.console.ui/META-INF/MANIFEST.MF b/application/org.openjdk.jmc.console.ui/META-INF/MANIFEST.MF
 --- a/application/org.openjdk.jmc.console.ui/META-INF/MANIFEST.MF
 +++ b/application/org.openjdk.jmc.console.ui/META-INF/MANIFEST.MF
@@ -18,3 +21,14 @@ diff --git a/application/org.openjdk.jmc.console.ui/META-INF/MANIFEST.MF b/appli
 - javax.inject;version="1.0.0"
  Automatic-Module-Name: org.openjdk.jmc.console.ui
  
+diff --git a/application/org.openjdk.jmc.feature.rcp/feature.xml b/application/org.openjdk.jmc.feature.rcp/feature.xml
+--- a/application/org.openjdk.jmc.feature.rcp/feature.xml
++++ b/application/org.openjdk.jmc.feature.rcp/feature.xml
+@@ -84,7 +84,6 @@
+       <import plugin="org.eclipse.ui.intro"/>
+       <import plugin="org.eclipse.ui.net"/>
+       <import plugin="org.eclipse.equinox.event"/>
+-      <import plugin="javax.el"/>
+       <import plugin="org.eclipse.equinox.p2.director.app"/>
+    </requires>
+ 
diff --git a/jmc/4_remove_localization.patch b/jmc/4_remove_localization.patch
new file mode 100644
index 0000000..4ba10d2
--- /dev/null
+++ b/jmc/4_remove_localization.patch
@@ -0,0 +1,50 @@
+# HG changeset patch
+# Parent  6dfe58a53a9c2f2148ff30f94b9859112ca05bad
+
+diff --git a/application/org.openjdk.jmc.feature.rcp/feature.xml b/application/org.openjdk.jmc.feature.rcp/feature.xml
+--- a/application/org.openjdk.jmc.feature.rcp/feature.xml
++++ b/application/org.openjdk.jmc.feature.rcp/feature.xml
+@@ -52,18 +52,10 @@
+          version="0.0.0"/>
+ 
+    <includes
+-         id="org.openjdk.jmc.feature.rcp.ja"
+-         version="0.0.0"/>
+-
+-   <includes
+          id="org.openjdk.jmc.feature.core"
+          version="0.0.0"/>
+ 
+    <includes
+-         id="org.openjdk.jmc.feature.rcp.zh_CN"
+-         version="0.0.0"/>
+-
+-   <includes
+          id="org.openjdk.jmc.feature.flightrecorder"
+          version="0.0.0"/>
+ 
+@@ -103,24 +95,6 @@
+          unpack="false"/>
+ 
+    <plugin
+-         id="org.openjdk.jmc.rcp.application.ja"
+-         nl="ja_JP,ja"
+-         download-size="0"
+-         install-size="0"
+-         version="0.0.0"
+-         fragment="true"
+-         unpack="false"/>
+-
+-   <plugin
+-         id="org.openjdk.jmc.rcp.application.zh_CN"
+-         nl="zh_CN"
+-         download-size="0"
+-         install-size="0"
+-         version="0.0.0"
+-         fragment="true"
+-         unpack="false"/>
+-
+-   <plugin
+          id="org.openjdk.jmc.rcp.intro"
+          download-size="0"
+          install-size="0"
diff --git a/jmc/4_rename_javax-el.patch b/jmc/4_rename_javax-el.patch
deleted file mode 100644
index 5e8ba38..0000000
--- a/jmc/4_rename_javax-el.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- jmc-7.0.0-orig/application/org.openjdk.jmc.feature.rcp/feature.xml	2018-10-12 12:34:17.051540702 -0400
-+++ jmc-7.0.0/application/org.openjdk.jmc.feature.rcp/feature.xml	2018-10-12 12:35:56.736002955 -0400
-@@ -84,7 +84,7 @@
-       <import plugin="org.eclipse.ui.intro"/>
-       <import plugin="org.eclipse.ui.net"/>
-       <import plugin="org.eclipse.equinox.event"/>
--      <import plugin="javax.el"/>
-+      <import plugin="com.sun.el.javax.el"/>
-       <import plugin="org.eclipse.equinox.p2.director.app"/>
-    </requires>
- 
diff --git a/jmc/5_remove_jfx.patch b/jmc/5_remove_jfx.patch
new file mode 100644
index 0000000..fd880b6
--- /dev/null
+++ b/jmc/5_remove_jfx.patch
@@ -0,0 +1,88 @@
+# HG changeset patch
+# Parent  4e9c9a478de6b87b18d01e9eed070a251a9bb2c7
+
+diff --git a/application/org.openjdk.jmc.feature.flightrecorder/feature.xml b/application/org.openjdk.jmc.feature.flightrecorder/feature.xml
+--- a/application/org.openjdk.jmc.feature.flightrecorder/feature.xml
++++ b/application/org.openjdk.jmc.feature.flightrecorder/feature.xml
+@@ -94,13 +94,6 @@
+          unpack="false"/>
+ 
+    <plugin
+-         id="org.openjdk.jmc.javafx.osgi"
+-         download-size="0"
+-         install-size="0"
+-         version="0.0.0"
+-         unpack="false"/>
+-
+-   <plugin
+          id="org.openjdk.jmc.flightrecorder.rules.extensionprovider"
+          download-size="0"
+          install-size="0"
+diff --git a/application/org.openjdk.jmc.flightrecorder.ui/META-INF/MANIFEST.MF b/application/org.openjdk.jmc.flightrecorder.ui/META-INF/MANIFEST.MF
+--- a/application/org.openjdk.jmc.flightrecorder.ui/META-INF/MANIFEST.MF
++++ b/application/org.openjdk.jmc.flightrecorder.ui/META-INF/MANIFEST.MF
+@@ -9,7 +9,6 @@
+ Require-Bundle: org.openjdk.jmc.rjmx,
+  org.openjdk.jmc.flightrecorder;visibility:=reexport,
+  org.openjdk.jmc.ui;visibility:=reexport,
+- org.openjdk.jmc.javafx.osgi,
+  org.openjdk.jmc.flightrecorder.rules,
+  org.openjdk.jmc.flightrecorder.rules.jdk,
+  org.openjdk.jmc.flightrecorder.configuration,
+diff --git a/application/org.openjdk.jmc.rjmx/META-INF/MANIFEST.MF b/application/org.openjdk.jmc.rjmx/META-INF/MANIFEST.MF
+--- a/application/org.openjdk.jmc.rjmx/META-INF/MANIFEST.MF
++++ b/application/org.openjdk.jmc.rjmx/META-INF/MANIFEST.MF
+@@ -11,7 +11,6 @@
+ Export-Package: org.openjdk.jmc.rjmx,
+  org.openjdk.jmc.rjmx.actionprovider;
+   x-friends:="org.openjdk.jmc.console.ui,
+-   org.openjdk.jmc.joverflow.ui,
+    org.openjdk.jmc.console.persistence,
+    org.openjdk.jmc.flightrecorder.controlpanel.ui,
+    org.openjdk.jmc.browser",
+diff --git a/application/pom.xml b/application/pom.xml
+--- a/application/pom.xml
++++ b/application/pom.xml
+@@ -61,12 +61,10 @@
+ 		<module>org.openjdk.jmc.feature.core</module>
+ 		<module>org.openjdk.jmc.feature.flightrecorder</module>
+ 		<module>org.openjdk.jmc.feature.flightrecorder.ext.g1</module>
+-		<module>org.openjdk.jmc.feature.flightrecorder.ext.jfx</module>
+ 		<module>org.openjdk.jmc.feature.flightrecorder.metadata</module>
+ 		<module>org.openjdk.jmc.feature.ide</module>
+ 		<module>org.openjdk.jmc.feature.ide.launch</module>
+ 		<module>org.openjdk.jmc.feature.jconsole</module>
+-		<module>org.openjdk.jmc.feature.joverflow</module>
+ 		<module>org.openjdk.jmc.feature.license</module>
+ 		<module>org.openjdk.jmc.feature.pde</module>
+ 		<module>org.openjdk.jmc.feature.rcp</module>
+@@ -75,7 +73,6 @@
+ 		<module>org.openjdk.jmc.flightrecorder.controlpanel.ui</module>
+ 		<module>org.openjdk.jmc.flightrecorder.controlpanel.ui.configuration</module>
+ 		<module>org.openjdk.jmc.flightrecorder.ext.g1</module>
+-		<module>org.openjdk.jmc.flightrecorder.ext.jfx</module>
+ 		<module>org.openjdk.jmc.flightrecorder.metadata</module>
+ 		<module>org.openjdk.jmc.flightrecorder.pde</module>
+ 		<module>org.openjdk.jmc.flightrecorder.rules.extensionprovider</module>
+@@ -85,10 +82,7 @@
+ 		<module>org.openjdk.jmc.ide.jdt</module>
+ 		<module>org.openjdk.jmc.ide.launch</module>
+ 		<module>org.openjdk.jmc.ide.ui</module>
+-		<module>org.openjdk.jmc.javafx.osgi</module>
+ 		<module>org.openjdk.jmc.jdp</module>
+-		<module>org.openjdk.jmc.joverflow</module>
+-		<module>org.openjdk.jmc.joverflow.ui</module>
+ 		<module>org.openjdk.jmc.osgi.extension</module>
+ 		<module>org.openjdk.jmc.pde</module>
+ 		<module>org.openjdk.jmc.rcp.application</module>
+diff --git a/application/tests/pom.xml b/application/tests/pom.xml
+--- a/application/tests/pom.xml
++++ b/application/tests/pom.xml
+@@ -48,7 +48,6 @@
+ 		<module>org.openjdk.jmc.greychart.test</module>
+ 		<module>org.openjdk.jmc.ide.launch.test</module>
+ 		<module>org.openjdk.jmc.jdp.test</module>
+-		<module>org.openjdk.jmc.joverflow.test</module>
+ 		<module>org.openjdk.jmc.rjmx.services.jfr.test</module>
+ 		<module>org.openjdk.jmc.rjmx.test</module>
+ 		<module>org.openjdk.jmc.ui.common.test</module>
diff --git a/jmc/5_remove_localisation.patch b/jmc/5_remove_localisation.patch
deleted file mode 100644
index 07c0e00..0000000
--- a/jmc/5_remove_localisation.patch
+++ /dev/null
@@ -1,46 +0,0 @@
---- jmc-7.0.0-orig/application/org.openjdk.jmc.feature.rcp/feature.xml	2018-10-12 12:49:28.249698761 -0400
-+++ jmc-7.0.0/application/org.openjdk.jmc.feature.rcp/feature.xml	2018-10-12 12:53:00.597584868 -0400
-@@ -52,18 +52,10 @@
-          version="0.0.0"/>
- 
-    <includes
--         id="org.openjdk.jmc.feature.rcp.ja"
--         version="0.0.0"/>
--
--   <includes
-          id="org.openjdk.jmc.feature.core"
-          version="0.0.0"/>
- 
-    <includes
--         id="org.openjdk.jmc.feature.rcp.zh_CN"
--         version="0.0.0"/>
--
--   <includes
-          id="org.openjdk.jmc.feature.flightrecorder"
-          version="0.0.0"/>
- 
-@@ -104,24 +96,6 @@
-          unpack="false"/>
- 
-    <plugin
--         id="org.openjdk.jmc.rcp.application.ja"
--         nl="ja_JP,ja"
--         download-size="0"
--         install-size="0"
--         version="0.0.0"
--         fragment="true"
--         unpack="false"/>
--
--   <plugin
--         id="org.openjdk.jmc.rcp.application.zh_CN"
--         nl="zh_CN"
--         download-size="0"
--         install-size="0"
--         version="0.0.0"
--         fragment="true"
--         unpack="false"/>
--
--   <plugin
-          id="org.openjdk.jmc.rcp.intro"
-          download-size="0"
-          install-size="0"
diff --git a/jmc/jmc.spec b/jmc/jmc.spec
index 38c36c9..9db2a30 100644
--- a/jmc/jmc.spec
+++ b/jmc/jmc.spec
@@ -21,21 +21,24 @@ Patch3:     3_remove_profiles.patch
 Patch4:     4_rename_javax-el.patch
 Patch5:     5_remove_localisation.patch
 
-BuildRequires:  ant maven-local javapackages-tools java-openjdk tycho tycho-extras openjfx icu
-BuildRequires:  maven-deploy-plugin buildnumber-maven-plugin maven-enforcer-plugin maven-install-plugin maven-site-plugin 
-BuildRequires:  glassfish-el glassfish-annotation-api atinject glassfish-jsp-api glassfish-jsp batik batik-css
-BuildRequires:  apache-commons-codec apache-commons-io apache-commons-jxpath apache-commons-logging
-BuildRequires:  felix-gogo-command felix-gogo-runtime felix-gogo-shell felix-scr
-BuildRequires:  httpcomponents-client httpcomponents-core
-BuildRequires:  lucene-analysis lucene-analyzers-smartcn lucene apiguardian
-BuildRequires:  eclipse-jdt eclipse-nls-ja eclipse-nls-zh eclipse-platform eclipse-ecf-core eclipse-emf-core eclipse-pde
-BuildRequires:  jetty-continuation jetty-http jetty-io jetty-security jetty-server jetty-servlet jetty-util
-BuildRequires:  eclipse-equinox-osgi eclipse-swt hamcrest-core junit junit5 opentest4j sat4j sac xml-commons-apis xz-java
+Patch4:     4_remove_localization.patch
+Patch5:     5_remove_jfx.patch
+
+BuildRequires:  ant maven-local javapackages-tools tycho tycho-extras icu
+BuildRequires:  maven-deploy-plugin buildnumber-maven-plugin maven-enforcer-plugin maven-install-plugin maven-site-plugin directory-maven-plugin
+#BuildRequires:  glassfish-el glassfish-annotation-api atinject glassfish-jsp-api glassfish-jsp batik batik-css
+#BuildRequires:  apache-commons-codec apache-commons-io apache-commons-jxpath apache-commons-logging
+#BuildRequires:  felix-gogo-command felix-gogo-runtime felix-gogo-shell felix-scr
+#BuildRequires:  httpcomponents-client httpcomponents-core
+#BuildRequires:  lucene-analysis lucene-analyzers-smartcn lucene apiguardian
+BuildRequires:   eclipse-platform eclipse-jdt eclipse-equinox-osgi eclipse-tests
+#BuildRequires:  eclipse-jdt eclipse-platform eclipse-ecf-core eclipse-emf-core eclipse-pde eclipse-equinox-osgi eclipse-swt eclipse-tests
+#BuildRequires:  jetty-continuation jetty-http jetty-io jetty-security jetty-server jetty-servlet jetty-util
+#BuildRequires:  hamcrest-core junit junit5 opentest4j sat4j sac xml-commons-apis xz-java
 BuildRequires:  javamail owasp-java-encoder jmc-core
 
 Requires:       java-openjdk
 
-
 %description
 Java Mission Control is an advanced set of tools that enables efficient and 
 detailed analysis of the extensive data collected by Java Flight Recorder. 
@@ -55,13 +58,16 @@ from Java applications running locally or deployed in production environments.
 %patch5 -p1
 
 %pom_disable_module releng
+%pom_disable_module l10n application
+%pom_disable_module org.openjdk.jmc.updatesite.ide application
+%pom_disable_module org.openjdk.jmc.updatesite.rcp application
 
 %pom_disable_module l10n application
 
 %pom_remove_plugin com.github.spotbugs:spotbugs-maven-plugin
 
 %build
-%mvn_build
+%mvn_build -- -X
 
 %install
 %mvn_install

