#5 aqute-bnd should be updated to > 4.x
Closed 2 years ago by mbooth. Opened 2 years ago by mbooth.

aqute-bnd is used to generate OSGi metadata, turning plain jars into OSGi bundles

However, the current version 3.x cannot deal with Java 9 or newer bytecode so upgrading would be desirable.

It looks like the "javapackages-tools" modular branch already made this upgrade so could just be able to backport from that branch: https://koji.fedoraproject.org/koji/buildinfo?buildID=1414401


If I remember correctly, I already tried to "backport" the 4.x update from the modular branches, but failed for some reason (either it didn't compile or it caused problems in other packages) ... I'll look into it again.

Side note: I tried to update to bnd 5.x recently but that failed spectacularly (gradle port ... :frowning: )

Now I remember :)

https://src.fedoraproject.org/rpms/aqute-bnd/pull-request/4

It looks like the bnd command is broken in the aqute-bnd 4.x packages from modular branches and nobody noticed? Maybe we can fix the classpath issue ...

Some discussion from IRC:

[14:00:40] <mbooth> decathorpe: The /usr/share/java/aqute-bnd/biz.aQute.bnd.jar file contains no classes at all when I build it...
[14:05:04] <mbooth> Missing bytecode would explain all the errors in the other packages
[14:05:33] <mbooth> In the build logs I see "[INFO] No sources to compile" :-o
[14:06:01] <decathorpe> "mbooth" (https://matrix.to/#/@freenode_mbooth:matrix.org): oh that's not good
[14:06:25] <decathorpe> I merged the changes from the modular branch verbatim. guess it was broken there too?
[14:06:35] <mbooth> Maybe so
[14:06:50] <decathorpe> (would also explain the missing autogenerated dep between the packages ...)
[14:07:19] <mbooth> Yeah the jar is empty also in this build: https://koji.fedoraproject.org/koji/buildinfo?buildID=1414401
[14:07:27] <mbooth> Which is the modular branch
[14:07:45] * decathorpe frowns
[14:07:57] <decathorpe> javapackages-tools-201902
[14:15:23] <mbooth> It's not immediately obvious from looking at the poms why it builds nothing

Hi FYI @mizdebsk it seems this package is broken in javapackages-tools module too

[14:15:23] <mbooth> It's not immediately obvious from looking at the poms why it builds nothing
Hi FYI @mizdebsk it seems this package is broken in javapackages-tools module too

Missing parent POM reference is the cause of empty JAR. To fix this you can add %pom_add_parent biz.aQute.bnd:parent:%{version} after pushd biz.aQute.bnd and cp -p %{SOURCE4} pom.xml

Yeah, that helps, now stuff is getting compiled. I need to %pom_add_dep some thing too ... working on it.

This is what I have so far:

+BuildRequires:  mvn(jline:jline)
+BuildRequires:  mvn(org.apache.ant:ant)
+%pom_add_parent biz.aQute.bnd:parent:%{version}
-%pom_remove_dep :jline
+%pom_add_dep org.apache.ant:ant

Now it complains about not finding biz.aQute.bnd.reporter.exporter package (which is an explicitly disabled submodule). Do we need to enable building the biz.aQute.bnd.reporter submodule?

Fixing the wrong cp invocation, it leads to undefined symbols from the biz.aQute.bnd.reporter package. Copying those sources into the bnd tree as well (like the exporters code) leads to more missing dependencies: com.github.javaparser:javaparser-core (which we have), and org.jtwig:jtwig-core (which we don't).

Trying the trivial solution (removing the file that complains about jtwig) doesn't work, since classes we need for the whole thing to hold together require symbols that link to jtwig.

Funnily enough, going to the homepage for jtwig, one is greeted with a full-screen "Goodbye" message (this project is no longer maintained). Yay.

Wow. This (upstream) project is hot garbage.

@mbooth maven-mapping is now re-reviewed and un-retired in rawhide.

Regarding aqute-bnd though, you can take a look at my WIP aqute-bnd 4.3.0 PR to see how far I got with making it work, but I don't have the resources to fix it up myself.

Metadata Update from @mbooth:
- Issue status updated to: Closed (was: Open)

2 years ago

Login to comment on this ticket.

Metadata