Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bad OSGi metadata in https://repo1.maven.org/maven2/org/javassist/javassist/3.30.0-GA #471

Closed
merks opened this issue Dec 17, 2023 · 9 comments

Comments

@merks
Copy link
Contributor

merks commented Dec 17, 2023

This just-released version

https://repo1.maven.org/maven2/org/javassist/javassist/3.30.0-GA

has this erroneous requirement in the MANIFEST.MF:

Require-Capability: osgi.ee;filter:="(osgi.ee=UNKNOWN)"

The previous released version

https://repo1.maven.org/maven2/org/javassist/javassist/3.29.2-GA/

has this valid requirement in the MANIFEST.MF:

Require-Capability: osgi.ee;filter:="(&(osgi.ee=JavaSE)(version=1.8))"

I don't think the 3.30.0-GA version can be used in any OSGi application.

@chibash
Copy link
Member

chibash commented Dec 17, 2023

Any idea to fix this? Is pom.xml broken?

@merks
Copy link
Contributor Author

merks commented Dec 17, 2023

I couldn't figure how how the MANIFEST.MF is being generated and hence I could not determine the source of the wrong information...

Is it generated from here?

javassist/pom.xml

Lines 220 to 244 in f74619e

<artifactId>maven-bundle-plugin</artifactId>
<version>3.3.0</version>
<executions>
<execution>
<id>bundle-manifest</id>
<phase>process-classes</phase>
<goals>
<goal>manifest</goal>
</goals>
</execution>
</executions>
<configuration>
<supportedProjectTypes>
<supportedProjectType>jar</supportedProjectType>
<supportedProjectType>bundle</supportedProjectType>
<supportedProjectType>war</supportedProjectType>
</supportedProjectTypes>
<instructions>
<Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
<Bundle-Version>${project.version}</Bundle-Version>
<Import-Package>!com.sun.jdi.*</Import-Package>
<Export-Package>!com.sun.jdi.*,javassist.*;version="${project.version}"</Export-Package>
</instructions>
</configuration>
<extensions>true</extensions>

Or is it generated using this?

https://github.com/jboss-javassist/javassist/blob/master/build.xml

Both those files still have 3.29.2-GA so I'm really confused where 3.30.0-GA comes from and how it's built.

@merks
Copy link
Contributor Author

merks commented Dec 17, 2023

Cloning the repo and running the build produces this:

image

And that appears to be correct. I just don't know how the 3.30.0-GA versions is being created...

@merks
Copy link
Contributor Author

merks commented Dec 17, 2023

Maybe the problem is using an old version of this

https://repo1.maven.org/maven2/org/apache/felix/maven-bundle-plugin/3.0.0/

when this is the latest version:

https://repo1.maven.org/maven2/org/apache/felix/maven-bundle-plugin/5.1.9/

Maybe you are compiling for Java 11 or 17 and that old plugin don't recognize that?

@laeubi
Copy link

laeubi commented Dec 17, 2023

And that appears to be correct

The pom.xml says the project is at Java 11

javassist/pom.xml

Lines 154 to 155 in f74619e

<source>11</source>
<target>11</target>

so it does not seem correct to say it is java 8.

@chibash
Copy link
Member

chibash commented Dec 17, 2023

My apology. The last commit has not been pushed.
Anyway, I used pom.xml and Java 21 to generate the 3.30.0-GA release.

@chibash
Copy link
Member

chibash commented Dec 17, 2023

Thanks, @merks You're right.

@merks
Copy link
Contributor Author

merks commented Dec 18, 2023

Thank you for publishing the new version immediately:

https://repo1.maven.org/maven2/org/javassist/javassist/3.30.1-GA/

@merks
Copy link
Contributor Author

merks commented Dec 22, 2023

Of course this can be closed now. Happy Holidays. 🎆

@merks merks closed this as completed Dec 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants