JDK Mission Control is a profiling and diagnostics tool
439a2c21e93692d3cc3f917b384a470bd696d7fb..cde866394c77e244f9da5e282c40ff5eec31e8cc
9 days ago CentOS Sources
import rh-jmc-jmc-7.0.0-12.20190211hg62c5279452a6.el7
cde866 diff | tree
19 files added
1 files deleted
1064 ■■■■■ changed files
.gitignore 1 ●●●● patch | view | raw | blame | history
.rh-jmc-jmc.metadata 1 ●●●● patch | view | raw | blame | history
README.md 4 ●●●● patch | view | raw | blame | history
SOURCES/0-remove-twitter.patch 221 ●●●●● patch | view | raw | blame | history
SOURCES/1-javamail.patch 48 ●●●●● patch | view | raw | blame | history
SOURCES/10-fix-ds.patch 24 ●●●●● patch | view | raw | blame | history
SOURCES/11-fix-jfr-message.patch 12 ●●●●● patch | view | raw | blame | history
SOURCES/12-jmc-6313.patch 44 ●●●●● patch | view | raw | blame | history
SOURCES/2-javax.patch 34 ●●●●● patch | view | raw | blame | history
SOURCES/3-remove-profiles.patch 78 ●●●●● patch | view | raw | blame | history
SOURCES/4-remove-localization.patch 47 ●●●●● patch | view | raw | blame | history
SOURCES/5-remove-jfx.patch 74 ●●●●● patch | view | raw | blame | history
SOURCES/6-remove-ide-jdt.patch 27 ●●●●● patch | view | raw | blame | history
SOURCES/7-remove-buchen-repo.patch 15 ●●●●● patch | view | raw | blame | history
SOURCES/8-add-hamcrest.patch 15 ●●●●● patch | view | raw | blame | history
SOURCES/9-remove-arch.patch 24 ●●●●● patch | view | raw | blame | history
SOURCES/jmc.1 24 ●●●●● patch | view | raw | blame | history
SOURCES/rh-jmc-jmc.desktop 8 ●●●●● patch | view | raw | blame | history
SOURCES/symlink_libs.sh 83 ●●●●● patch | view | raw | blame | history
SPECS/jmc.spec 280 ●●●●● patch | view | raw | blame | history
.gitignore
New file
@@ -0,0 +1 @@
SOURCES/62c5279452a6.tar.gz
.rh-jmc-jmc.metadata
New file
@@ -0,0 +1 @@
12595f69470b8ae045b9cc402d6402efe5b26152 SOURCES/62c5279452a6.tar.gz
README.md
File was deleted
SOURCES/0-remove-twitter.patch
New file
@@ -0,0 +1,221 @@
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
@@ -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 --git a/application/pom.xml b/application/pom.xml
--- a/application/pom.xml
+++ b/application/pom.xml
@@ -50,7 +50,6 @@
         <module>org.openjdk.jmc.console.jconsole</module>
         <module>org.openjdk.jmc.console.pde</module>
         <module>org.openjdk.jmc.console.persistence</module>
-        <module>org.openjdk.jmc.console.twitter</module>
         <module>org.openjdk.jmc.console.ui</module>
         <module>org.openjdk.jmc.console.ui.diagnostic</module>
         <module>org.openjdk.jmc.console.ui.mbeanbrowser</module>
@@ -72,7 +71,6 @@
         <module>org.openjdk.jmc.feature.pde</module>
         <module>org.openjdk.jmc.feature.rcp</module>
         <module>org.openjdk.jmc.feature.rcp.update</module>
-        <module>org.openjdk.jmc.feature.twitter</module>
         <module>org.openjdk.jmc.flightrecorder.configuration</module>
         <module>org.openjdk.jmc.flightrecorder.controlpanel.ui</module>
         <module>org.openjdk.jmc.flightrecorder.controlpanel.ui.configuration</module>
diff --git a/license/THIRDPARTYREADME.txt b/license/THIRDPARTYREADME.txt
--- a/license/THIRDPARTYREADME.txt
+++ b/license/THIRDPARTYREADME.txt
@@ -370,187 +370,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
SOURCES/1-javamail.patch
New file
@@ -0,0 +1,48 @@
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
@@ -161,38 +161,24 @@
          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.jakarta.mail"
          download-size="0"
          install-size="0"
          version="0.0.0"
          unpack="false"/>
    <plugin
-         id="javax.mail.imap"
+         id="com.sun.activation.jakarta.activation"
          download-size="0"
          install-size="0"
          version="0.0.0"
          unpack="false"/>
    <plugin
-         id="javax.mail.pop3"
+         id="com.sun.mail.dsn"
          download-size="0"
          install-size="0"
          version="0.0.0"
-         unpack="false"/>
+     unpack="false"/>
-   <plugin
-         id="javax.mail.smtp"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-</feature>
\ No newline at end of file
+</feature>
SOURCES/10-fix-ds.patch
New file
@@ -0,0 +1,24 @@
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
@@ -171,7 +171,7 @@
          unpack="false"/>
    <plugin
-         id="org.eclipse.equinox.ds"
+         id="org.apache.felix.scr"
          download-size="0"
          install-size="0"
          version="0.0.0"
diff --git a/application/org.openjdk.jmc.rcp.product/jmc.product b/application/org.openjdk.jmc.rcp.product/jmc.product
--- a/application/org.openjdk.jmc.rcp.product/jmc.product
+++ b/application/org.openjdk.jmc.rcp.product/jmc.product
@@ -96,7 +96,7 @@
       <plugin id="org.openjdk.jmc.rcp.application" autoStart="false" startLevel="5" />
       <plugin id="org.eclipse.core.runtime" autoStart="true" startLevel="4" />
       <plugin id="org.eclipse.equinox.common" autoStart="true" startLevel="2" />
-      <plugin id="org.eclipse.equinox.ds" autoStart="true" startLevel="2" />
+      <plugin id="org.apache.felix.scr" autoStart="true" startLevel="2" />
       <plugin id="org.eclipse.equinox.p2.reconciler.dropins" autoStart="true" startLevel="4" />
       <plugin id="org.eclipse.equinox.simpleconfigurator" autoStart="true" startLevel="1" />
       <plugin id="org.eclipse.equinox.util" autoStart="true" startLevel="2" />
SOURCES/11-fix-jfr-message.patch
New file
@@ -0,0 +1,12 @@
diff --git a/application/org.openjdk.jmc.rjmx/src/main/resources/org/openjdk/jmc/rjmx/messages/internal/messages.properties b/application/org.openjdk.jmc.rjmx/src/main/resources/org/openjdk/jmc/rjmx/messages/internal/messages.properties
--- a/application/org.openjdk.jmc.rjmx/src/main/resources/org/openjdk/jmc/rjmx/messages/internal/messages.properties
+++ b/application/org.openjdk.jmc.rjmx/src/main/resources/org/openjdk/jmc/rjmx/messages/internal/messages.properties
@@ -54,7 +54,7 @@
 JVMSupport_FLIGHT_RECORDER_NOT_FULLY_SUPPORTED_OLD_HOTSPOT_SHORT=Flight Recorder is not fully supported for JVMs with Java versions below 7u40
 JVMSupport_FLIGHT_RECORDER_NOT_SUPPORTED_NOT_HOTSPOT=Flight Recorder is not supported for non HotSpot JVMs
 JVMSupport_FLIGHT_RECORDER_NOT_SUPPORTED_NOT_HOTSPOT_SHORT=Flight Recorder is not supported for non HotSpot JVMs
-JVMSupport_FLIGHT_RECORDER_NOT_ENABLED=Flight Recorder features are not enabled. To enable this you need to use a Java 7u4 or later JVM started with -XX:+UnlockCommercialFeatures -XX:+FlightRecorder.
+JVMSupport_FLIGHT_RECORDER_NOT_ENABLED=Flight Recorder features are not enabled. To enable this the target application needs to use OpenJDK 11+ or Oracle Java 7u4+ started with -XX:+UnlockCommercialFeatures -XX:+FlightRecorder.
 JVMSupport_FLIGHT_RECORDER_NOT_ENABLED_SHORT=Flight Recorder features are not enabled
 JVMSupport_FLIGHT_RECORDER_DISABLED=Flight Recorder is explicitly disabled. To enable the Flight Recorder, remove -XX:-FlightRecorder from the command line.
 JVMSupport_FLIGHT_RECORDER_DISABLED_SHORT=Flight Recorder is explicitly disabled
SOURCES/12-jmc-6313.patch
New file
@@ -0,0 +1,44 @@
diff --git a/application/org.openjdk.jmc.rcp.application/src/main/java/org/openjdk/jmc/rcp/application/ApplicationActionBarAdvisor.java b/application/org.openjdk.jmc.rcp.application/src/main/java/org/openjdk/jmc/rcp/application/ApplicationActionBarAdvisor.java
--- a/application/org.openjdk.jmc.rcp.application/src/main/java/org/openjdk/jmc/rcp/application/ApplicationActionBarAdvisor.java
+++ b/application/org.openjdk.jmc.rcp.application/src/main/java/org/openjdk/jmc/rcp/application/ApplicationActionBarAdvisor.java
@@ -253,9 +253,15 @@
         menu.add(new GroupMarker(IWorkbenchActionConstants.IMPORT_EXT));
         menu.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
