fix bnd compile failure
This commit is contained in:
parent
1424498b0b
commit
7931483b8e
59
add-maven-dependency-plugin.patch
Normal file
59
add-maven-dependency-plugin.patch
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
From 542f23cebfdd45b566fa12d7e2b5dd925e2745a1 Mon Sep 17 00:00:00 2001
|
||||||
|
From: wang--ge <wang__ge@126.com>
|
||||||
|
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 @@
|
||||||
|
<?xml version='1.0' encoding='UTF-8'?>
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||||
|
+ <build>
|
||||||
|
+ <plugins>
|
||||||
|
+ <plugin>
|
||||||
|
+ <groupId>org.apache.maven.plugins</groupId>
|
||||||
|
+ <artifactId>maven-dependency-plugin</artifactId>
|
||||||
|
+ <version>3.2.0</version>
|
||||||
|
+ <executions>
|
||||||
|
+ <execution>
|
||||||
|
+ <phase>prepare-package</phase>
|
||||||
|
+ <goals>
|
||||||
|
+ <goal>copy</goal>
|
||||||
|
+ </goals>
|
||||||
|
+ <configuration>
|
||||||
|
+ <artifactItems>
|
||||||
|
+ <artifactItem>
|
||||||
|
+ <groupId>biz.aQute.bnd</groupId>
|
||||||
|
+ <artifactId>biz.aQute.repository</artifactId>
|
||||||
|
+ <version>3.5.0</version>
|
||||||
|
+ <overWrite>false</overWrite>
|
||||||
|
+ <outputDirectory>${project.build.directory}</outputDirectory>
|
||||||
|
+ <destFileName></destFileName>
|
||||||
|
+ </artifactItem>
|
||||||
|
+ <artifactItem>
|
||||||
|
+ <groupId>biz.aQute.bnd</groupId>
|
||||||
|
+ <artifactId>biz.aQute.bnd.embedded-repo</artifactId>
|
||||||
|
+ <version>4.3.0</version>
|
||||||
|
+ <overWrite>false</overWrite>
|
||||||
|
+ <outputDirectory>${project.build.directory}</outputDirectory>
|
||||||
|
+ <destFileName></destFileName>
|
||||||
|
+ </artifactItem>
|
||||||
|
+ </artifactItems>
|
||||||
|
+ </configuration>
|
||||||
|
+ </execution>
|
||||||
|
+ </executions>
|
||||||
|
+ </plugin>
|
||||||
|
+ </plugins>
|
||||||
|
+ </build>
|
||||||
|
<!-- section added by maintainer -->
|
||||||
|
<dependencies>
|
||||||
|
<!-- begin of code added by maintainer -->
|
||||||
|
--
|
||||||
|
2.33.0
|
||||||
|
|
||||||
@ -1,15 +1,16 @@
|
|||||||
Name: aqute-bnd
|
Name: aqute-bnd
|
||||||
Version: 3.5.0
|
Version: 3.5.0
|
||||||
Release: 9
|
Release: 10
|
||||||
Summary: BND Tool
|
Summary: BND Tool
|
||||||
License: ASL 2.0
|
License: ASL 2.0
|
||||||
URL: https://github.com/bndtools/bnd/
|
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
|
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
|
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
|
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
|
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
|
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
|
Patch0001: 0001-Disable-removed-commands.patch
|
||||||
Patch0002: 0002-Fix-ant-compatibility.patch
|
Patch0002: 0002-Fix-ant-compatibility.patch
|
||||||
Patch0003: 0003-Port-to-OSGI-7.0.0.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: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.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: 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
|
Requires: javapackages-tools
|
||||||
Provides: aqute-bndlib = %{version}-%{release} bnd-maven-plugin = %{version}-%{release}
|
Provides: aqute-bndlib = %{version}-%{release} bnd-maven-plugin = %{version}-%{release}
|
||||||
Obsoletes: 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
|
sed -i 's|${Bundle-Version}|%{version}|' biz.aQute.bndlib/src/aQute/bnd/osgi/bnd.info
|
||||||
cd aQute.libg
|
cd aQute.libg
|
||||||
cp -p %{SOURCE2} pom.xml
|
cp -p %{SOURCE2} pom.xml
|
||||||
|
cp -p %{SOURCE6} add-maven-dependency-plugin.patch
|
||||||
%pom_add_parent biz.aQute.bnd:parent:%{version}
|
%pom_add_parent biz.aQute.bnd:parent:%{version}
|
||||||
%pom_add_dep org.osgi:osgi.cmpn
|
%pom_add_dep org.osgi:osgi.cmpn:7.0.0
|
||||||
%pom_add_dep org.slf4j:slf4j-api
|
%pom_add_dep org.slf4j:slf4j-api:1.7.25
|
||||||
|
patch -p1 < add-maven-dependency-plugin.patch
|
||||||
cd -
|
cd -
|
||||||
cd biz.aQute.bnd.annotation
|
cd biz.aQute.bnd.annotation
|
||||||
cp -p %{SOURCE5} pom.xml
|
cp -p %{SOURCE5} pom.xml
|
||||||
@ -136,12 +142,18 @@ cd -
|
|||||||
%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
|
||||||
|
cd aQute.libg
|
||||||
|
mvn package -DskipTests -Pdist -Dtar
|
||||||
|
cd -
|
||||||
%mvn_build -- -Dproject.build.sourceEncoding=UTF-8
|
%mvn_build -- -Dproject.build.sourceEncoding=UTF-8
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%mvn_install
|
%mvn_install
|
||||||
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/aqute-bnd
|
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
|
%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
|
||||||
%files -f .mfiles-bndlib
|
%files -f .mfiles-bndlib
|
||||||
@ -149,10 +161,15 @@ echo "aqute-bnd slf4j/api slf4j/simple osgi-annotation osgi-core osgi-compendium
|
|||||||
%doc LICENSE
|
%doc LICENSE
|
||||||
%{_bindir}/bnd
|
%{_bindir}/bnd
|
||||||
%config(noreplace) %{_sysconfdir}/ant.d/*
|
%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
|
%files help -f .mfiles-javadoc
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu May 04 2023 Ge Wang <wang__ge@126.com> - 3.5.0-10
|
||||||
|
- fix bnd compile failure
|
||||||
|
|
||||||
* Mon Mar 22 2021 lingsheng <lingsheng@huawei.com> - 3.5.0-9
|
* Mon Mar 22 2021 lingsheng <lingsheng@huawei.com> - 3.5.0-9
|
||||||
- Do not edit source directly before packaging
|
- Do not edit source directly before packaging
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user