[slf4j-dev] [Bug 152] Bundle manifest headers have invalid version specifications in SLF4J version 1 .5.9-RC0

bugzilla-daemon at pixie.qos.ch bugzilla-daemon at pixie.qos.ch
Tue Nov 10 23:50:41 CET 2009


http://bugzilla.slf4j.org/show_bug.cgi?id=152





--- Comment #3 from Hugues Malphettes <hmalphettes at intalio.com>  2009-11-10 23:50:40 ---
In a similar situation I used
http://mojo.codehaus.org/build-helper-maven-plugin/parse-version-mojo.html

1- invoke it (in the parent pom to not copy-paste it everywhere)
<plugin>
  <groupId>org.codehaus.mojo</groupId>
  <artifactId>build-helper-maven-plugin</artifactId>
  <version>1.3</version>
  <executions>
    <execution>
      <id>parse-version</id>
      <goals>
        <goal>parse-version</goal>
      </goals>
    </execution>
  </executions>
</plugin>

2- call ant to replace the Bundle-Version with the one generated in #1
(assuming the MANIFEST.MF contains Bundle-Version: 1.5.9.qualifier)
<plugin>
  <artifactId>maven-antrun-plugin</artifactId>
  <executions>
    <execution>
      <phase>process-resources</phase>
      <configuration>
        <tasks>
          <replace file="${project.build.outputDirectory}/META-INF/MANIFEST.MF"
              token="Bundle-Version: 1.5.9.qualifier"
              value="Bundle-Version: ${parsedVersion.osgiVersion}"/>
        </tasks>
      </configuration>
      <goals>
        <goal>run</goal>
      </goals>
    </execution>
  </executions>
</plugin>

Let me know if that would suit this project and I'll work on a patch for your
sources.
The drawback is that for some reason, I had to copy-paste #2 in every pom.xml.


-- 
Configure bugmail: http://bugzilla.slf4j.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the slf4j-dev mailing list