Generate correct version for jgit source bundle
The maven 2 build for jgit source bundle didn't create a correct OSGi version string, instead of org.eclipse.jgit.source_0.10.0.<timestamp> the generated OSGi version was org.eclipse.jgit.source_0.10.0.SNAPSHOT This caused trouble when trying to install it from p2 repository. Bug: 327616 Change-Id: Ic27c763ae9a4bcbb5bd6ed9562cd98bb4da3386b Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
This commit is contained in:
parent
fb1e500adc
commit
f8eb7e16aa
|
@ -0,0 +1,8 @@
|
||||||
|
Manifest-Version: 1.0
|
||||||
|
Bundle-ManifestVersion: 2
|
||||||
|
Bundle-Name: org.eclipse.jgit - Sources
|
||||||
|
Bundle-SymbolicName: org.eclipse.jgit.source;singleton:=true
|
||||||
|
Bundle-Vendor: Eclipse.org - JGit
|
||||||
|
Bundle-Version: 0.10.0.qualifier
|
||||||
|
Eclipse-SourceBundle: org.eclipse.jgit;version="0.10.0.qualifier";roots="."
|
||||||
|
|
|
@ -65,6 +65,7 @@
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<translate-qualifier/>
|
<translate-qualifier/>
|
||||||
|
<source-bundle-manifest>${project.build.directory}/META-INF/SOURCE-MANIFEST.MF</source-bundle-manifest>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -90,6 +91,48 @@
|
||||||
</resources>
|
</resources>
|
||||||
|
|
||||||
<plugins>
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-antrun-plugin</artifactId>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>translate-source-qualifier</id>
|
||||||
|
<phase>generate-resources</phase>
|
||||||
|
<configuration>
|
||||||
|
<tasks>
|
||||||
|
<copy file="META-INF/SOURCE-MANIFEST.MF" tofile="${source-bundle-manifest}" overwrite="true"/>
|
||||||
|
<replace file="${source-bundle-manifest}">
|
||||||
|
<replacefilter token=".qualifier" value=".${maven.build.timestamp}"/>
|
||||||
|
</replace>
|
||||||
|
</tasks>
|
||||||
|
</configuration>
|
||||||
|
<goals>
|
||||||
|
<goal>run</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-source-plugin</artifactId>
|
||||||
|
<inherited>true</inherited>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>attach-sources</id>
|
||||||
|
<phase>process-classes</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>jar</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<archive>
|
||||||
|
<manifestFile>${source-bundle-manifest}</manifestFile>
|
||||||
|
</archive>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
<plugin>
|
<plugin>
|
||||||
<artifactId>maven-jar-plugin</artifactId>
|
<artifactId>maven-jar-plugin</artifactId>
|
||||||
<configuration>
|
<configuration>
|
||||||
|
|
43
pom.xml
43
pom.xml
|
@ -191,10 +191,10 @@
|
||||||
<version>2.1.1</version>
|
<version>2.1.1</version>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-javadoc-plugin</artifactId>
|
<artifactId>maven-javadoc-plugin</artifactId>
|
||||||
<version>2.7</version>
|
<version>2.7</version>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
|
||||||
<plugin>
|
<plugin>
|
||||||
|
@ -223,12 +223,12 @@
|
||||||
<id>translate-qualifier</id>
|
<id>translate-qualifier</id>
|
||||||
<phase>generate-resources</phase>
|
<phase>generate-resources</phase>
|
||||||
<configuration>
|
<configuration>
|
||||||
<tasks unless="${translate-qualifier}">
|
<tasks unless="${translate-qualifier}">
|
||||||
<copy file="META-INF/MANIFEST.MF" tofile="${bundle-manifest}" overwrite="true"/>
|
<copy file="META-INF/MANIFEST.MF" tofile="${bundle-manifest}" overwrite="true"/>
|
||||||
<replace file="${bundle-manifest}">
|
<replace file="${bundle-manifest}">
|
||||||
<replacefilter token=".qualifier" value=".${maven.build.timestamp}"/>
|
<replacefilter token=".qualifier" value=".${maven.build.timestamp}"/>
|
||||||
</replace>
|
</replace>
|
||||||
</tasks>
|
</tasks>
|
||||||
</configuration>
|
</configuration>
|
||||||
<goals>
|
<goals>
|
||||||
<goal>run</goal>
|
<goal>run</goal>
|
||||||
|
@ -237,33 +237,6 @@
|
||||||
</executions>
|
</executions>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-source-plugin</artifactId>
|
|
||||||
<inherited>true</inherited>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>attach-sources</id>
|
|
||||||
<phase>process-classes</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>jar</goal>
|
|
||||||
</goals>
|
|
||||||
<configuration>
|
|
||||||
<archive>
|
|
||||||
<manifestEntries>
|
|
||||||
<Bundle-ManifestVersion>2</Bundle-ManifestVersion>
|
|
||||||
<Bundle-Name>${project.name} - Sources</Bundle-Name>
|
|
||||||
<Bundle-SymbolicName>${project.artifactId}.source;singleton:=true</Bundle-SymbolicName>
|
|
||||||
<Bundle-Vendor>Eclipse.org - JGit</Bundle-Vendor>
|
|
||||||
<Bundle-Version>${parsedVersion.osgiVersion}</Bundle-Version>
|
|
||||||
<Eclipse-SourceBundle>${project.artifactId};version="${parsedVersion.osgiVersion}";roots:="."</Eclipse-SourceBundle>
|
|
||||||
</manifestEntries>
|
|
||||||
</archive>
|
|
||||||
</configuration>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
|
|
||||||
<!-- Build helper maven plugin sets the parsedVersion.osgiVersion property -->
|
<!-- Build helper maven plugin sets the parsedVersion.osgiVersion property -->
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.codehaus.mojo</groupId>
|
<groupId>org.codehaus.mojo</groupId>
|
||||||
|
|
Loading…
Reference in New Issue