Hi,

I'm trying to understand why my project no longer builds in Eclipse
after upgrading to m2e 1.4.

The project consists of several OSGi bundles, built using the Felix
maven-bundle-plugin, all in a reactor.

They are later picked up and used by a Tycho build for use in an
Eclipse plugin. In order to ensure that these bundles are updated when
upgrading the Eclipse plugin, I have added a build qualifier to the
bundle-plugin builds:

        <plugin>
          <groupId>org.eclipse.tycho</groupId>
          <artifactId>tycho-packaging-plugin</artifactId>
          <version>${tycho.version}</version>
          <executions>
            <execution>
              <id>timestamp</id>
              <phase>validate</phase>
              <goals>
                <goal>build-qualifier</goal>
              </goals>
            </execution>
          </executions>
        </plugin>

Then used the ${unqualifiedVersion} and ${buildQualifier} set by the
build-qualifier goal in the Bundle-Version as follows:

        <plugin>
          <groupId>org.apache.felix</groupId>
          <artifactId>maven-bundle-plugin</artifactId>
          <extensions>true</extensions>
          <configuration>
            <manifestLocation>META-INF</manifestLocation>
            <instructions>
              
<Bundle-Version>${unqualifiedVersion}.0.${buildQualifier}</Bundle-Version>
            </instructions>
          </configuration>
        </plugin>

Previously, I had used a lifecycle mapping to ensure that the
build-qualifier goal was run by m2e:

        <plugin>
          <groupId>org.eclipse.m2e</groupId>
          <artifactId>lifecycle-mapping</artifactId>
          <version>1.0.0</version>
          <configuration>
            <lifecycleMappingMetadata>
              <pluginExecutions>
                <pluginExecution>
                  <pluginExecutionFilter>
                    <groupId>org.eclipse.tycho</groupId>
                    <artifactId>tycho-packaging-plugin</artifactId>
                    <versionRange>[0.13.0,)</versionRange>
                    <goals>
                      <goal>build-qualifier</goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <execute />
                  </action>
                </pluginExecution>
              </pluginExecutions>
            </lifecycleMappingMetadata>
          </configuration>
        </plugin>

However, after updating to m2e, I am seeing the following error in my
Eclipse log:

  Invalid value for Bundle-Version,
${unqualifiedVersion}.0.${buildQualifier} does not match
[0-9]+(\.[0-9]+(\.[0-9]+(\.[0-9A-Za-z_-]+)?)?)?

I don't understand why these properties are no longer being interpolated.

Is there a better way to get a build qualifier timestamp that's
consistent across projects in a reactor, and that also works in m2e?

Please let me know if a test project would help.

Thanks
Martin
_______________________________________________
m2e-users mailing list
m2e-users@eclipse.org
https://dev.eclipse.org/mailman/listinfo/m2e-users

Reply via email to