Skip to content

Conversation

@leo-sakh
Copy link

This plugin runs (should run) in the package phase, after the maven-bundle-plugin has executed and generated the MANIFEST.MF for the bundle with the relevant Import-Package entries.

The plugin reads the generated MANIFEST.MF, picks out the Import-Package entries (with versions). It also reads the project's pom.xml and replaces the Import-Package config of the maven-bundle-plugin with entries from MANIFEST.MF. It then overwrites the existing pom.xml with the updated model.

Currently the pom.xml overwrite will happen at every execution. Next step is to only update it if the manifest entries are different than what is in the pom.

Issue: #4

How to try this. Add the following to a pom.xml which already contains a maven-bundle-plugin configuration:

<dependencies>
    ....
    <dependency>
      <groupId>ddf.support</groupId>
      <artifactId>bundle-auto-version</artifactId>
      <version>2.3.18-SNAPSHOT</version>
    </dependency>
    ....
</dependencies>

...

  <build>
    <plugins>
      ....
      <plugin>
        <groupId>ddf.support</groupId>
        <artifactId>bundle-auto-version</artifactId>
        <version>2.3.18-SNAPSHOT</version>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>bundle-auto-version</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      ....
    </plugins>
</build>

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

Successfully merging this pull request may close these issues.

2 participants