#2 Re-add BR spec-version-maven-plugin, which also fix bundle manifest
Closed 2 years ago by mizdebsk. Opened 2 years ago by sergiomb.
Unknown source rawhide  into  rawhide

file modified
+5 -9
@@ -2,7 +2,7 @@

  

  Name:           jakarta-annotations

  Version:        1.3.5

- Release:        11%{?dist}

+ Release:        12%{?dist}

  Summary:        Jakarta Annotations

  License:        EPL-2.0 or GPLv2 with exceptions

  URL:            https://github.com/eclipse-ee4j/common-annotations-api
@@ -16,6 +16,7 @@

  %else

  BuildRequires:  mvn(org.apache.felix:maven-bundle-plugin)

  BuildRequires:  mvn(org.codehaus.mojo:build-helper-maven-plugin)

+ BuildRequires:  mvn(org.glassfish.build:spec-version-maven-plugin)

  %endif

  

  Provides:       glassfish-annotation-api = %{version}-%{release}
@@ -43,14 +44,6 @@

  %pom_remove_plugin :maven-source-plugin api

  %pom_remove_plugin :findbugs-maven-plugin api

  

- # Remove use of spec-version-maven-plugin

- %pom_remove_plugin :spec-version-maven-plugin api

- %pom_xpath_set pom:Bundle-Version '${project.version}' api

- %pom_xpath_set pom:Bundle-SymbolicName '${project.artifactId}' api

- %pom_xpath_set pom:Extension-Name '${extension.name}' api

- %pom_xpath_set pom:Implementation-Version '${project.version}' api

- %pom_xpath_set pom:Specification-Version '${spec.version}' api

- 

  # provide aliases for the old artifact coordinates

  %mvn_alias jakarta.annotation:jakarta.annotation-api \

    javax.annotation:javax.annotation-api \
@@ -67,6 +60,9 @@

  %doc README.md

  

  %changelog

+ * Fri Aug 13 2021 Sérgio Basto <sergio@serjux.com> - 1.3.5-12

+ - Re-add BR spec-version-maven-plugin, which also fix bundle manifest

+ 

  * Fri Aug 13 2021 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.3.5-11

  - Fix bundle manifest

  

no initial comment

What is the reasoning for this change? Is there an issue this PR fixes?

What is the reasoning for this change? Is there an issue this PR fixes?

is another way to fix https://src.fedoraproject.org/rpms/jakarta-annotations/c/d4c45b362fad6c0d8290a7b133500f4922fbf727?branch=rawhide but didn't see any issue

it seems to me more elegant use BuildRequires: mvn(org.glassfish.build:spec-version-maven-plugin) and not use %pom_xpath_set

The bug was https://bugzilla.redhat.com/show_bug.cgi?id=1987912 , that I close it yesterday and I hope that I did the right thing

I prefer not to buildrequire spec-version-maven-plugin because it is not available in bootstrap mode, so it would still need to be conditionally disabled. It is also not available in CentOS/RHEL, so the spec file would need to carry build conditionals to disable it in ELN/RHEL too. That would make the spec file more complex than it currently is.
If there is any other issue with current approach other than being "less elegant" than using spec-version-maven-plugin, then I would keep the current approach.

The bug was https://bugzilla.redhat.com/show_bug.cgi?id=1987912 , that I close it yesterday and I hope that I did the right thing

Yes, thanks for closing it. The bug should be now resolved.

Closing as the underlying issue was resolved in a different way.

Pull-Request has been closed by mizdebsk

2 years ago
Metadata