diff --git a/add-maven-dependency-plugin.patch b/add-maven-dependency-plugin.patch new file mode 100644 index 0000000..f730387 --- /dev/null +++ b/add-maven-dependency-plugin.patch @@ -0,0 +1,59 @@ +From 542f23cebfdd45b566fa12d7e2b5dd925e2745a1 Mon Sep 17 00:00:00 2001 +From: wang--ge +Date: Thu, 4 May 2023 11:35:33 +0800 +Subject: [PATCH] add maven dependency plugin + +--- + pom.xml | 37 +++++++++++++++++++++++++++++++++++++ + 1 file changed, 37 insertions(+) + +diff --git a/pom.xml b/pom.xml +index fd5d704..9cf59d8 100644 +--- a/pom.xml ++++ b/pom.xml +@@ -1,5 +1,42 @@ + + ++ ++ ++ ++ org.apache.maven.plugins ++ maven-dependency-plugin ++ 3.2.0 ++ ++ ++ prepare-package ++ ++ copy ++ ++ ++ ++ ++ biz.aQute.bnd ++ biz.aQute.repository ++ 3.5.0 ++ false ++ ${project.build.directory} ++ ++ ++ ++ biz.aQute.bnd ++ biz.aQute.bnd.embedded-repo ++ 4.3.0 ++ false ++ ${project.build.directory} ++ ++ ++ ++ ++ ++ ++ ++ ++ + + + +-- +2.33.0 + diff --git a/aqute-bnd.spec b/aqute-bnd.spec index 20cb215..6790310 100644 --- a/aqute-bnd.spec +++ b/aqute-bnd.spec @@ -1,15 +1,16 @@ Name: aqute-bnd Version: 3.5.0 -Release: 9 +Release: 10 Summary: BND Tool License: ASL 2.0 URL: https://github.com/bndtools/bnd/ -Source0: https://github.com/bndtools/bnd/archive/%{version}.REL.tar.gz +Source0: https://github.com/bndtools/bnd/archive/refs/tags/%{version}.REL.tar.gz Source1: https://repo1.maven.org/maven2/biz/aQute/bnd/parent/2.4.0/parent-2.4.0.pom#/parent.pom Source2: https://repo1.maven.org/maven2/biz/aQute/bnd/aQute.libg/%{version}/aQute.libg-%{version}.pom Source3: 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.bndlib/%{version}/biz.aQute.bndlib-%{version}.pom Source5: https://repo1.maven.org/maven2/biz/aQute/bnd/biz.aQute.bnd.annotation/%{version}/biz.aQute.bnd.annotation-%{version}.pom +Source6: add-maven-dependency-plugin.patch Patch0001: 0001-Disable-removed-commands.patch Patch0002: 0002-Fix-ant-compatibility.patch Patch0003: 0003-Port-to-OSGI-7.0.0.patch @@ -19,6 +20,9 @@ BuildRequires: mvn(org.apache.maven:maven-artifact) mvn(org.apache.maven:maven- BuildRequires: mvn(org.apache.maven:maven-plugin-api) mvn(org.apache.maven.plugins:maven-plugin-plugin) BuildRequires: mvn(org.apache.maven.plugins:maven-source-plugin) mvn(org.apache.maven.plugin-tools:maven-plugin-annotations) BuildRequires: mvn(org.eclipse.aether:aether-api) mvn(org.sonatype.plexus:plexus-build-api) +BuildRequires: java-1.8.0-openjdk-devel maven-local maven +BuildRequires: maven-dependency-plugin +Requires: java-1.8.0-openjdk Requires: javapackages-tools Provides: aqute-bndlib = %{version}-%{release} bnd-maven-plugin = %{version}-%{release} Obsoletes: aqute-bndlib < %{version}-%{release} bnd-maven-plugin < %{version}-%{release} @@ -82,9 +86,11 @@ sed 's/@VERSION@/%{version}/' parent.pom > pom.xml sed -i 's|${Bundle-Version}|%{version}|' biz.aQute.bndlib/src/aQute/bnd/osgi/bnd.info cd aQute.libg cp -p %{SOURCE2} pom.xml +cp -p %{SOURCE6} add-maven-dependency-plugin.patch %pom_add_parent biz.aQute.bnd:parent:%{version} -%pom_add_dep org.osgi:osgi.cmpn -%pom_add_dep org.slf4j:slf4j-api +%pom_add_dep org.osgi:osgi.cmpn:7.0.0 +%pom_add_dep org.slf4j:slf4j-api:1.7.25 +patch -p1 < add-maven-dependency-plugin.patch cd - cd biz.aQute.bnd.annotation cp -p %{SOURCE5} pom.xml @@ -136,12 +142,18 @@ cd - %mvn_package biz.aQute.bnd:parent __noinstall %mvn_package biz.aQute.bnd:bnd-plugin-parent __noinstall %build +cd aQute.libg +mvn package -DskipTests -Pdist -Dtar +cd - %mvn_build -- -Dproject.build.sourceEncoding=UTF-8 + %install %mvn_install 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/aqute-bnd %jpackage_script aQute.bnd.main.bnd "" "" aqute-bnd:slf4j/slf4j-api:slf4j/slf4j-simple:osgi-annotation:osgi-core:osgi-compendium bnd 1 +cp -arf aQute.libg/target/biz.aQute.bnd.embedded-repo-4.3.0.jar %{buildroot}%{_javadir}/%{name}/ +cp -arf aQute.libg/target/biz.aQute.repository-3.5.0.jar %{buildroot}%{_javadir}/%{name}/ %files -f .mfiles %files -f .mfiles-bndlib @@ -149,10 +161,15 @@ echo "aqute-bnd slf4j/api slf4j/simple osgi-annotation osgi-core osgi-compendium %doc LICENSE %{_bindir}/bnd %config(noreplace) %{_sysconfdir}/ant.d/* +%{_javadir}/%{name}/biz.aQute.bnd.embedded-repo-4.3.0.jar +%{_javadir}/%{name}/biz.aQute.repository-3.5.0.jar %files help -f .mfiles-javadoc %changelog +* Thu May 04 2023 Ge Wang - 3.5.0-10 +- fix bnd compile failure + * Mon Mar 22 2021 lingsheng - 3.5.0-9 - Do not edit source directly before packaging