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

Add automatic module name manifest entry #43

Open
gkopff opened this issue Sep 24, 2018 · 1 comment
Open

Add automatic module name manifest entry #43

gkopff opened this issue Sep 24, 2018 · 1 comment

Comments

@gkopff
Copy link
Owner

gkopff commented Sep 24, 2018

@spegelref You added the bits and pieces to make this OSGi aware. I wondered if you knew what the right thing to do is with regards to OSGi + JPMS?

The simplest first step towards supporting JPMS is to add an automatic module name entry to the MANIFEST.MF.

However, it looks like just configuring the maven-jar-plugin to do it, like so:

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <version>3.0.2</version>
        <configuration>
          <archive>
            <manifestEntries>
              <Automatic-Module-Name>com.fatboyindustrial.gson-javatime-serialisers</Automatic-Module-Name>
            </manifestEntries>
            <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
          </archive>
        </configuration>
      </plugin>

... doesn't work when bnd-maven-plugin is involved in creating the manifest.

Any ideas how to get bnd-maven-plugin and maven-jar-plugin to place nicely together?

@spegelref
Copy link
Contributor

Sorry been off github for some time.

If the only thing you need is to add the line: Automatic-Module-Name: com.fatboyindustrial.gson-javatime-serialisers into the META-INF/MANIFEST.MF then you could add it in the bnd.bnd file and bnd plugin will include it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants