Add SourceReferences to plugins
authorMarc-Andre Laperle <marc-andre.laperle@ericsson.com>
Fri, 9 Jan 2015 22:55:29 +0000 (17:55 -0500)
committerMarc-Andre Laperle <marc-andre.laperle@ericsson.com>
Mon, 12 Jan 2015 21:18:06 +0000 (16:18 -0500)
This allows the user to clone and checkout the source code of Trace Compass
without knowing where the repository is. See:
https://wiki.eclipse.org/PDE/UI/SourceReferences

One use case is to right-click on a plug-in under the Plug-in dependencies in
Package Explorer view and select Import from Repository. Note that for this
EGit needs to be installed.

What this patch does is to let Tycho generate the source references in the
MANIFEST.MF of the built jars. So to test this patch, one can build the update
site locally and inspect the manifests of the (non-source) jars.

Change-Id: Ie28c96a03df01fa9f15b13ccc6e0662f2cb3d0f4
Signed-off-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/39339
Reviewed-by: Hudson CI
Reviewed-by: Bernd Hufmann <bernd.hufmann@ericsson.com>
Tested-by: Bernd Hufmann <bernd.hufmann@ericsson.com>
pom.xml

diff --git a/pom.xml b/pom.xml
index 7fac79925a06eb655f45e3f75877d5ed2d461e55..73dc3031e376c9abb0a2895fddb1cd4f1d89ba1f 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -40,6 +40,8 @@
 <properties>
   <base.test.vmargs>-Xms256m -Xmx1024m -XX:MaxPermSize=256m</base.test.vmargs>
   <tycho-version>0.22.0</tycho-version>
+  <tycho-extras-version>0.22.0</tycho-extras-version>
+  <tycho.scmUrl>scm:git:git://git.eclipse.org/gitroot/tracecompass/org.eclipse.tracecompass.git</tycho.scmUrl>
   <target-platform>tracecompass-e4.4</target-platform>
   <sonar.core.codeCoveragePlugin>jacoco</sonar.core.codeCoveragePlugin>
   <sonar.dynamicAnalysis>reuseReports</sonar.dynamicAnalysis>
           <artifactId>tycho-versions-plugin</artifactId>
           <version>${tycho-version}</version>
         </plugin>
+        <plugin>
+          <groupId>org.eclipse.tycho</groupId>
+          <artifactId>tycho-packaging-plugin</artifactId>
+          <version>${tycho-version}</version>
+          <configuration>
+            <sourceReferences>
+              <generate>true</generate>
+            </sourceReferences>
+          </configuration>
+          <dependencies>
+            <dependency>
+              <groupId>org.eclipse.tycho.extras</groupId>
+              <artifactId>tycho-sourceref-jgit</artifactId>
+              <version>${tycho-extras-version}</version>
+            </dependency>
+          </dependencies>
+        </plugin>
        <plugin>
           <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-resources-plugin</artifactId>
This page took 0.025212 seconds and 5 git commands to generate.