Refactor .spec and parent .pom

This commit is contained in:
Marian Koncek 2022-06-03 09:32:14 +02:00
parent 0b98dbfd0a
commit bc14ef7929
2 changed files with 10 additions and 5 deletions

View File

@ -22,6 +22,7 @@ Source0: %{name}-%{version}.tar.gz
# ./generate-tarball.sh # ./generate-tarball.sh
Source1: generate-tarball.sh Source1: generate-tarball.sh
# Auxiliary parent pom, packager-written
Source2: parent.pom Source2: parent.pom
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
@ -105,7 +106,8 @@ API documentation for %{name}.
# the commands pull in more dependencies than we want (felix-resolver, jetty) # the commands pull in more dependencies than we want (felix-resolver, jetty)
rm biz.aQute.bnd/src/aQute/bnd/main/{ExportReportCommand,MbrCommand,RemoteCommand,ReporterLogger,ResolveCommand,Shell}.java rm biz.aQute.bnd/src/aQute/bnd/main/{ExportReportCommand,MbrCommand,RemoteCommand,ReporterLogger,ResolveCommand,Shell}.java
sed 's/@VERSION@/%{version}/' %SOURCE2 > pom.xml cp %SOURCE2 pom.xml
%pom_xpath_set "pom:project/pom:version" "%{version}"
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
%if %{without bnd_maven_plugin} %if %{without bnd_maven_plugin}
@ -215,7 +217,7 @@ popd
%endif %endif
%build %build
%mvn_build -- -Dproject.build.sourceEncoding=UTF-8 %mvn_build
%install %install
%mvn_install %mvn_install

View File

@ -5,7 +5,7 @@
<groupId>biz.aQute.bnd</groupId> <groupId>biz.aQute.bnd</groupId>
<artifactId>parent</artifactId> <artifactId>parent</artifactId>
<version>@VERSION@</version> <version></version>
<packaging>pom</packaging> <packaging>pom</packaging>
@ -26,6 +26,10 @@
</license> </license>
</licenses> </licenses>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<developers> <developers>
<developer> <developer>
<id>bnd</id> <id>bnd</id>
@ -188,7 +192,7 @@
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId> <artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version> <version>any</version>
<configuration> <configuration>
<source>1.8</source> <source>1.8</source>
<target>1.8</target> <target>1.8</target>
@ -196,5 +200,4 @@
</plugin> </plugin>
</plugins> </plugins>
</build> </build>
</project> </project>