From 85226840dbe9f5547dd2778734415d6283c90258 Mon Sep 17 00:00:00 2001
From: Mat Booth <mat.booth@redhat.com>
Date: Fri, 7 Dec 2018 10:17:02 +0000
Subject: [PATCH 2/3] Don't embed versions of third-party libs, use feature
 requirements instead

---
 .../org.eclipse.jgit.feature/feature.xml      | 83 +++----------------
 .../feature.xml                               | 16 +---
 .../feature.xml                               | 24 +-----
 .../org.eclipse.jgit.lfs.feature/feature.xml  |  8 +-
 .../org.eclipse.jgit.pgm.feature/feature.xml  | 24 +-----
 .../feature.xml                               | 24 +-----
 6 files changed, 24 insertions(+), 155 deletions(-)

diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.feature/feature.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.feature/feature.xml
index d213b7b..1783bb1 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.feature/feature.xml
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.feature/feature.xml
@@ -22,6 +22,18 @@
       <discovery label="%updateSiteName" url="http://download.eclipse.org/egit/updates"/>
    </url>
 
+   <requires>
+      <import plugin="com.googlecode.javaewah.JavaEWAH" />
+      <import plugin="com.jcraft.jsch" />
+      <import plugin="com.jcraft.jzlib"/>
+      <import plugin="org.apache.commons.compress" />
+      <import plugin="slf4j.api" />
+      <import plugin="slf4j.simple" />
+      <import plugin="bcpg" />
+      <import plugin="bcpkix" />
+      <import plugin="bcprov" />
+   </requires>
+
    <plugin
          id="org.eclipse.jgit"
          download-size="0"
@@ -36,75 +48,4 @@
          version="0.0.0"
          unpack="false"/>
 
-   <plugin
-         id="com.jcraft.jsch"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-   <plugin
-         id="javaewah"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-   <plugin
-         id="org.apache.commons.compress"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-   <plugin
-         id="org.slf4j.api"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-   <plugin
-         id="org.slf4j.impl.log4j12"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         fragment="true"
-         unpack="false"/>
-
-   <plugin
-         id="org.apache.log4j"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-   <plugin
-         id="com.jcraft.jzlib"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-   <plugin
-         id="org.bouncycastle.bcpg"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-   <plugin
-         id="org.bouncycastle.bcpkix"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-   <plugin
-         id="org.bouncycastle.bcprov"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
 </feature>
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.http.apache.feature/feature.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.http.apache.feature/feature.xml
index f45fb19..1f70cc1 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.http.apache.feature/feature.xml
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.http.apache.feature/feature.xml
@@ -24,6 +24,8 @@
 
    <requires>
       <import plugin="org.eclipse.jgit" version="5.4.0" match="equivalent"/>
+      <import plugin="org.apache.httpcomponents.httpcore"/>
+      <import plugin="org.apache.httpcomponents.httpclient"/>
    </requires>
 
    <plugin
@@ -33,18 +35,4 @@
          version="0.0.0"
          unpack="false"/>
 
-   <plugin
-         id="org.apache.httpcomponents.httpcore"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-   <plugin
-         id="org.apache.httpcomponents.httpclient"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
 </feature>
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.junit.feature/feature.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.junit.feature/feature.xml
index 34a0868..d6b8125 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.junit.feature/feature.xml
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.junit.feature/feature.xml
@@ -25,6 +25,9 @@
    <requires>
       <import plugin="com.jcraft.jsch"/>
       <import plugin="org.eclipse.jgit" version="5.4.0" match="equivalent"/>
+      <import plugin="org.apache.commons.logging"/>
+      <import plugin="org.apache.sshd.osgi"/>
+      <import plugin="org.apache.sshd.sftp"/>
    </requires>
 
    <plugin
@@ -55,25 +58,4 @@
          version="0.0.0"
          unpack="false"/>
 
-   <plugin
-         id="org.apache.commons.logging"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-   <plugin
-         id="org.apache.sshd.osgi"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-   <plugin
-         id="org.apache.sshd.sftp"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
 </feature>
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.lfs.feature/feature.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.lfs.feature/feature.xml
index 8213753..3c5598b 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.lfs.feature/feature.xml
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.lfs.feature/feature.xml
@@ -24,6 +24,7 @@
 
    <requires>
       <import feature="org.eclipse.jgit" version="5.4.0" match="equivalent"/>
+      <import plugin="com.google.gson"/>
    </requires>
 
    <plugin
@@ -40,11 +41,4 @@
          version="0.0.0"
          unpack="false"/>
 
-   <plugin
-         id="com.google.gson"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
 </feature>
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.feature/feature.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.feature/feature.xml
index f6c9cfc..82caaa8 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.feature/feature.xml
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.feature/feature.xml
@@ -38,6 +38,9 @@
       <import feature="org.eclipse.jgit" version="5.4.0" match="equivalent"/>
       <import feature="org.eclipse.jgit.lfs" version="5.4.0" match="equivalent"/>
       <import feature="org.eclipse.jgit.ssh.apache" version="5.4.0" match="equivalent"/>
+      <import plugin="com.googlecode.javaewah.JavaEWAH" />
+      <import plugin="org.apache.commons.compress" />
+      <import plugin="org.kohsuke.args4j"/>
    </requires>
 
    <plugin
@@ -54,25 +57,4 @@
          version="0.0.0"
          unpack="false"/>
 
-   <plugin
-         id="org.apache.commons.compress"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-   <plugin
-         id="org.kohsuke.args4j"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-   <plugin
-         id="javaewah"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
 </feature>
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.apache.feature/feature.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.apache.feature/feature.xml
index f4dded6..9d92cb2 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.apache.feature/feature.xml
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.apache.feature/feature.xml
@@ -24,6 +24,9 @@
 
    <requires>
       <import feature="org.eclipse.jgit" version="5.4.0" match="equivalent"/>
+      <import plugin="org.apache.sshd.osgi"/>
+      <import plugin="org.apache.sshd.sftp"/>
+      <import plugin="net.i2p.crypto.eddsa"/>
    </requires>
 
    <plugin
@@ -33,25 +36,4 @@
          version="0.0.0"
          unpack="false"/>
 
-   <plugin
-         id="org.apache.sshd.osgi"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-   <plugin
-         id="org.apache.sshd.sftp"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-   <plugin
-         id="net.i2p.crypto.eddsa"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
 </feature>
-- 
2.20.1

