You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@reef.apache.org by bg...@apache.org on 2015/02/20 04:18:31 UTC

incubator-reef git commit: [REEF-91] Create a script for publishing REEF website

Repository: incubator-reef
Updated Branches:
  refs/heads/master 23e16da12 -> 7dae6ff6d


[REEF-91] Create a script for publishing REEF website

  This adds a script for updating local contents of the website to
  the Apache SVN server.

    * The script itself
    * Changes in `pom.xml` and `website/pom.xml` to prevent
      unnecessary builds

JIRA:
  [REEF-91](https://issues.apache.org/jira/browse/REEF-91)

Pull Request:
  Closes #83

Author:
  Jason (Joo Seong) Jeong culex496782@gmail.com


Project: http://git-wip-us.apache.org/repos/asf/incubator-reef/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-reef/commit/7dae6ff6
Tree: http://git-wip-us.apache.org/repos/asf/incubator-reef/tree/7dae6ff6
Diff: http://git-wip-us.apache.org/repos/asf/incubator-reef/diff/7dae6ff6

Branch: refs/heads/master
Commit: 7dae6ff6d7cdea60b0334d980f558afd58a0ff56
Parents: 23e16da
Author: Jason (Joo Seong) Jeong <cu...@gmail.com>
Authored: Mon Feb 16 20:03:36 2015 +0900
Committer: Byung-Gon Chun <bg...@apache.org>
Committed: Fri Feb 20 11:56:16 2015 +0900

----------------------------------------------------------------------
 pom.xml            |  7 +++---
 website/pom.xml    | 63 ++++++++++++++++++++++++++++++++++++++++++++-----
 website/publish.sh | 50 +++++++++++++++++++++++++++++++++++++++
 3 files changed, 111 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/7dae6ff6/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 8211694..615f875 100644
--- a/pom.xml
+++ b/pom.xml
@@ -56,9 +56,9 @@ under the License.
     </properties>
 
     <scm>
-        <connection>scm:git:git@github.com:apache/incubator-reef.git</connection>
-        <developerConnection>scm:git:https://git-wip-us.apache.org/repos/asf/incubator-reef.git</developerConnection>
-        <url>scm:git:git@github.com:apache/incubator-reef.git</url>
+        <connection>scm:git:git@github.com:apache/incubator-reef</connection>
+        <developerConnection>scm:git:https://git-wip-us.apache.org/repos/asf/incubator-reef</developerConnection>
+        <url>scm:git:git@github.com:apache/incubator-reef</url>
         <tag>HEAD</tag>
     </scm>
 
@@ -643,6 +643,7 @@ under the License.
         <module>lang/java/reef-webserver</module>
         <module>lang/java/reef-utils-hadoop</module>
         <module>lang/java/reef-utils</module>
+        <module>website</module>
     </modules>
 
     <profiles>

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/7dae6ff6/website/pom.xml
----------------------------------------------------------------------
diff --git a/website/pom.xml b/website/pom.xml
index 455ba52..0d174ad 100644
--- a/website/pom.xml
+++ b/website/pom.xml
@@ -29,20 +29,44 @@ under the License.
     
     <build>
         <sourceDirectory>src</sourceDirectory>
-        <plugins>        
+        <plugins>
             <plugin>
-                <artifactId>maven-compiler-plugin</artifactId>
-                <version>3.1</version>
+                <artifactId>maven-install-plugin</artifactId>
+                <version>2.5.2</version>
                 <configuration>
-                    <source>1.7</source>
-                    <target>1.7</target>
+                    <skip>true</skip>
                 </configuration>
             </plugin>
             <plugin>
+                <artifactId>maven-remote-resources-plugin</artifactId>
+                <version>1.5</version>
+                <configuration>
+                    <skip>true</skip>
+                </configuration>
+            </plugin>
+            <plugin>
+                <artifactId>maven-resources-plugin</artifactId>
+                <version>2.6</version>
+                <configuration>
+                    <skip>true</skip>
+                </configuration>
+            </plugin>
+            <plugin>
+                <artifactId>maven-jar-plugin</artifactId>
+                <version>2.5</version>
+                <executions>
+                    <execution>
+                        <id>default-jar</id>
+                        <phase>none</phase>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
                 <artifactId>maven-site-plugin</artifactId>
                 <version>3.3</version>
                 <configuration>
                     <skipDeploy>true</skipDeploy>
+                    <outputDirectory>${project.build.directory}/staging/site</outputDirectory>
                 </configuration>
                 <dependencies>
                     <dependency>
@@ -52,6 +76,33 @@ under the License.
                     </dependency>
                 </dependencies>
             </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-scm-publish-plugin</artifactId>
+                <version>1.1</version>
+                <configuration>
+                    <tryUpdate>true</tryUpdate>
+                    <pubScmUrl>scm:svn:https://svn.apache.org/repos/asf/incubator/reef/</pubScmUrl>
+                    <ignorePathsToDelete>
+                        <ignorePathToDelete>apidocs</ignorePathToDelete>
+                    </ignorePathsToDelete>
+                    <providerImplementations>
+                        <svn>javasvn</svn>
+                    </providerImplementations>
+                </configuration>
+                <dependencies>
+                    <dependency>
+                        <groupId>com.google.code.maven-scm-provider-svnjava</groupId>
+                        <artifactId>maven-scm-provider-svnjava</artifactId>
+                        <version>2.1.1</version>
+                    </dependency>
+                    <dependency>
+                        <groupId>org.tmatesoft.svnkit</groupId>
+                        <artifactId>svnkit</artifactId>
+                        <version>1.8.7</version>
+                    </dependency>
+                </dependencies>
+            </plugin>
         </plugins>
     </build>
-</project>
\ No newline at end of file
+</project>

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/7dae6ff6/website/publish.sh
----------------------------------------------------------------------
diff --git a/website/publish.sh b/website/publish.sh
new file mode 100755
index 0000000..5551a95
--- /dev/null
+++ b/website/publish.sh
@@ -0,0 +1,50 @@
+#!/bin/bash
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+if [ $# -gt 0 ]
+then
+  echo "Usage: ./publish.sh"
+  echo "       (with no arguments)"
+  exit 1
+fi
+
+echo
+echo "Shell script for uploading REEF website contents to Apache SVN!"
+
+# When adding new javadocs (e.g. a new release), execute
+# 'mvn javadoc:aggregate' in \$REEF_HOME and put the resulting
+# \$REEF_HOME/target/apidocs folder in the following directory.
+echo "Newly updated javadocs (if there is any) should be in the directory:"
+echo "  \$REEF_HOME/website/target/staging/site/apidocs/\${reef.version}"
+echo "Please run this script in \$REEF_HOME/website."
+echo
+
+read -p "Apache Username: " username
+read -s -p "Apache Password: " password
+echo
+read -p "Commit Message (empty string for default msg): " comment
+
+if [ -z "$comment" ]
+then
+  mvn site:site scm-publish:publish-scm -Dusername="$username" -Dpassword="$password"
+else
+  mvn site:site scm-publish:publish-scm -Dusername="$username" -Dpassword="$password" -Dscmpublish.checkinComment="$comment"
+fi
+