Hi Piotr,

maybe its only my usecase. We have a Test in our environment, which is checking 
the content of all Jar (also source jars) files and validates their MANIFEST.MF 
for various things regarding that.

The Apache commons bundles which are contained in the Eclipse-Orbit-repository 
(also their sources) are valid in our environment, but I was trying to use the 
recently build snapshot (which isn't conatined yet in the eclipse orbit 
repository) and put it in our environment. This failed because the MANIFEST.MF 
wasn't compatible with OSGI.

Thanks for your help, but it is too much overhead for "just being able" to see 
the source code temporarily. My problem will be solved automatically when the 
next Eclipse SimRel happens.

Best regards
Mehmet



________________________________
From: Piotr P. Karwasz <pi...@mailing.copernik.eu>
Sent: Tuesday, March 18, 2025 12:07 PM
To: dev@commons.apache.org <dev@commons.apache.org>
Subject: Re: bundle symbolic name in source jars MANIFEST.MF file.

[EXTERNAL] This email is from outside, please confirm sender, title, content 
and whether you're expecting an email from this sender. If you have any doubt 
about the legitimacy of this email, please use the Report feature of Microsoft 
Outlook 
(instructions<https://myadvantest.sharepoint.com/sites/InformationSecurity/SitePages/en/report_email.aspx>).
In case of a security incident click 
here<https://helpdesk.advantest.com/servicePortal/submitIncident?populateSR_id=334272>.


Hi Karaman,

On 18.03.2025 10:47, Karaman, Mehmet wrote:
> Here is a short example of how the MANIFEST.MF has to look like: OSGi 
> Modularity and Services - 
> Tutorial<https://www.vogella.com/tutorials/OSGi/article.html>. As I see that 
> the Eclipse Orbit is repackaging the apache commons bundles with an 
> appropriate MANIFEST.MF, so the best would be to wait until the next Eclipse 
> SimRel happens.
>
> I've checked the other apache commons projects which are using the same 
> parent pom and also have a unappropriate source jar, so my confusion was how 
> it comes that there are OSGI compatible jars and why the SNAPSHOT builds are 
> not OSGI compatible 🙂. Now my question is solved.

All the Commons binary JARs are valid OSGi bundles.

I don't really understand, why do you need the `-sources` artifacts to
be OSGi bundles, since they don't contain any compiled classes? These
files are basically ZIP files with a `.jar` extension and they are only
useful to look up Java source code in an IDE. You can't even
build/reproduce the binary JAR with them, since they lack all the files
with build instructions.

Can you clarify, how you are using the `-sources` archives and why you
need any metadata to be present in the MANIFEST.MF file? As most OSGi
descriptors these days, the MANIFEST.MF file in Apache Commons is not
hand written, but generated using the `maven-bundle-plugin`. The plugin
only writes the manifest to the output directory `target/classes`, but
not to a directory that would end up in the `-sources` archive. Would
you expect the plugin to write the manifest to both?

See [1] for a similar question.

Piotr

[1] https://github.com/apache/logging-log4j2/issues/3255


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org

Reply via email to