-        // these three lines create the list of "recent" files
-        menu.add(ContributionItemFactory.REOPEN_EDITORS.create(window));
-        menu.add(new GroupMarker(IWorkbenchActionConstants.MRU));
+        // this is where OPEN_CONNECTION is placed via plugin.xml from org.openjdk.jmc.browser
+        menu.add(new Separator());
+
+        // create a submenu for the list of Recent Files
+        MenuManager recentMenu = new MenuManager(Messages.ApplicationActionBarAdvisor_MENU_RECENT_FILES_TEXT,
+                ContributionItemFactory.REOPEN_EDITORS.getId());
+        recentMenu.add(ContributionItemFactory.REOPEN_EDITORS.create(window));
+        recentMenu.add(new GroupMarker(IWorkbenchActionConstants.MRU));
+        menu.add(recentMenu);
         menu.add(new Separator());
         menu.add(getAction(ActionFactory.QUIT.getId()));
diff --git a/application/org.openjdk.jmc.rcp.application/src/main/java/org/openjdk/jmc/rcp/application/Messages.java b/application/org.openjdk.jmc.rcp.application/src/main/java/org/openjdk/jmc/rcp/application/Messages.java
--- a/application/org.openjdk.jmc.rcp.application/src/main/java/org/openjdk/jmc/rcp/application/Messages.java
+++ b/application/org.openjdk.jmc.rcp.application/src/main/java/org/openjdk/jmc/rcp/application/Messages.java
@@ -46,6 +46,7 @@
     public static String ApplicationActionBarAdvisor_MENU_ITEM_OTN_TEXT;
     public static String ApplicationActionBarAdvisor_MENU_NAVIGATE_TEXT;
     public static String ApplicationActionBarAdvisor_MENU_NEW_TEXT;
+    public static String ApplicationActionBarAdvisor_MENU_RECENT_FILES_TEXT;
     public static String ApplicationActionBarAdvisor_MENU_WINDOW_TEXT;
     public static String ApplicationActionBarAdvisor_SHOW_PERSPECTIVE_MENU_TEXT;
     public static String ApplicationActionBarAdvisor_SHOW_VIEW_MENU_TEXT;
diff --git a/application/org.openjdk.jmc.rcp.application/src/main/resources/org/openjdk/jmc/rcp/application/messages.properties b/application/org.openjdk.jmc.rcp.application/src/main/resources/org/openjdk/jmc/rcp/application/messages.properties
--- a/application/org.openjdk.jmc.rcp.application/src/main/resources/org/openjdk/jmc/rcp/application/messages.properties
+++ b/application/org.openjdk.jmc.rcp.application/src/main/resources/org/openjdk/jmc/rcp/application/messages.properties
@@ -42,6 +42,7 @@
 ApplicationActionBarAdvisor_MENU_ITEM_FORUM_TEXT=Forum
 ApplicationActionBarAdvisor_MENU_FILE_TEXT=&File
 ApplicationActionBarAdvisor_MENU_NEW_TEXT=&New
+ApplicationActionBarAdvisor_MENU_RECENT_FILES_TEXT=&Recent Files
 ApplicationWorkbenchAdvisor_HIGH_CONTRAST_MODE_MESSAGE_TITLE=Display Settings Change
 ApplicationWorkbenchAdvisor_HIGH_CONTRAST_MODE_MESSAGE_TEXT=The system font size or high contrast mode has changed. You will need to restart Mission Control to complete the change.
 ApplicationWorkbenchAdvisor_OK_BUTTON_TEXT=Ok
SOURCES/2-javax.patch
New file
@@ -0,0 +1,34 @@
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
@@ -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-api;bundle-version="1.2.0";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.0",
  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,8 @@
       <import plugin="org.eclipse.ui.intro"/>
       <import plugin="org.eclipse.ui.net"/>
       <import plugin="org.eclipse.equinox.event"/>
-      <import plugin="javax.el"/>
+      <import plugin="javax.el-api"/>
+      <import plugin="jakarta.activation-api"/>
       <import plugin="org.eclipse.equinox.p2.director.app"/>
    </requires>
SOURCES/3-remove-profiles.patch
New file
@@ -0,0 +1,78 @@
diff --git a/pom.xml b/pom.xml
--- a/pom.xml
+++ b/pom.xml
@@ -95,74 +95,6 @@
             <url>${snapshot.repo}</url>
         </snapshotRepository>
     </distributionManagement>
-    <profiles>
-        <profile>
-            <id>photon</id>
-            <activation>
-                <activeByDefault>true</activeByDefault>
-            </activation>
-            <build>
-                <plugins>
-                    <plugin>
-                        <groupId>org.eclipse.tycho</groupId>
-                        <artifactId>target-platform-configuration</artifactId>
-                        <version>${tycho.version}</version>
-                        <configuration>
-                            <target>
-                                <artifact>
-                                    <groupId>org.openjdk.jmc</groupId>
-                                    <artifactId>platform-definition-photon</artifactId>
-                                    <version>7.0.0-SNAPSHOT</version>
-                                </artifact>
-                            </target>
-                        </configuration>
-                    </plugin>
-                </plugins>
-            </build>
-        </profile>
-        <profile>
-            <id>oxygen</id>
-            <build>
-                <plugins>
-                    <plugin>
-                        <groupId>org.eclipse.tycho</groupId>
-                        <artifactId>target-platform-configuration</artifactId>
-                        <version>${tycho.version}</version>
-                        <configuration>
-                            <target>
-                                <artifact>
-                                    <groupId>org.openjdk.jmc</groupId>
-                                    <artifactId>platform-definition-oxygen</artifactId>
-                                    <version>7.0.0-SNAPSHOT</version>
-                                </artifact>
-                            </target>
-                        </configuration>
-                    </plugin>
-                </plugins>
-            </build>
-        </profile>
-        <profile>
-            <id>2018-09</id>
-            <build>
-                <plugins>
-                    <plugin>
-                        <groupId>org.eclipse.tycho</groupId>
-                        <artifactId>target-platform-configuration</artifactId>
-                        <version>${tycho.version}</version>
-                        <configuration>
-                            <target>
-                                <artifact>
-                                    <groupId>org.openjdk.jmc</groupId>
-                                    <artifactId>platform-definition-2018-09</artifactId>
-                                    <version>7.0.0-SNAPSHOT</version>
-                                </artifact>
-                            </target>
-                        </configuration>
-                    </plugin>
-                </plugins>
-            </build>
-        </profile>
-    </profiles>
     <build>
         <plugins>
             <plugin>
SOURCES/4-remove-localization.patch
New file
@@ -0,0 +1,47 @@
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"/>
@@ -105,24 +97,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"
SOURCES/5-remove-jfx.patch
New file
@@ -0,0 +1,74 @@
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/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>
SOURCES/6-remove-ide-jdt.patch
New file
@@ -0,0 +1,27 @@
diff --git a/application/org.openjdk.jmc.feature.ide/feature.xml b/application/org.openjdk.jmc.feature.ide/feature.xml
--- a/application/org.openjdk.jmc.feature.ide/feature.xml
+++ b/application/org.openjdk.jmc.feature.ide/feature.xml
@@ -65,11 +65,4 @@
          install-size="0"
          version="0.0.0"
          unpack="false"/>
-
-   <plugin
-         id="org.openjdk.jmc.ide.jdt"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
 </feature>
\ No newline at end of file
diff --git a/application/pom.xml b/application/pom.xml
--- a/application/pom.xml
+++ b/application/pom.xml
@@ -79,7 +79,6 @@
         <module>org.openjdk.jmc.flightrecorder.ui</module>
         <module>org.openjdk.jmc.greychart</module>
         <module>org.openjdk.jmc.greychart.ui</module>
-        <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.jdp</module>
SOURCES/7-remove-buchen-repo.patch
New file
@@ -0,0 +1,15 @@
diff --git a/application/org.openjdk.jmc.rcp.product/pom.xml b/application/org.openjdk.jmc.rcp.product/pom.xml
--- a/application/org.openjdk.jmc.rcp.product/pom.xml
+++ b/application/org.openjdk.jmc.rcp.product/pom.xml
@@ -141,11 +141,4 @@
         </plugins>
         <directory>../../target/</directory>
     </build>
-    <pluginRepositories>
-        <pluginRepository>
-            <id>buchen-maven-repo</id>
-            <url>http://buchen.github.io/maven-repo</url>
-            <layout>default</layout>
-        </pluginRepository>
-    </pluginRepositories>
 </project>
SOURCES/8-add-hamcrest.patch
New file
@@ -0,0 +1,15 @@
diff --git a/application/tests/org.openjdk.jmc.rjmx.services.jfr.test/META-INF/MANIFEST.MF b/application/tests/org.openjdk.jmc.rjmx.services.jfr.test/META-INF/MANIFEST.MF
--- a/application/tests/org.openjdk.jmc.rjmx.services.jfr.test/META-INF/MANIFEST.MF
+++ b/application/tests/org.openjdk.jmc.rjmx.services.jfr.test/META-INF/MANIFEST.MF
@@ -12,7 +12,9 @@
  org.openjdk.jmc.rjmx.services.jfr,
  org.openjdk.jmc.rjmx,
  org.openjdk.jmc.common,
- org.openjdk.jmc.flightrecorder.configuration
+ org.openjdk.jmc.flightrecorder.configuration,
+ org.hamcrest.core
 Export-Package: org.openjdk.jmc.rjmx.services.jfr.test
 Automatic-Module-Name: org.openjdk.jmc.rjmx.services.jfr.test
-Import-Package: org.openjdk.jmc.flightrecorder.jdk
+Import-Package: org.openjdk.jmc.flightrecorder.jdk,
+ org.hamcrest.core
SOURCES/9-remove-arch.patch
New file
@@ -0,0 +1,24 @@
diff --git a/pom.xml b/pom.xml
--- a/pom.xml
+++ b/pom.xml
@@ -112,20 +112,10 @@
                 <configuration>
                     <environments>
                         <environment>
-                            <os>win32</os>
-                            <ws>win32</ws>
-                            <arch>x86_64</arch>
-                        </environment>
-                        <environment>
                             <os>linux</os>
                             <ws>gtk</ws>
                             <arch>x86_64</arch>
                         </environment>
-                        <environment>
-                            <os>macosx</os>
-                            <ws>cocoa</ws>
-                            <arch>x86_64</arch>
-                        </environment>
                     </environments>
                 </configuration>
             </plugin>
SOURCES/jmc.1
New file
@@ -0,0 +1,24 @@
.TH JMC 1
.SH NAME
jmc \- Java profiling and diagnostics tool
.SH SYNOPSIS
.B jmc
[\fB\-vm\fR \fIJVM\fR]
.SH DESCRIPTION
JDK Mission Control is a powerful profiler for HotSpot JVMs and has an
advanced set of tools that enables efficient and detailed analysis of the
extensive data collected by JDK Flight Recorder.
The tool chain enables developers and administrators to collect and analyze data
from Java applications running locally or deployed in production environments.
.SH OPTIONS
.TP
.BR \-vm \fIJVM\fR
Specify path to the JVM you wish to use for running JDK Mission Control.
Defaults to system Java.
.SH FILES
.RS
Startup options are specified here.
The -vm option can be set here as well to avoid specifying at startup.
Options specified at startup will override values in this file.
.SH BUGS
Report bugs to JMC mailing list: <jmc-dev at openjdk dot java dot net>
SOURCES/rh-jmc-jmc.desktop
New file
@@ -0,0 +1,8 @@
[Desktop Entry]
Name=JDK Mission Control
Comment=Analyze performance of Java applications
Exec=scl enable rh-jmc jmc
Icon=rh-jmc-jmc
Terminal=false
Type=Application
Categories=Development;Java;Profiling;
SOURCES/symlink_libs.sh
New file
@@ -0,0 +1,83 @@
#!/bin/bash
# This script replaces plugins with symlinks
# $1 : folder to replace with symlinks
set -e
SCL_JAVA_DIRS=${@:2}
pushd () {
    command pushd "$@" > /dev/null
}
popd () {
    command popd "$@" > /dev/null
}
function _sym {
    if [ -f $1 ]; then
        echo "linking $1 to $2"
        rm -rf $1
        ln -s $2 $1
    else
        exit 1
    fi
}
pushd $1
    # rh-jmc-owasp-java-encoder
    _sym org.owasp.encoder_1.2.2.jar /opt/rh/rh-jmc/root/usr/share/java/owasp-java-encoder/encoder.jar
    # rh-jmc-jaf
    _sym com.sun.activation.jakarta.activation_1.2.1.jar /opt/rh/rh-jmc/root/usr/share/java/jaf/jakarta.activation.jar
    _sym jakarta.activation-api_1.2.1.jar /opt/rh/rh-jmc/root/usr/share/java/jaf/jakarta.activation-api.jar
    # rh-jmc-javamail
    _sym com.sun.mail.jakarta.mail_1.6.3.jar /opt/rh/rh-jmc/root/usr/share/java/javamail/jakarta.mail.jar
    _sym com.sun.mail.dsn_1.6.3.jar /opt/rh/rh-jmc/root/usr/share/java/javamail/dsn.jar
    # rh-jmc-jmc-core
    _sym org.openjdk.jmc.common_7.0.0.jar /opt/rh/rh-jmc/root/usr/share/java/jmc-core/common.jar
    _sym org.openjdk.jmc.flightrecorder_7.0.0.jar /opt/rh/rh-jmc/root/usr/share/java/jmc-core/flightrecorder.jar
    _sym org.openjdk.jmc.flightrecorder.rules_7.0.0.jar /opt/rh/rh-jmc/root/usr/share/java/jmc-core/flightrecorder.rules.jar
    _sym org.openjdk.jmc.flightrecorder.rules.jdk_7.0.0.jar /opt/rh/rh-jmc/root/usr/share/java/jmc-core/flightrecorder.rules.jdk.jar
popd
function _symlink {
    _f=$(ls | grep -e "^$1" || :)
    if [ -n "$_f" ] ; then
        rm -rf $_f
        for SCL_JAVA_DIR in ${SCL_JAVA_DIRS}; do
            if [ -f ${SCL_JAVA_DIR}/$2  ]; then
                echo "found ${SCL_JAVA_DIR}/$2"
                echo "linking $1 to $2"
                ln -s ${SCL_JAVA_DIR}/$2 ${_f%.jar}.jar
                return 0
            fi
        done
        echo "not found $2 in any of ${SCL_JAVA_DIRS}"
        exit 1
    fi
}
pushd $1
    _symlink javax.annotation-api_ glassfish-annotation-api.jar
    _symlink com.sun.el.javax.el_ glassfish-el.jar
    _symlink javax.el-api_ glassfish-el-api.jar
    _symlink javax.inject_ atinject.jar
    _symlink javax.servlet.jsp_ glassfish-jsp-api/javax.servlet.jsp-api.jar
    _symlink javax.servlet-api_ glassfish-servlet-api.jar
    _symlink org.apache.commons.codec_ commons-codec.jar
    _symlink org.apache.commons.io_ commons-io.jar
    _symlink org.apache.commons.jxpath_ commons-jxpath.jar
    _symlink org.apache.commons.logging_ commons-logging.jar
    _symlink org.apache.httpcomponents.httpcore_ httpcomponents/httpcore.jar
    _symlink org.apache.httpcomponents.httpclient_ httpcomponents/httpclient.jar
    _symlink org.tukaani.xz_ xz-java.jar
    _symlink org.w3c.dom.svg_ xml-commons-apis-ext.jar
    _symlink org.xmlpull_ xpp3.jar
popd
SPECS/jmc.spec
New file
@@ -0,0 +1,280 @@
# https://src.fedoraproject.org/rpms/jmc/raw/jmc/f/jmc.spec
%{?scl:%scl_package jmc}
%{!?scl:%global pkg_name %{name}}
# Version
%global major 7
%global minor 0
%global patchlevel 0
# Revision
%global revnum 12
# set to 1 for hg snapshots, 0 for release
%global usesnapshot 1
# SNAPSHOT version
%global hgrevhash 62c5279452a6
%global hgrevdate 20190211
%global tarball_name jmc7-%{hgrevhash}
# Install jmc in /usr/lib/jmc (arch-specific and multilib exempt)
%global _jmcdir %{_prefix}/lib/%{pkg_name}
%if %{usesnapshot}
  %global releasestr %{revnum}.%{hgrevdate}hg%{hgrevhash}
%else
  %global releasestr %{revnum}
%endif
%ifarch %{ix86}
    %global eclipse_arch x86
%endif
%ifarch %{arm}
    %global eclipse_arch arm
%endif
%ifarch s390x x86_64 aarch64 ppc64le
    %global eclipse_arch %{_arch}
%endif
# Don't export Eclipse libraries
%global __provides_exclude_from ^%{_jmcdir}/plugins/org.eclipse.*$
Name:       %{scl_prefix}jmc
Version:    %{major}.%{minor}.%{patchlevel}
Release:    %{releasestr}%{?dist}
Summary:    JDK Mission Control is a profiling and diagnostics tool
License:    UPL
URL:        http://openjdk.java.net/projects/jmc/
Source0:    https://hg.openjdk.java.net/jmc/jmc7/archive/62c5279452a6.tar.gz
Source1:    %{name}.desktop
Source2:    %{pkg_name}.1
Source3:    symlink_libs.sh
# Remove optional twitter related functionality
Patch0:     0-remove-twitter.patch
# Update javamail dependency names to match what is found in Fedora
Patch1:     1-javamail.patch
# Update javax dependency names to match what is found in Fedora
Patch2:     2-javax.patch
# Remove maven build profiles that won't be used in local build
Patch3:     3-remove-profiles.patch
# Remove localization files that currently cannot be supported
# due to a packaging issue for Eclipse language packs
# eclipse-nls-ja and eclipse-nls-zh
# They currently provide multiple archs within the same package
# and the local build system cannot fulfill dependencies from them
Patch4:     4-remove-localization.patch
# Remove optional openjfx related functionality
Patch5:     5-remove-jfx.patch
# Remove unused module org.openjdk.jmc.ide.jdt
Patch6:     6-remove-ide-jdt.patch
# Remove unused remote repository definition
Patch7:     7-remove-buchen-repo.patch
# Add dependency on org. hamcrest-core to provide class used in unit tests
Patch8:     8-add-hamcrest.patch
# Remove windows and mac arches
Patch9:     9-remove-arch.patch
# Use ds package that is not deprecated and marked for removal in next release
Patch10:    10-fix-ds.patch
# Updates message for Java versions that support JFR
Patch11:    11-fix-jfr-message.patch
# Fixes issue with dialogs. This patch is in latest upstream but not backported to jmc7
Patch12:    12-jmc-6313.patch
BuildRequires:  desktop-file-utils
BuildRequires:  %{?scl_prefix_maven}maven-local
BuildRequires:  %{?scl_prefix_maven}mvn(org.apache.maven.plugins:maven-enforcer-plugin)
BuildRequires:  %{?scl_prefix_maven}osgi(javax.annotation-api)
BuildRequires:  %{?scl_prefix_eclipse}eclipse-pde
BuildRequires:  %{?scl_prefix_eclipse}tycho
BuildRequires:  %{?scl_prefix_jmc}javamail
BuildRequires:  %{?scl_prefix_jmc}mvn(org.commonjava.maven.plugins:directory-maven-plugin)
BuildRequires:  %{?scl_prefix_jmc}mvn(com.sun.activation:jakarta.activation)
BuildRequires:  %{?scl_prefix_jmc}mvn(org.openjdk.jmc:common)
Requires:  java-openjdk >= 1:1.8
Requires:  %{?scl_prefix_jmc}osgi(com.sun.activation.jakarta.activation)
Requires:  %{?scl_prefix_jmc}osgi(jakarta.mail.api)
Requires:  %{?scl_prefix_jmc}osgi(org.openjdk.jmc.common)
Requires:  %{?scl_prefix_jmc}osgi(org.openjdk.jmc.flightrecorder)
Requires:  %{?scl_prefix_jmc}osgi(org.openjdk.jmc.flightrecorder.rules)
Requires:  %{?scl_prefix_jmc}osgi(org.openjdk.jmc.flightrecorder.rules.jdk)
Requires:  %{?scl_prefix_jmc}osgi(org.owasp.encoder)
Requires: %{?scl_prefix_maven}apache-commons-codec
Requires: %{?scl_prefix_maven}apache-commons-io
Requires: %{?scl_prefix_maven}apache-commons-jxpath
Requires: %{?scl_prefix_maven}apache-commons-logging
Requires: %{?scl_prefix_maven}atinject
Requires: %{?scl_prefix_maven}glassfish-annotation-api
Requires: %{?scl_prefix_maven}glassfish-el >= 3.0.1
Requires: %{?scl_prefix_maven}glassfish-el-api >= 3.0.1
Requires: %{?scl_prefix_maven}glassfish-jsp-api >= 2.2.1-4
Requires: %{?scl_prefix_maven}glassfish-servlet-api >= 3.1.0
Requires: %{?scl_prefix_maven}httpcomponents-client
Requires: %{?scl_prefix_maven}httpcomponents-core
Requires: %{?scl_prefix_maven}jsch >= 0.1.46-2
Requires: %{?scl_prefix_maven}osgi(org.tukaani.xz)
Requires: %{?scl_prefix_maven}xml-commons-apis
Requires: %{?scl_prefix_maven}xpp3
Requires: gtk3
Requires: webkitgtk4
Requires: libGLU.so.1()(64bit)
%description
JDK Mission Control is a powerful profiler for HotSpot JVMs and has an
advanced set of tools that enables efficient and detailed analysis of the
extensive data collected by JDK Flight Recorder. The tool chain enables
developers and administrators to collect and analyze data from Java
applications running locally or deployed in production environments.
%prep
%setup -q -n %{tarball_name}
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
%patch8 -p1
%patch9 -p1
%patch10 -p1
%patch11 -p1
%patch12 -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_remove_plugin com.github.spotbugs:spotbugs-maven-plugin
# Info.plist are mac files and we only build for Linux
%pom_remove_plugin name.abuchen:fix-info-plist-maven-plugin application/org.openjdk.jmc.rcp.product
%pom_remove_plugin org.codehaus.mojo:buildnumber-maven-plugin
%pom_remove_plugin org.apache.maven.plugins:maven-deploy-plugin
TYCHO_ENV="<environment><os>linux</os><ws>gtk</ws><arch>%{eclipse_arch}</arch></environment>"
%pom_xpath_set "pom:configuration/pom:environments" "$TYCHO_ENV"
%build
%{?scl:scl enable %{scl} %{scl_maven} %{scl_eclipse} - << "EOFSCL"}
# some tests require large heap and fail with OOM
# depending on the builder resources
%mvn_build -j -- -Dmaven.test.failure.ignore=true -Dmaven.test.skip=true
%{?scl:EOFSCL}
%install
# not using mvn_install macro because it installs JMC as an Eclipse plugin
# we want to install JMC as an RCP application
# change jmc.ini to use system java (remove -vm option line)
sed -i '/^-vm$/d' %{_builddir}/%{tarball_name}/target/products/org.openjdk.jmc/%{_os}/gtk/%{eclipse_arch}/%{pkg_name}.ini
sed -i '/^..\/..\/bin\/$/d' %{_builddir}/%{tarball_name}/target/products/org.openjdk.jmc/%{_os}/gtk/%{eclipse_arch}/%{pkg_name}.ini
# add IgnoreUnrecognizedVMOptions flag to allow running on OpenJDK 8 without 'Unrecognized VM option' error
sed -i '/^-vmargs$/a -XX:+IgnoreUnrecognizedVMOptions' %{_builddir}/%{tarball_name}/target/products/org.openjdk.jmc/%{_os}/gtk/%{eclipse_arch}/%{pkg_name}.ini
# move contents of target/products/org.openjdk.jmc/${_os}/gtk/%{eclipse_arch}/ to /usr/lib/jmc/
install -d -m 755 %{buildroot}%{_jmcdir}
cp -p -r %{_builddir}/%{tarball_name}/target/products/org.openjdk.jmc/%{_os}/gtk/%{eclipse_arch}/* %{buildroot}%{_jmcdir}/
# move jmc.ini to /etc/jmc.ini
install -d -m 755 %{buildroot}%{_sysconfdir}
mv %{buildroot}%{_jmcdir}/%{pkg_name}.ini %{buildroot}%{_sysconfdir}/%{pkg_name}.ini
ln -s %{_sysconfdir}/%{pkg_name}.ini %{buildroot}%{_jmcdir}/%{pkg_name}.ini
# create symlink to jmc in /usr/bin/
install -d -m 755 %{buildroot}%{_bindir}
ln -s %{_jmcdir}/%{pkg_name} %{buildroot}%{_bindir}/%{pkg_name}
# replace jars with symlinks to installed libraries
bash %{SOURCE3} %{buildroot}%{_jmcdir}/plugins %{_javadir} %{_jnidir} %{_javadir_maven} %{_jnidir_maven}
# create application launcher in desktop menu
install -d -m 755 %{buildroot}%{_root_datadir}/pixmaps
mv %{buildroot}%{_jmcdir}/icon.xpm %{buildroot}%{_root_datadir}/pixmaps/%{name}.xpm
chmod 644 %{buildroot}%{_root_datadir}/pixmaps/%{name}.xpm
desktop-file-install --dir=%{buildroot}%{_root_datadir}/applications %{SOURCE1}
# install pom file
install -d -m 755 %{buildroot}%{_datadir}/maven-poms/%{pkg_name}
install -p -m 644 %{_builddir}/%{tarball_name}/pom.xml %{buildroot}%{_datadir}/maven-poms/%{pkg_name}/%{pkg_name}.pom
# install manpage and insert location of config file
install -d -m 755 %{buildroot}%{_mandir}/man1
install -p -m 644 %{SOURCE2} %{buildroot}%{_mandir}/man1/%{pkg_name}.1
sed -i "/.SH FILES/a .I %{_sysconfdir}/%{pkg_name}.ini" %{buildroot}%{_mandir}/man1/%{pkg_name}.1
%files
%license license/LICENSE.txt
%license license/THIRDPARTYREADME.txt
%doc README.md
%config(noreplace) %{_sysconfdir}/%{pkg_name}.ini
%{_jmcdir}
%{_mandir}/man1/%{pkg_name}.1*
%{_bindir}/%{pkg_name}
%{_datadir}/maven-poms/%{pkg_name}
%{_root_datadir}/pixmaps/%{name}.xpm
%{_root_datadir}/applications/%{name}.desktop
%changelog
* Tue Mar 12 2019 Jie Kang <jkang@redhat.com> - 7.0.0-12.20190211hg62c5279452a6
- Bump revnum for rebuild
* Wed Mar 06 2019 Jie Kang <jkang@redhat.com> - 7.0.0-11.20190211hg62c5279452a6
- Fix JMC name
* Tue Mar 05 2019 Jie Kang <jkang@redhat.com> - 7.0.0-10.20190211hg62c5279452a6
- Add two patches fixing text and dialog issues
* Tue Mar 05 2019 Jie Kang <jkang@redhat.com> - 7.0.0-9.20190211hg62c5279452a6
- Add more explicit requires for SWT library dependencies
* Tue Mar 05 2019 Jie Kang <jkang@redhat.com> - 7.0.0-8.20190211hg62c5279452a6
- Add explicit requires for SWT library dependencies
* Thu Feb 28 2019 Jie Kang <jkang@redhat.com> - 7.0.0-7.20190211hg62c5279452a6
- Apply ds patch
* Thu Feb 28 2019 Jie Kang <jkang@redhat.com> - 7.0.0-6.20190211hg62c5279452a6
- Preemptively fix ds package issue
* Wed Feb 27 2019 Jie Kang <jkang@redhat.com> - 7.0.0-5.20190211hg62c5279452a6
- Update desktop icon
- Update to latest jmc/jmc7 revision 62c5279452a6
* Tue Feb 26 2019 Jie Kang <jkang@redhat.com> - 7.0.0-4.20190204hgbfd2c61eb116
- Symlink rh-jmc libs
- Fix BuildRequires
- Add Requires for maven35 packages and JDK 8
* Thu Feb 14 2019 Jie Kang <jkang@redhat.com> - 7.0.0-3.20190204hgbfd2c61eb116
- Keep p2 folder
* Fri Feb 08 2019 Jie Kang <jkang@redhat.com> - 7.0.0-2.20190204hgbfd2c61eb116
- Update to jmc7 revision bfd2c61eb116
* Mon Jan 21 2019 Jie Kang <jkang@redhat.com> - 7.0.0-1.20181130hg1ddf3baa4e26
- SCL-ize package
* Fri Nov 30 2018 Salman Siddiqui <sasiddiq@redhat.com> - 7.0.0-0.20181130hg1ddf3baa4e26
- Update to latest snapshot version
* Fri Sep 14 2018 Salman Siddiqui <sasiddiq@redhat.com> - 7.0.0-0
- Initial packaging