]> source.dussan.org Git - jgit.git/commitdiff
Enable maven site generation for jgit 92/33892/1
authorMatthias Sohn <matthias.sohn@sap.com>
Thu, 25 Sep 2014 09:18:53 +0000 (11:18 +0200)
committerMatthias Sohn <matthias.sohn@sap.com>
Thu, 25 Sep 2014 12:55:40 +0000 (14:55 +0200)
Generating the site:
$ mvn site:site

Local staging of the site:
$ mvn site:stage
the site is staged under ./target/staging/

If you can connect to build.eclipse.org over ssh
(ask webmaster if you are a committer and need ssh access)
you can deploy a local build of the site:
$ mvn site:deploy
The site is deployed under
http://download.eclipse.org/jgit/site/${project.version}

To select the ssh key to use for deploying over ssh add the following
section to your Maven settings.xml:
<server>
  <id>jgit.website</id>
  <username>username</username>
  <privateKey>${user.home}/.ssh/id_rsa</privateKey>
  <filePermissions>664</filePermission>
  <directoryPermissions>775</directoryPermissions>
  <configuration></configuration>
</server>

To deploy the site from Hudson https://hudson.eclipse.org/egit/
enable the Maven profile "build-server".

Change-Id: I7e64c8560ca75196d2232f111ffad953c14f013f
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
pom.xml

diff --git a/pom.xml b/pom.xml
index 9b6c490aa8214c7bd4091ce66d07e7d31c6e4b4e..15ea3bc01115b17356a734f340cf5a3096df0b14 100644 (file)
--- a/pom.xml
+++ b/pom.xml
   <properties>
     <jgit-url>http://www.eclipse.org/jgit/</jgit-url>
     <jgit-copyright>Copyright (c) 2005, 2009 Shawn Pearce, Robin Rosenberg, et.al.</jgit-copyright>
+    <jgit.website.url>scp://build.eclipse.org/home/data/httpd/download.eclipse.org/jgit/site/${project.version}/</jgit.website.url>
 
     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
     <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
           <artifactId>jacoco-maven-plugin</artifactId>
           <version>0.7.1.201405082137</version>
         </plugin>
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-site-plugin</artifactId>
+          <version>3.4</version>
+          <dependencies>
+            <dependency><!-- add support for ssh/scp -->
+              <groupId>org.apache.maven.wagon</groupId>
+              <artifactId>wagon-ssh</artifactId>
+              <version>2.7</version>
+            </dependency>
+          </dependencies>
+        </plugin>
       </plugins>
     </pluginManagement>
 
       <url>https://repo.eclipse.org/content/repositories/jgit-snapshots/</url>
       <uniqueVersion>true</uniqueVersion>
     </snapshotRepository>
+    <site>
+      <id>jgit.website</id>
+      <name>JGit Website</name>
+      <url>${jgit.website.url}</url>
+    </site>
   </distributionManagement>
 
   <profiles>
         </plugins>
       </build>
     </profile>
+    <profile>
+      <id>build-server</id>
+      <properties>
+        <jgit.website.url>file:///home/data/httpd/download.eclipse.org/jgit/site/${project.version}/</jgit.website.url>
+      </properties>
+    </profile>
   </profiles>
 
   <modules>