Stuart McCulloch wrote:
2008/4/25 Derek Baum <[EMAIL PROTECTED]>:

Hi,

I'm using the felix-maven-plugin in a pom with attached artefacts.


you mean the maven-bundle-plugin?  the maven-felix-plugin is a different
beast...

Yes, sorry, that's what I meant.
Although it generates the expected artefacts
(${pom.artefactId}-${pom.version}-boot.jar and artefactId-version-cli.jar),
it unconditionally sets the Bundle-Version to ${pom.version}-boot and
${pom.version}.cli respectively, which cannot be over-ridden by adding an
explicit instruction to set the Bundle-Version.


that's correct, as the use-case for adding this feature was for people who
wanted to produce JDK5 and JDK1.4 versions of the _same_ bundle, so
because the symbolic name would be the same, the classifier must then
be added to the version to distinguish them.

This is not the behaviour I want, as both attached artefacts must have the
same version as the pom, not modified by the classifier.


just want to confirm - these two bundles will have different symbolic names?
Yes, they have different symbolic names, but are closely related and must have the same version.

I know that I could create separate poms to achieve this, but I am building over 100 bundles and it is convenient to be able to generate these closely-related bundles from the same pom.

Is this the behaviour intended, or is it a bug?
it is the intended behaviour for the above use-case, but we could add a
switch
to turn it off - it's difficult to detect whether the classifier should be
added to the
version automatically, because each bundling process is run in isolation

there's also no way to distinguish where the bundle version came from in
Maven
(ie. general config or specific to the classifier) once it reaches the
bundleplugin,
so a new switch is the only safe way to detect the different use-case...

please raise an issue on JIRA for this new feature.
OK, I'll raise a JIRA,

Thanks,

Derek


Thanks,
Derek


<build>
 <plugins>
  <plugin>
    <groupId>org.apache.felix</groupId>
    <artifactId>maven-bundle-plugin</artifactId>
    <extensions>true</extensions>
    <executions>

      <execution>
        <id>boot</id>
        <phase>package</phase>
        <goals>
          <goal>bundle</goal>
        </goals>
        <configuration>
          <classifier>boot</classifier>
          <instructions>
            <_include>bld-boot.bnd</_include>
          </instructions>
        </configuration>
        </execution>

        <execution>
          <id>cli</id>
          <phase>package</phase>
          <goals>
            <goal>bundle</goal>
          </goals>
          <configuration>
            <classifier>cli</classifier>
            <instructions>
              <_include>bld-cli.bnd</_include>
            </instructions>
          </configuration>
        </execution>

      </executions>
  </plugin>
 </plugins>
</build>



__________________________________________________

This email has been virus scanned by Message Labs.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





__________________________________________________

This email has been virus scanned by Message Labs.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to