Bootstrap Maven as non-modular packages

Resolves: rhbz#1951482
This commit is contained in:
Mikolaj Izdebski 2021-06-08 20:17:56 +02:00
parent e65e3059f1
commit 6fb7b95c73
10 changed files with 325 additions and 350 deletions

34
.gitignore vendored
View File

@ -9,3 +9,37 @@
/4.3.0.REL.tar.gz /4.3.0.REL.tar.gz
/4.3.1.REL.tar.gz /4.3.1.REL.tar.gz
/*.pom /*.pom
/aQute.libg-3.5.0.pom
/biz.aQute.bnd-3.5.0.pom
/biz.aQute.bndlib-3.5.0.pom
/biz.aQute.bnd.annotation-3.5.0.pom
/4.2.0.REL.tar.gz
/aQute.libg-4.2.0.pom
/biz.aQute.bnd-4.2.0.pom
/biz.aQute.bndlib-4.2.0.pom
/biz.aQute.bnd.annotation-4.2.0.pom
/4.3.0.REL.tar.gz
/aQute.libg-4.3.0.pom
/biz.aQute.bnd-4.3.0.pom
/biz.aQute.bndlib-4.3.0.pom
/biz.aQute.bnd.annotation-4.3.0.pom
/5.0.0.REL.tar.gz
/aQute.libg-5.0.0.pom
/biz.aQute.bnd-5.0.0.pom
/biz.aQute.bnd.annotation-5.0.0.pom
/biz.aQute.bndlib-5.0.0.pom
/aqute-bnd-5.1.1.tar.gz
/aQute.libg-5.1.1.pom
/biz.aQute.bnd-5.1.1.pom
/biz.aQute.bnd.annotation-5.1.1.pom
/biz.aQute.bndlib-5.1.1.pom
/aqute-bnd-5.1.2.tar.gz
/aQute.libg-5.1.2.pom
/biz.aQute.bnd-5.1.2.pom
/biz.aQute.bnd.annotation-5.1.2.pom
/biz.aQute.bndlib-5.1.2.pom
/aqute-bnd-5.2.0.tar.gz
/aQute.libg-5.2.0.pom
/biz.aQute.bnd-5.2.0.pom
/biz.aQute.bnd.annotation-5.2.0.pom
/biz.aQute.bndlib-5.2.0.pom

View File

@ -1,25 +1,25 @@
From 4ef3677674f105b633709a974f5744ad77f001b6 Mon Sep 17 00:00:00 2001 From c250eb3ebbb9afb650edc080708c5e4c3cccbb78 Mon Sep 17 00:00:00 2001
From: Michael Simacek <msimacek@redhat.com> From: Michael Simacek <msimacek@redhat.com>
Date: Tue, 4 Oct 2016 18:02:26 +0200 Date: Tue, 4 Oct 2016 18:02:26 +0200
Subject: [PATCH 1/4] Disable removed commands Subject: [PATCH 1/2] Disable removed commands
--- ---
biz.aQute.bnd/src/aQute/bnd/main/bnd.java | 48 ----------------------- biz.aQute.bnd/src/aQute/bnd/main/bnd.java | 49 -----------------------
1 file changed, 48 deletions(-) 1 file changed, 49 deletions(-)
diff --git a/biz.aQute.bnd/src/aQute/bnd/main/bnd.java b/biz.aQute.bnd/src/aQute/bnd/main/bnd.java diff --git a/biz.aQute.bnd/src/aQute/bnd/main/bnd.java b/biz.aQute.bnd/src/aQute/bnd/main/bnd.java
index 3f21168..d6c9ccd 100644 index 6870935..803c6c9 100644
--- a/biz.aQute.bnd/src/aQute/bnd/main/bnd.java --- a/biz.aQute.bnd/src/aQute/bnd/main/bnd.java
+++ b/biz.aQute.bnd/src/aQute/bnd/main/bnd.java +++ b/biz.aQute.bnd/src/aQute/bnd/main/bnd.java
@@ -110,7 +110,6 @@ import aQute.bnd.osgi.Processor; @@ -104,7 +104,6 @@ import aQute.bnd.osgi.Resource;
import aQute.bnd.osgi.Resource;
import aQute.bnd.osgi.Verifier; import aQute.bnd.osgi.Verifier;
import aQute.bnd.osgi.eclipse.EclipseClasspath; import aQute.bnd.osgi.eclipse.EclipseClasspath;
import aQute.bnd.print.JarPrinter;
-import aQute.bnd.repository.maven.provider.NexusCommand; -import aQute.bnd.repository.maven.provider.NexusCommand;
import aQute.bnd.service.Actionable; import aQute.bnd.service.Actionable;
import aQute.bnd.service.RepositoryPlugin; import aQute.bnd.service.RepositoryPlugin;
import aQute.bnd.service.action.Action; import aQute.bnd.service.action.Action;
@@ -4213,53 +4212,6 @@ public class bnd extends Processor { @@ -3904,54 +3903,6 @@ public class bnd extends Processor {
getInfo(profiles); getInfo(profiles);
} }
@ -70,9 +70,10 @@ index 3f21168..d6c9ccd 100644
- getInfo(rc); - getInfo(rc);
- rc.close(); - rc.close();
- } - }
-
/** /**
* Export a bndrun file * Export a bndrun file
*/
-- --
2.26.2 2.25.4

View File

@ -1,25 +0,0 @@
From aa2930336341f50f84a7fd8196d12edf5ca8d2ef Mon Sep 17 00:00:00 2001
From: Michael Simacek <msimacek@redhat.com>
Date: Tue, 12 Sep 2017 18:11:27 +0300
Subject: [PATCH 2/4] Fix ant compatibility
---
biz.aQute.bnd/src/aQute/bnd/ant/BndTask.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/biz.aQute.bnd/src/aQute/bnd/ant/BndTask.java b/biz.aQute.bnd/src/aQute/bnd/ant/BndTask.java
index f39f9b1..a9db014 100644
--- a/biz.aQute.bnd/src/aQute/bnd/ant/BndTask.java
+++ b/biz.aQute.bnd/src/aQute/bnd/ant/BndTask.java
@@ -220,7 +220,7 @@ public class BndTask extends BaseTask {
if (inherit) {
Properties projectProperties = new UTF8Properties();
@SuppressWarnings("unchecked")
- Hashtable<Object, Object> antProps = getProject().getProperties();
+ Hashtable<String,Object> antProps = getProject().getProperties();
projectProperties.putAll(antProps);
projectProperties.putAll(builder.getProperties());
builder.setProperties(projectProperties);
--
2.26.2

View File

@ -1,59 +1,12 @@
From 07705c03182b11f525f87002ae0a687961f91da2 Mon Sep 17 00:00:00 2001 From 64a36cbc8d7c8234dfa2af8670c2e1ea4a5c3909 Mon Sep 17 00:00:00 2001
From: Marian Koncek <mkoncek@redhat.com> From: Marian Koncek <mkoncek@redhat.com>
Date: Thu, 11 Jul 2019 14:29:26 +0200 Date: Thu, 11 Jul 2019 14:29:26 +0200
Subject: [PATCH 3/4] Port to OSGI 7.0.0 Subject: [PATCH] Port to OSGI 7.0.0
--- ---
.../src/aQute/bnd/main/ReporterLogger.java | 31 ++++++++++
.../src/aQute/bnd/junit/ConsoleLogger.java | 62 +++++++++++++++++++ .../src/aQute/bnd/junit/ConsoleLogger.java | 62 +++++++++++++++++++
2 files changed, 93 insertions(+) 1 file changed, 62 insertions(+)
diff --git a/biz.aQute.bnd/src/aQute/bnd/main/ReporterLogger.java b/biz.aQute.bnd/src/aQute/bnd/main/ReporterLogger.java
index 84dd290..287f6fb 100644
--- a/biz.aQute.bnd/src/aQute/bnd/main/ReporterLogger.java
+++ b/biz.aQute.bnd/src/aQute/bnd/main/ReporterLogger.java
@@ -1,5 +1,6 @@
package aQute.bnd.main;
+import org.osgi.framework.Bundle;
import org.osgi.framework.ServiceReference;
import org.osgi.service.log.LogService;
import org.slf4j.Logger;
@@ -108,4 +109,34 @@ public class ReporterLogger implements LogService {
}
}
+ @Override
+ public org.osgi.service.log.Logger getLogger(String name) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public org.osgi.service.log.Logger getLogger(Class<?> clazz) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public <L extends org.osgi.service.log.Logger> L getLogger(String name, Class<L> loggerType) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public <L extends org.osgi.service.log.Logger> L getLogger(Class<?> clazz, Class<L> loggerType) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public <L extends org.osgi.service.log.Logger> L getLogger(Bundle bundle, String name, Class<L> loggerType) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
}
diff --git a/biz.aQute.bndlib/src/aQute/bnd/junit/ConsoleLogger.java b/biz.aQute.bndlib/src/aQute/bnd/junit/ConsoleLogger.java diff --git a/biz.aQute.bndlib/src/aQute/bnd/junit/ConsoleLogger.java b/biz.aQute.bndlib/src/aQute/bnd/junit/ConsoleLogger.java
index 9c2591f..569b20e 100644 index 9c2591f..569b20e 100644
--- a/biz.aQute.bndlib/src/aQute/bnd/junit/ConsoleLogger.java --- a/biz.aQute.bndlib/src/aQute/bnd/junit/ConsoleLogger.java
@ -145,5 +98,5 @@ index 9c2591f..569b20e 100644
public ConsoleLogger(BundleContext context) { public ConsoleLogger(BundleContext context) {
-- --
2.26.2 2.20.1

View File

@ -1,98 +0,0 @@
From b2c3aed5b82c92d13997b49c7748bab9781f8d68 Mon Sep 17 00:00:00 2001
From: Mat Booth <mat.booth@redhat.com>
Date: Mon, 27 Jul 2020 16:53:49 +0100
Subject: [PATCH 4/4] Patch out twig plugin for report generation
---
biz.aQute.bnd.reporter/bnd.bnd | 15 ---------------
.../reporter/exporter/ReportExporterBuilder.java | 4 ----
biz.aQute.bnd/bnd.bnd | 5 -----
3 files changed, 24 deletions(-)
diff --git a/biz.aQute.bnd.reporter/bnd.bnd b/biz.aQute.bnd.reporter/bnd.bnd
index 76fefa9..245a75b 100644
--- a/biz.aQute.bnd.reporter/bnd.bnd
+++ b/biz.aQute.bnd.reporter/bnd.bnd
@@ -1,27 +1,12 @@
# Set javac settings from JDT prefs
-include: ${workspace}/cnf/includes/jdt.bnd
--maven-dependencies.jtwig:\
- jtwig-core;\
- groupId=org.jtwig;\
- artifactId=jtwig-core;\
- version=5.86.1.RELEASE;\
- scope=compile,\
- \
- jtwig-reflection;\
- groupId=org.jtwig;\
- artifactId=jtwig-reflection;\
- version=5.86.1.RELEASE;\
- scope=compile
-
-buildpath: \
osgi.annotation;version=latest;maven-scope=provided,\
osgi.core;version=latest;maven-scope=provided,\
aQute.libg;version=project,\
biz.aQute.bndlib;version=latest,\
slf4j.api;version=latest,\
- org.jtwig:jtwig-core;version=latest,\
- org.jtwig:jtwig-reflection;version=latest,\
org.parboiled:parboiled-java;version=latest,\
org.parboiled:parboiled-core;version=latest,\
org.apache.commons.lang3;version="[3.4,4.0)",\
diff --git a/biz.aQute.bnd.reporter/src/biz/aQute/bnd/reporter/exporter/ReportExporterBuilder.java b/biz.aQute.bnd.reporter/src/biz/aQute/bnd/reporter/exporter/ReportExporterBuilder.java
index ca064d2..8f75a74 100644
--- a/biz.aQute.bnd.reporter/src/biz/aQute/bnd/reporter/exporter/ReportExporterBuilder.java
+++ b/biz.aQute.bnd.reporter/src/biz/aQute/bnd/reporter/exporter/ReportExporterBuilder.java
@@ -10,7 +10,6 @@ import biz.aQute.bnd.reporter.plugins.resource.converter.PropertiesConverterPlug
import biz.aQute.bnd.reporter.plugins.resource.converter.XmlConverterPlugin;
import biz.aQute.bnd.reporter.plugins.serializer.JsonReportSerializerPlugin;
import biz.aQute.bnd.reporter.plugins.serializer.XmlReportSerializerPlugin;
-import biz.aQute.bnd.reporter.plugins.transformer.JtwigTransformerPlugin;
import biz.aQute.bnd.reporter.plugins.transformer.XsltTransformerPlugin;
/**
@@ -112,9 +111,6 @@ public class ReportExporterBuilder {
if (processor.getPlugin(XmlReportSerializerPlugin.class) == null) {
processor.addBasicPlugin(new XmlReportSerializerPlugin());
}
- if (processor.getPlugin(JtwigTransformerPlugin.class) == null) {
- processor.addBasicPlugin(new JtwigTransformerPlugin());
- }
if (processor.getPlugin(XsltTransformerPlugin.class) == null) {
processor.addBasicPlugin(new XsltTransformerPlugin());
}
diff --git a/biz.aQute.bnd/bnd.bnd b/biz.aQute.bnd/bnd.bnd
index 2c91999..3ff7f09 100644
--- a/biz.aQute.bnd/bnd.bnd
+++ b/biz.aQute.bnd/bnd.bnd
@@ -43,7 +43,6 @@ Private-Package: \
aQute.bnd.enroute.commands,\
aQute.bnd.main, \
org.objectweb.asm.*,\
- org.jtwig.*,\
org.parboiled.*;-split-package:=merge-first,\
com.github.javaparser.*,\
!org.slf4j.impl,\
@@ -91,8 +90,6 @@ Bundle-Description: This command line utility is the Swiss army knife of OSGi. I
# These dependencies are not on the -buildpath so no other part of bnd can
# use them in the source code.
-classpath: \
- ${repo;org.jtwig:jtwig-core;latest},\
- ${repo;org.jtwig:jtwig-reflection;latest},\
${repo;org.parboiled:parboiled-java;latest},\
${repo;org.parboiled:parboiled-core;latest},\
${repo;org.apache.commons.lang3;[3.4,4.0)},\
@@ -106,8 +103,6 @@ Bundle-Description: This command line utility is the Swiss army knife of OSGi. I
-testpath.reporter: \
- org.jtwig:jtwig-core;version=latest,\
- org.jtwig:jtwig-reflection;version=latest,\
org.parboiled:parboiled-java;version=latest,\
org.parboiled:parboiled-core;version=latest,\
org.apache.commons.lang3;version="[3.4,4.0)",\
--
2.26.2

View File

@ -1,62 +1,43 @@
# Workaround for rhbz#1969370: __bootstrap macro is not defined in
# CentOS Stream, See https://bugzilla.redhat.com/1969370
%global __bootstrap ~bootstrap
%bcond_without bootstrap
Name: aqute-bnd Name: aqute-bnd
Version: 4.3.1 Version: 5.2.0
Release: 5%{?dist} Release: 3%{?dist}
Summary: BND Tool Summary: BND Tool
# Part of jpm is under BSD, but jpm is not included in binary RPM # Part of jpm is under BSD, but jpm is not included in binary RPM
License: ASL 2.0 or EPL-2.0 License: ASL 2.0 or EPL-2.0
URL: http://bnd.bndtools.org/ URL: https://bnd.bndtools.org/
BuildArch: noarch BuildArch: noarch
Source0: %{version}.REL.tar.gz Source0: %{name}-%{version}.tar.gz
# removes bundled jars from upstream tarball # removes bundled jars from upstream tarball
# run as: # run as:
# ./repack-tarball.sh # ./generate-tarball.sh
Source1: repack-tarball.sh Source1: generate-tarball.sh
# A custom aggregator pom to run the build
Source2: parent.pom Source2: parent.pom
# Poms from maven central since upstream uses gradle to build
Source3: https://repo1.maven.org/maven2/biz/aQute/bnd/aQute.libg/%{version}/aQute.libg-%{version}.pom Source3: https://repo1.maven.org/maven2/biz/aQute/bnd/aQute.libg/%{version}/aQute.libg-%{version}.pom
Source4: https://repo1.maven.org/maven2/biz/aQute/bnd/biz.aQute.bnd/%{version}/biz.aQute.bnd-%{version}.pom Source4: https://repo1.maven.org/maven2/biz/aQute/bnd/biz.aQute.bnd/%{version}/biz.aQute.bnd-%{version}.pom
Source5: https://repo1.maven.org/maven2/biz/aQute/bnd/biz.aQute.bndlib/%{version}/biz.aQute.bndlib-%{version}.pom Source5: https://repo1.maven.org/maven2/biz/aQute/bnd/biz.aQute.bndlib/%{version}/biz.aQute.bndlib-%{version}.pom
Source6: https://repo1.maven.org/maven2/biz/aQute/bnd/biz.aQute.bnd.annotation/%{version}/biz.aQute.bnd.annotation-%{version}.pom Source6: https://repo1.maven.org/maven2/biz/aQute/bnd/biz.aQute.bnd.annotation/%{version}/biz.aQute.bnd.annotation-%{version}.pom
Source7: https://repo1.maven.org/maven2/biz/aQute/bnd/biz.aQute.bnd.exporters/%{version}/biz.aQute.bnd.exporters-%{version}.pom
Source8: https://repo1.maven.org/maven2/biz/aQute/bnd/biz.aQute.bnd.reporter/%{version}/biz.aQute.bnd.reporter-%{version}.pom
# Remove support for remote and resolve commands since they bring more deps than we want Patch1: 0001-Disable-removed-commands.patch
Patch0: 0001-Disable-removed-commands.patch Patch2: 0002-Port-to-OSGI-7.0.0.patch
# Fix build failure against ant
Patch1: 0002-Fix-ant-compatibility.patch
# Fix unimplemented new APIs introduced in OSGi R7
Patch2: 0003-Port-to-OSGI-7.0.0.patch
# Twig is dead upstream, so patch out the option to use it for reports
Patch3: 0004-Patch-out-twig-plugin-for-report-generation.patch
BuildRequires: maven-local BuildRequires: maven-local
BuildRequires: mvn(com.github.javaparser:javaparser-core) >= 3.14.16 %if %{with bootstrap}
BuildRequires: mvn(jline:jline) BuildRequires: javapackages-bootstrap
BuildRequires: mvn(org.apache.ant:ant) %else
BuildRequires: mvn(org.apache.maven:maven-artifact)
BuildRequires: mvn(org.apache.maven:maven-compat)
BuildRequires: mvn(org.apache.maven:maven-core)
BuildRequires: mvn(org.apache.maven:maven-plugin-api)
BuildRequires: mvn(org.apache.maven.plugins:maven-plugin-plugin)
BuildRequires: mvn(org.apache.maven.plugins:maven-source-plugin)
BuildRequires: mvn(org.apache.maven.plugin-tools:maven-plugin-annotations)
BuildRequires: mvn(org.apache.maven.shared:maven-mapping)
BuildRequires: mvn(org.eclipse.aether:aether-api)
BuildRequires: mvn(org.osgi:osgi.annotation) BuildRequires: mvn(org.osgi:osgi.annotation)
BuildRequires: mvn(org.osgi:osgi.cmpn) BuildRequires: mvn(org.osgi:osgi.cmpn)
BuildRequires: mvn(org.osgi:osgi.core) BuildRequires: mvn(org.osgi:osgi.core)
BuildRequires: mvn(org.slf4j:slf4j-api) BuildRequires: mvn(org.slf4j:slf4j-api)
BuildRequires: mvn(org.slf4j:slf4j-simple) BuildRequires: mvn(org.slf4j:slf4j-simple)
BuildRequires: mvn(org.sonatype.plexus:plexus-build-api) %endif
# Requires self to generate OSGi metadata
BuildRequires: mvn(biz.aQute.bnd:bnd-maven-plugin)
# Explicit javapackages-tools requires since bnd script uses # Explicit javapackages-tools requires since bnd script uses
# /usr/share/java-utils/java-functions # /usr/share/java-utils/java-functions
@ -81,12 +62,6 @@ Summary: BND library
%description -n aqute-bndlib %description -n aqute-bndlib
%{summary}. %{summary}.
%package -n bnd-maven-plugin
Summary: BND Maven plugin
%description -n bnd-maven-plugin
%{summary}.
%package javadoc %package javadoc
Summary: Javadoc for %{name} Summary: Javadoc for %{name}
@ -94,68 +69,23 @@ Summary: Javadoc for %{name}
API documentation for %{name}. API documentation for %{name}.
%prep %prep
%setup -q -n bnd-%{version}.REL %setup -q
rm gradlew*
%patch0 -p1
%patch1 -p1 %patch1 -p1
%patch2 -p1 %patch2 -p1
%patch3 -p1
# the commands pull in more dependencies than we want (felix-resolver, jetty)
rm biz.aQute.bnd/src/aQute/bnd/main/{RemoteCommand,ResolveCommand}.java
sed 's/@VERSION@/%{version}/' %SOURCE2 > pom.xml sed 's/@VERSION@/%{version}/' %SOURCE2 > pom.xml
sed -i 's|${Bundle-Version}|%{version}|' biz.aQute.bndlib/src/aQute/bnd/osgi/bnd.info sed -i 's|${Bundle-Version}|%{version}|' biz.aQute.bndlib/src/aQute/bnd/osgi/bnd.info
sed -i -e '/-include/d' cnf/includes/jdt.bnd
# libg # libg
pushd aQute.libg pushd aQute.libg
cp -p %{SOURCE3} pom.xml cp -p %{SOURCE3} pom.xml
%pom_add_parent biz.aQute.bnd:parent:%{version} %pom_add_parent biz.aQute.bnd:parent:%{version}
%pom_remove_dep :org.osgi.util.function
%pom_remove_dep :org.osgi.util.promise
%pom_add_dep org.osgi:osgi.cmpn
%pom_add_dep org.osgi:osgi.core
popd
# bnd
pushd biz.aQute.bnd
cp -p %{SOURCE4} pom.xml
sed -i -r 's/provided/compile/' pom.xml
%pom_add_parent biz.aQute.bnd:parent:%{version}
# add missing dep for ant tasks
%pom_add_dep org.apache.ant:ant
# remove support for remote and resolve commands
rm src/aQute/bnd/main/{RemoteCommand,ResolveCommand}.java
%pom_remove_dep :biz.aQute.resolve
%pom_remove_dep :biz.aQute.repository
%pom_remove_dep :biz.aQute.remote.api
%pom_remove_dep :snakeyaml
popd
# bndlib
pushd biz.aQute.bndlib
cp -p %{SOURCE5} pom.xml
%pom_add_parent biz.aQute.bnd:parent:%{version}
%pom_remove_dep :org.osgi.util.function
%pom_remove_dep :org.osgi.util.promise
%pom_add_dep org.osgi:osgi.core %pom_add_dep org.osgi:osgi.core
%pom_add_dep org.osgi:osgi.cmpn %pom_add_dep org.osgi:osgi.cmpn
%pom_add_dep biz.aQute.bnd:aQute.libg:%{version}
%pom_add_dep biz.aQute.bnd:biz.aQute.bnd.annotation:%{version}
%pom_add_plugin biz.aQute.bnd:bnd-maven-plugin . "
<executions>
<execution>
<goals>
<goal>bnd-process</goal>
</goals>
</execution>
</executions>"
%pom_add_plugin org.apache.maven.plugins:maven-jar-plugin . "
<configuration>
<archive>
<manifestFile>\${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
</archive>
</configuration>"
popd popd
# bnd.annotation # bnd.annotation
@ -166,62 +96,40 @@ cp -p %{SOURCE6} pom.xml
%pom_add_dep org.osgi:osgi.cmpn %pom_add_dep org.osgi:osgi.cmpn
popd popd
# bnd.exporters # bndlib
pushd biz.aQute.bnd.exporters pushd biz.aQute.bndlib
cp -p %{SOURCE7} pom.xml cp -p %{SOURCE5} pom.xml
%pom_add_parent biz.aQute.bnd:parent:%{version} %pom_add_parent biz.aQute.bnd:parent:%{version}
%pom_add_dep org.osgi:osgi.core %pom_add_dep org.osgi:osgi.core
%pom_add_dep org.osgi:osgi.cmpn %pom_add_dep org.osgi:osgi.cmpn
%pom_add_dep biz.aQute.bnd:aQute.libg:%{version}
%pom_add_dep biz.aQute.bnd:biz.aQute.bnd.annotation:%{version}
popd popd
# bnd.reporter # bnd
pushd biz.aQute.bnd.reporter cp -r biz.aQute.bnd.exporters/src/aQute/bnd/exporter biz.aQute.bnd/src/aQute/bnd/
cp -p %{SOURCE8} pom.xml pushd biz.aQute.bnd
%pom_add_parent biz.aQute.bnd:parent:%{version} cp -p %{SOURCE4} pom.xml
%pom_add_dep org.osgi:osgi.core %pom_remove_dep :biz.aQute.resolve
%pom_add_dep org.osgi:osgi.cmpn %pom_remove_dep :biz.aQute.bnd.ant
# remove twig dep and friends (twig is dead upstream) %pom_remove_dep :biz.aQute.repository
rm src/biz/aQute/bnd/reporter/plugins/transformer/JtwigTransformerPlugin.java %pom_remove_dep :biz.aQute.bnd.exporters
%pom_remove_dep org.jtwig: %pom_remove_dep :biz.aQute.bnd.reporter
%pom_remove_dep com.googlecode.concurrentlinkedhashmap: %pom_remove_dep :biz.aQute.remote.api
%pom_remove_dep com.google.guava: %pom_remove_dep :snakeyaml
# uneeded dependency %pom_remove_dep :jline
%pom_remove_dep :commons-lang3
popd popd
# maven-plugins %pom_remove_dep -r org.osgi:org.osgi.namespace.contract
mkdir -p maven/bnd-maven-plugin/src/main/java/aQute/bnd/maven/lib %pom_remove_dep -r org.osgi:org.osgi.namespace.extender
cp -r biz.aQute.bnd.maven/src/aQute/bnd/maven/lib/configuration maven/bnd-maven-plugin/src/main/java/aQute/bnd/maven/lib/ %pom_remove_dep -r org.osgi:org.osgi.namespace.implementation
pushd maven %pom_remove_dep -r org.osgi:org.osgi.namespace.service
%pom_remove_dep -r :biz.aQute.bnd.maven %pom_remove_dep -r org.osgi:org.osgi.resource
# Unavailable reactor dependency - org.osgi.impl.bundle.repoindex.cli %pom_remove_dep -r org.osgi:org.osgi.service.log
%pom_disable_module bnd-indexer-maven-plugin %pom_remove_dep -r org.osgi:org.osgi.service.repository
# Requires unbuilt parts of bnd %pom_remove_dep -r org.osgi:org.osgi.service.serviceloader
%pom_disable_module bnd-export-maven-plugin %pom_remove_dep -r org.osgi:org.osgi.util.function
%pom_disable_module bnd-reporter-maven-plugin %pom_remove_dep -r org.osgi:org.osgi.util.promise
%pom_disable_module bnd-resolver-maven-plugin
%pom_disable_module bnd-run-maven-plugin
%pom_disable_module bnd-testing-maven-plugin
# Integration tests require Internet access
%pom_remove_plugin -r :maven-invoker-plugin
%pom_remove_plugin -r :maven-javadoc-plugin
%pom_remove_plugin -r :flatten-maven-plugin
popd
# Use compiler release flag when building on JDK >8 for correct cross-compiling
%pom_xpath_inject pom:project "
<profiles>
<profile>
<id>jdk-release-flag</id>
<activation>
<jdk>[9,)</jdk>
</activation>
<properties>
<maven.compiler.release>8</maven.compiler.release>
</properties>
</profile>
</profiles>"
%mvn_alias biz.aQute.bnd:biz.aQute.bnd :bnd biz.aQute:bnd %mvn_alias biz.aQute.bnd:biz.aQute.bnd :bnd biz.aQute:bnd
%mvn_alias biz.aQute.bnd:biz.aQute.bndlib :bndlib biz.aQute:bndlib %mvn_alias biz.aQute.bnd:biz.aQute.bndlib :bndlib biz.aQute:bndlib
@ -229,15 +137,11 @@ popd
%mvn_package biz.aQute.bnd:biz.aQute.bndlib bndlib %mvn_package biz.aQute.bnd:biz.aQute.bndlib bndlib
%mvn_package biz.aQute.bnd:biz.aQute.bnd.annotation bndlib %mvn_package biz.aQute.bnd:biz.aQute.bnd.annotation bndlib
%mvn_package biz.aQute.bnd:aQute.libg bndlib %mvn_package biz.aQute.bnd:aQute.libg bndlib
%mvn_package biz.aQute.bnd:bnd-shared-maven-lib maven
%mvn_package biz.aQute.bnd:bnd-maven-plugin maven
%mvn_package biz.aQute.bnd:bnd-baseline-maven-plugin maven
%mvn_package biz.aQute.bnd:parent __noinstall %mvn_package biz.aQute.bnd:parent __noinstall
%mvn_package biz.aQute.bnd:bnd-plugin-parent __noinstall %mvn_package biz.aQute.bnd:bnd-plugin-parent __noinstall
%build %build
%mvn_build -- -Dproject.build.sourceEncoding=UTF-8 -Dworkspace=$(pwd) \ %mvn_build -- -Dproject.build.sourceEncoding=UTF-8
-Dorg.eclipse.jdt.core.compiler.source=1.8 -Dorg.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
%install %install
%mvn_install %mvn_install
@ -245,7 +149,7 @@ popd
install -d -m 755 %{buildroot}%{_sysconfdir}/ant.d install -d -m 755 %{buildroot}%{_sysconfdir}/ant.d
echo "aqute-bnd slf4j/api slf4j/simple osgi-annotation osgi-core osgi-compendium" >%{buildroot}%{_sysconfdir}/ant.d/%{name} echo "aqute-bnd slf4j/api slf4j/simple osgi-annotation osgi-core osgi-compendium" >%{buildroot}%{_sysconfdir}/ant.d/%{name}
%jpackage_script aQute.bnd.main.bnd "" "" aqute-bnd:slf4j/slf4j-api:slf4j/slf4j-simple:jline2/jline:jansi1/jansi:osgi-annotation:osgi-core:osgi-compendium bnd 1 %jpackage_script aQute.bnd.main.bnd "" "" aqute-bnd:slf4j/slf4j-api:slf4j/slf4j-simple:osgi-annotation:osgi-core:osgi-compendium bnd 1
%files -f .mfiles %files -f .mfiles
%license LICENSE %license LICENSE
@ -255,24 +159,32 @@ echo "aqute-bnd slf4j/api slf4j/simple osgi-annotation osgi-core osgi-compendium
%files -n aqute-bndlib -f .mfiles-bndlib %files -n aqute-bndlib -f .mfiles-bndlib
%license LICENSE %license LICENSE
%files -n bnd-maven-plugin -f .mfiles-maven
%files javadoc -f .mfiles-javadoc %files javadoc -f .mfiles-javadoc
%license LICENSE %license LICENSE
%changelog %changelog
* Thu Apr 15 2021 Mohan Boddu <mboddu@redhat.com> - 4.3.1-5 * Tue Jun 08 2021 Mikolaj Izdebski <mizdebsk@redhat.com> - 5.2.0-3
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937 - Bootstrap Maven for CentOS Stream 9
* Mon May 17 2021 Mikolaj Izdebski <mizdebsk@redhat.com> - 5.2.0-2
- Bootstrap build
- Non-bootstrap build
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 4.3.1-4 * Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 4.3.1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Wed Jan 20 2021 Marian Koncek <mkoncek@redhat.com> - 5.2.0-1
- Update to upstream version 5.2.0
* Mon Dec 14 2020 Jerry James <loganjerry@gmail.com> - 4.3.1-3 * Mon Dec 14 2020 Jerry James <loganjerry@gmail.com> - 4.3.1-3
- Update jansi path for jansi 1.x and jline path for jline 2.x - Update jansi path for jansi 1.x and jline path for jline 2.x
* Wed Nov 25 2020 Mat Booth <mat.booth@redhat.com> - 4.3.1-2 * Wed Nov 25 2020 Mat Booth <mat.booth@redhat.com> - 4.3.1-2
- Add OSGi metadata - Add OSGi metadata
* Tue Sep 29 2020 Marian Koncek <mkoncek@redhat.com> - 5.1.2-1
- Update to upstream version 5.1.2
* Tue Jul 28 2020 Mat Booth <mat.booth@redhat.com> - 4.3.1-1 * Tue Jul 28 2020 Mat Booth <mat.booth@redhat.com> - 4.3.1-1
- Update to latest 4.x release - Update to latest 4.x release
@ -288,15 +200,39 @@ echo "aqute-bnd slf4j/api slf4j/simple osgi-annotation osgi-core osgi-compendium
* Fri Jul 10 2020 Jiri Vanek <jvanek@redhat.com> - 3.5.0-9 * Fri Jul 10 2020 Jiri Vanek <jvanek@redhat.com> - 3.5.0-9
- Rebuilt for JDK-11, see https://fedoraproject.org/wiki/Changes/Java11 - Rebuilt for JDK-11, see https://fedoraproject.org/wiki/Changes/Java11
* Tue Jun 23 2020 Marian Koncek <mkoncek@redhat.com> - 5.1.1-1
- Update to upstream version 5.1.1
* Fri Apr 24 2020 Mikolaj Izdebski <mizdebsk@redhat.com> - 5.0.0-2
- Disable bnd-maven-plugin
* Wed Jan 29 2020 Marian Koncek <mkoncek@redhat.com> - 5.0.0-1
- Update to upstream version 5.0.0
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.5.0-8 * Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.5.0-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Tue Nov 05 2019 Mikolaj Izdebski <mizdebsk@redhat.com> - 4.3.0-2
- Mass rebuild for javapackages-tools 201902
* Wed Oct 09 2019 Marian Koncek <mkoncek@redhat.com> - 4.3.0-1
- Update to upstream version 4.3.0
* Wed Jul 24 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.5.0-7 * Wed Jul 24 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.5.0-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Thu Jul 04 2019 Marian Koncek <mkoncek@redhat.com> - 4.2.0-1
- Update to upstream version 4.2.0
* Fri May 24 2019 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.5.0-6
- Mass rebuild for javapackages-tools 201901
* Fri Apr 12 2019 Marian Koncek <mkoncek@redhat.com> - 3.5.0-6 * Fri Apr 12 2019 Marian Koncek <mkoncek@redhat.com> - 3.5.0-6
- Port to OSGI 7.0.0 - Port to OSGI 7.0.0
* Fri Apr 12 2019 Marian Koncek <mkoncek@redhat.com> - 3.5.0-5
- Port to OSGI 7.0.0
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.5.0-5 * Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.5.0-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild

31
generate-tarball.sh Executable file
View File

@ -0,0 +1,31 @@
#!/bin/bash
set -e
name=aqute-bnd
version="$(sed -n 's/Version:\s*//p' *.spec)"
# RETRIEVE
wget "https://github.com/bndtools/bnd/archive/${version}.REL.tar.gz" -O "${name}-${version}.orig.tar.gz"
rm -rf tarball-tmp
mkdir tarball-tmp
pushd tarball-tmp
tar -xf "../${name}-${version}.orig.tar.gz"
mv "bnd-${version}.REL" "${name}-${version}"
# CLEAN TARBALL
rm -rf "${name}-${version}/docs"
find -name '*.jar' -delete
find -name '*.class' -delete
find -name '*.ar' -delete
find -name '*.tar' -delete
find -name '*.gz' -delete
find -name '*.bz2' -delete
find -name '*.xz' -delete
find -name '*.zip' -delete
find -name '*.exe' -delete
find -name '*.dll' -delete
tar -czf "../${name}-${version}.tar.gz" *
popd
rm -r tarball-tmp "${name}-${version}.orig.tar.gz"

View File

@ -9,14 +9,165 @@
<packaging>pom</packaging> <packaging>pom</packaging>
<name>Parent project for bnd tool suite</name>
<description>Project information for bnd.</description>
<url>http://www.aQute.biz/Code/Bnd</url>
<organization>
<name>aQute SARL</name>
<url>http://www.aQute.biz</url>
</organization>
<licenses>
<license>
<name>Apache Software License 2.0</name>
<url>http://www.opensource.org/licenses/apache2.0.php</url>
<distribution>repo</distribution>
</license>
</licenses>
<developers>
<developer>
<id>bnd</id>
<name>Peter Kriens</name>
<organization>aQute SARL</organization>
<roles>
<role>Primary Developer</role>
</roles>
</developer>
<developer>
<id>bjhargrave</id>
<name>BJ Hargrave</name>
</developer>
<developer>
<id>mcculls</id>
<name>Stuart McCulloch</name>
</developer>
<developer>
<id>njbartlett</id>
<name>Neil Bartlett</name>
<organization>Paremus</organization>
</developer>
<developer>
<id>fhuberts</id>
<name>Ferry Huberts</name>
<organization>Pelagic</organization>
</developer>
<developer>
<id>psoreide</id>
<name>PK S&#248;reide</name>
<organization>Comactivity AB</organization>
</developer>
</developers>
<contributors>
<contributor>
<!--<id>derheld42</id>-->
<name>Carter Smithhart</name>
</contributor>
<contributor>
<!--<id>cchabanois</id>-->
<name>Chabanois Cédric</name>
<organization>Entropysoft</organization>
</contributor>
<contributor>
<!--<id>paulbakker</id>-->
<name>Paul Bakker</name>
<organization>Luminis Technologies</organization>
</contributor>
<contributor>
<!--<id>djencks</id>-->
<name>David Jencks</name>
</contributor>
<contributor>
<!--<id>rkrzewski</id>-->
<name>Rafa&#322; Krzewski</name>
<organization>Caltha - Krzewski, Mach, Potempski Sp. J.</organization>
</contributor>
<contributor>
<!--<id>xfournet</id>-->
<name>Xavier Fournet</name>
</contributor>
<contributor>
<!--<id>crabbkw</id>-->
<name>Casey Crabb</name>
</contributor>
<contributor>
<!--<id>david.bosschaert</id>-->
<name>David Bosschaert</name>
</contributor>
<contributor>
<!--<id>harald.wellmann</id>-->
<name>Harald Wellmann</name>
</contributor>
<contributor>
<!--<id>janwillem.janssen</id>-->
<name>Jan Willem Janssen</name>
</contributor>
<contributor>
<!--<id>marcel.offermans</id>-->
<name>Marcel Offermans</name>
</contributor>
<contributor>
<!--<id>marian.grigoras</id>-->
<name>Marian Grigoras</name>
</contributor>
<contributor>
<!--<id>markuswolf</id>-->
<name>Markus Wolf</name>
</contributor>
<contributor>
<!--<id>nicolas.lalevee</id>-->
<name>Nicolas Lalevée</name>
</contributor>
<contributor>
<!--<id>pierre.labiausse</id>-->
<name>Pierre Labiausse</name>
</contributor>
<contributor>
<!--<id>raymond.auge</id>-->
<name>Raymond Auge</name>
</contributor>
<contributor>
<!--<id>timothyjward</id>-->
<name>Tim Ward</name>
</contributor>
<contributor>
<!--<id>bramk</id>-->
<name>Bram de Kruijff</name>
</contributor>
<contributor>
<!--<id>tangyong</id>-->
<name>Tang Yong</name>
</contributor>
<contributor>
<!--<id>gamerson</id>-->
<name>Gregory Amerson</name>
</contributor>
<contributor>
<!--<id>gnodet</id>-->
<name>Guillaume Nodet</name>
</contributor>
<contributor>
<!--<id>marcdejonge</id>-->
<name>Marc de Jonge</name>
</contributor>
<contributor>
<!--<id>trespasserw</id>-->
<name>Roman Shevchenko</name>
</contributor>
</contributors>
<scm>
<url>https://github.com/bndtools/bnd</url>
<connection>scm:git:git://github.com/bndtools/bnd.git</connection>
<developerConnection>scm:git:ssh://github.com/bndtools/bnd.git</developerConnection>
</scm>
<modules> <modules>
<module>aQute.libg</module> <module>aQute.libg</module>
<module>biz.aQute.bndlib</module> <module>biz.aQute.bndlib</module>
<module>biz.aQute.bnd</module> <module>biz.aQute.bnd</module>
<module>biz.aQute.bnd.annotation</module> <module>biz.aQute.bnd.annotation</module>
<module>biz.aQute.bnd.exporters</module>
<module>biz.aQute.bnd.reporter</module>
<module>maven</module>
</modules> </modules>
<build> <build>

View File

@ -1,6 +0,0 @@
#!/bin/bash
VERSION=`sed -rn 's/^Version:\s*([0-9.]+)/\1/p' aqute-bnd.spec`
wget https://github.com/bndtools/bnd/archive/$VERSION.REL.tar.gz
gunzip $VERSION.REL.tar.gz
tar tf $VERSION.REL.tar | grep -E '\.(.ar|exe|tar\.(gz|bz2|xz)|zip)$' | xargs tar --delete --file $VERSION.REL.tar
gzip $VERSION.REL.tar

12
sources
View File

@ -1,7 +1,5 @@
SHA512 (4.3.1.REL.tar.gz) = 103d5cba7a7f62b845c362001717eac0409b801813464252d5d4f8dd2aadd24f61e278309e92ba5dc20acc1940ba99b25b26bfa8437560169a84e34751d84ca1 SHA512 (aqute-bnd-5.2.0.tar.gz) = 4001b991b80746140c26aa4862e43aed82685344343a07b41aca9e7466d1bc180eec4724c1eef8186c7fdf69dedd6817cc30a790807ce8344958e2ea0633d015
SHA512 (aQute.libg-4.3.1.pom) = 63b17d0519224e872007e5327e4743494b0654c43caab1204831f707f45a64c1691d92e0bccefc490476ab832f74dea871944251dadd037a74f0eba8ad7e640b SHA512 (aQute.libg-5.2.0.pom) = 700b698895c39f39422e66532fee626aace0656867361b7e41438a168f2725ae25c5f67e6fd1dfdcff228ec4e6a6530cc76dc1b1f40aa797ef90bb891f3e4f86
SHA512 (biz.aQute.bnd-4.3.1.pom) = fa4ab223840ccb089ec2e2fc9bcf23849ead09ba9119c8e56047464bca6116c3a159b53d2b8374a057a77c9968ba852b2b10c6bd0a77e66043a4ddad761a6cb5 SHA512 (biz.aQute.bnd-5.2.0.pom) = b8cebc4fa358debf2296e24b2cde2f401765a628022f0972517dbaecc78558aadcddbfc3cc1c8e1c0332008864d14e76863d46f51aacb1a6a530b2577ebdc587
SHA512 (biz.aQute.bnd.annotation-4.3.1.pom) = 24fd9ad310177edf65ad9ef3b890834dc46c7fd86071d3afef47b24a5bbc4f2d08d4d5c376b6e49699bdf38e35d719267f5ffc3e5537ddcf52fc94ab9427a0e4 SHA512 (biz.aQute.bnd.annotation-5.2.0.pom) = ef10eea989b339e4166087b2baf2fb4b49693d9933498f8299356b5a40a5a155d6c725a298eb0c93cdfe9633acc147047d341f84b0a9a3e5b094827168d179a1
SHA512 (biz.aQute.bnd.exporters-4.3.1.pom) = 95303ed421f9514165ac8cd077ba7391852a3d195ab6603b2425fc5a5cdcd0a768ea746cfcf2d0ffa0d9c8f4de5c7a1856b361b9ddf1fd11ce69b73cde3e5f97 SHA512 (biz.aQute.bndlib-5.2.0.pom) = 4055bc35223f7c90e933ce7e694bb436743b0d138a9d21cde3ba87579e7d8be2614edbddc21c0447dba911e6ddd8a607a86ec08eb09c120653846dcb9b667462
SHA512 (biz.aQute.bndlib-4.3.1.pom) = ba8d535afdb94a2d74c67bd954216cccfd08a2f674dae959a9cd3df3a3d66248000b959c696b59f22b12f29f34bdda2e60a3d20880190d33f61abedef955cb91
SHA512 (biz.aQute.bnd.reporter-4.3.1.pom) = 41181d44d01205679ea62f62dd57480a554e20b7c55470fd8d2204bbbeb6856e9728d826359c859f508f029551edfb9edb30d6a96110916e05d65eb917ee17b9