Coder Social home page Coder Social logo

Comments (7)

sparsick avatar sparsick commented on August 25, 2024

Hi @emweber,

IMHO the manifest of the source jar and the "normal" jar should be identical. Therefore, I would prefer the <override> option should override both manifest files (in source jar and in the normal jar).

Do you want to create a PR for solving this issue?

from p2-maven-plugin.

emweber avatar emweber commented on August 25, 2024

Well, I forgot to explicitly mention that in case of org.jboss.spec.javax.annotation:jboss-annotations-api_1.3_spec:2.0.1.Final
the bundle jar has perfect OSGI-headers, so I do not want to override them.
Only the manifest of the source bundle is broken and needs to be re-written.

What if p2-maven-plugin would always automatically detect broken source-bundles and re-writes the manifest then?
WDYT?

from p2-maven-plugin.

sparsick avatar sparsick commented on August 25, 2024

Hi @emweber,

your idea that p2 maven plugin could detect broken source-bundle is good. P2 Maven plugin could log a warning if it finds it. But I struggle with the rewriting the manifest automatically, because it fights only a symptom and fighting symptoms should be a conscious decision by the developer to rewrite the manifest. Nevertheless, I would prefer the <override> option should override both manifest files (in source jar and in the normal jar). Yes, in this case the bundle jar is fine, but from consistency reason the <override> option should always override both manifest (in source-jar and normal jar). In your case it would mean, that you have to "copy" the bnd instruction from the original one.

from p2-maven-plugin.

emweber avatar emweber commented on August 25, 2024

Hi Sandra,
the pull requests as a POC simply removes the Export-Package, Export-Service and Provide-Capability headers from an existing source-bundle manifest before the Eclipse-SourceBundle headers are written. No logging yet since I'm unsure what the message should look like.
While this does not fix the issue, it solves my use-case: Fix broken source bundle manifests.
Maybe I should update the issue title?

from p2-maven-plugin.

sparsick avatar sparsick commented on August 25, 2024

Hi @emweber, yes... please update the issue title.

from p2-maven-plugin.

sparsick avatar sparsick commented on August 25, 2024

@emweber Thank you for your contribution. I released a new version 1.7.0. with your PR. So in the next hours it should be available on Maven Central.

from p2-maven-plugin.

castortech avatar castortech commented on August 25, 2024

Hi @emweber,

This is great and I just had a similar case, but wondering if there are any reasons why only removing the exports?

from p2-maven-plugin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.