]> source.dussan.org Git - jgit.git/commitdiff
Fix build of JGit source bundle and feature 63/1463/2
authorMatthias Sohn <matthias.sohn@sap.com>
Tue, 31 Aug 2010 00:35:08 +0000 (02:35 +0200)
committerMatthias Sohn <matthias.sohn@sap.com>
Tue, 31 Aug 2010 00:50:03 +0000 (02:50 +0200)
Add local changes I missed to push with [1] which broke the JGit
build.

[1] http://egit.eclipse.org/r/#change,1442

Change-Id: I300bfa84c5d8b5128026869b694ef5da7b0d3a4a
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
org.eclipse.jgit.packaging/pom.xml
pom.xml

index 21ea83154ea9ff2e73d3b97ff8368e1b16a02840..cb545674e6d09cb886265835fc154f6e67460872 100644 (file)
@@ -65,6 +65,7 @@
 
   <modules>
     <module>org.eclipse.jgit.feature</module>
+    <module>org.eclipse.jgit.source.feature</module>
     <module>org.eclipse.jgit.junit.feature</module>
     <module>org.eclipse.jgit.updatesite</module>
   </modules>
     </repository>
   </repositories>
 
+  <dependencies>
+    <!-- sources artifacts so that we can place them in the features -->
+    <dependency>
+      <groupId>org.eclipse.jgit</groupId>
+      <artifactId>org.eclipse.jgit</artifactId>
+      <version>0.9.0-SNAPSHOT</version>
+      <classifier>sources</classifier>
+    </dependency>
+  </dependencies>
+
   <build>
     <plugins>
       <plugin>
diff --git a/pom.xml b/pom.xml
index 60c4ed69a78d307a8870e5b2c0bc8307a3c4cb11..fe9a8c095ea980dcfa570e0d41c33d0f5893ee11 100644 (file)
--- a/pom.xml
+++ b/pom.xml
         <plugin>
           <groupId>org.codehaus.mojo</groupId>
           <artifactId>build-helper-maven-plugin</artifactId>
-          <version>1.3</version>
+          <version>1.5</version>
         </plugin>
       </plugins>
     </pluginManagement>
       <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 -->
+      <plugin>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>build-helper-maven-plugin</artifactId>
+        <executions>
+          <execution>
+            <id>set-osgi-version</id>
+            <phase>validate</phase>
+            <goals>
+              <goal>parse-version</goal>
+            </goals>
           </execution>
         </executions>
       </plugin>