]> source.dussan.org Git - archiva.git/commitdiff
Adding site deploy script for archiva-docs. Using https urls. 46/head
authorMartin Stockhammer <martin_s@apache.org>
Thu, 22 Nov 2018 19:32:24 +0000 (20:32 +0100)
committerMartin Stockhammer <martin_s@apache.org>
Thu, 22 Nov 2018 19:32:24 +0000 (20:32 +0100)
archiva-docs/README [deleted file]
archiva-docs/README.adoc [new file with mode: 0644]
archiva-docs/deploySite.sh [new file with mode: 0755]
archiva-docs/pom.xml
archiva-docs/src/site/site.xml
archiva-modules/pom.xml
archiva-modules/src/site/site.xml
pom.xml

diff --git a/archiva-docs/README b/archiva-docs/README
deleted file mode 100644 (file)
index 714b3aa..0000000
+++ /dev/null
@@ -1 +0,0 @@
-to deploy site: sh ./deploySite.sh
diff --git a/archiva-docs/README.adoc b/archiva-docs/README.adoc
new file mode 100644 (file)
index 0000000..6a42a2f
--- /dev/null
@@ -0,0 +1,81 @@
+Archiva Documentation - User Documentation
+===========================================
+:toc:
+
+
+== How to build and publish the pages for the archiva web content
+
+This module and the children contain web content and project reports that can be published to the 
+archiva web site: https://archiva.apache.org
+
+The web content parts of this module and submodules are published to the path 
+
+  /docs/${project.version}/
+
+=== Use the script
+
+There is a shell script +deploySite.sh+ which you can run to generate the site check and publish to 
+the remote repository. It works only on Linux, on other platforms you have to go the next section.
+
+The script is interactive, it asks you to confirm the publish after generation of the staging part.
+
+.Execute
+
+  ./deploySite.sh 
+
+All arguments are appended to the mvn calls.
+
+=== Run the mvn steps manually
+
+==== Building the pages
+
+You need enough free disk space to publish the web content. The archiva web site repository is big, 
+but the maven build will only checkout the necessary directories for this build (sparse checkout).
+
+For all the commands you have to change to this archiva-modules directory:
+
+  cd archiva/archiva-modules
+
+.The following creates the site to the staging folder
+
+  mvn clean site site:stage
+
+The result can be checked in 
+
+  archiva-modules/target/staging/ref/${project.version}
+
+with your browser.
+
+If you would like the use a local checkout of the archiva-web-content.git repository and not push directly
+to the remote repository, you may add this parameter:
+
+  -DsiteRepositoryUrl=scm:git:file:///${path-to-your-local-archiva}/archiva-web-content.git
+
+where +${path-to-your-local-archiva}+ is the path where a bare clone of the archiva-web-content.git is stored.
+
+NOTE: You cannot use +mvn site:run+ because this will place the submodules into the same folder and 
+      overwrite each other.
+
+==== Publish the pages
+
+.This command publishes to the git repository
+
+  mvn scm-publish:publish-scm
+
+After publishing to the git repository the gitpubsub mechanism is transferring it to the HTTP server.
+
+If you would like the use a local checkout of the archiva-web-content.git repository and not push directly
+to the remote repository, you may add this parameter:
+
+  -DsiteRepositoryUrl=scm:git:file:///${path-to-your-local-archiva}/archiva-web-content.git
+
+
+=== Some notes about the build process
+
+A sparse checkout of the git repository will be created in 
+
+ .site-content
+
+but only, if the directory +.site-content/.git+ does not exist. 
+
+
diff --git a/archiva-docs/deploySite.sh b/archiva-docs/deploySite.sh
new file mode 100755 (executable)
index 0000000..13e822b
--- /dev/null
@@ -0,0 +1,61 @@
+#!/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.
+#
+#  Author: Martin Stockhammer <martin_s@apache.org>
+#  Date:   2018-11-15
+#
+#  Publishes the site content and generated reports to the web content repository.
+#  It stops after the staging and let you check the content before pushing to the repository
+#
+
+THIS_DIR=$(dirname $0)
+THIS_DIR=$(readlink -f ${THIS_DIR})
+CONTENT_DIR=".site-content"
+
+PROJECT_VERSION=$(grep '<version>' pom.xml |head -1 | sed -e 's/.*<version>\(.*\)<\/version>.*/\1/g')
+SUB_DIR="docs/${PROJECT_VERSION}"
+
+if [ -d "${CONTENT_DIR}/.git" ]; then
+  git -C "${CONTENT_DIR}" fetch origin
+  git -C "${CONTENT_DIR}" reset --hard origin/master
+fi
+
+echo ">>>> Creating site and reports <<<<" 
+mvn clean site site:stage "$@"
+
+echo "*****************************************"
+echo ">>>> Finished the site stage process <<<<"
+echo "> You can check the content in the folder target/staging or by opening the following url"
+echo "> file://${THIS_DIR}/target/staging/${SUB_DIR}/index.html"
+echo "> "
+echo "> If everything is fine enter yes. After that the publish process will be started."
+echo -n "Do you want to publish (yes/no)? "
+read ANSWER
+
+if [ "${ANSWER}" == "yes" -o "${ANSWER}" == "YES" ]; then
+  echo "> Starting publish process"
+  mvn scm-publish:publish-scm "$@"
+else
+  echo "> Aborting now"
+  echo "> Running git reset in .site-content directory" 
+  git -C "${CONTENT_DIR}" fetch origin
+  git -C "${CONTENT_DIR}" reset --hard origin/master
+  echo ">>>> Finished <<<<"
+fi
+
index 1672a6a47ef143ad699d9818ca0dd264030c5188..f926b7e7a4407ed48376c2938f40ff8ba5bb2a65 100644 (file)
   <artifactId>archiva-docs</artifactId>
   <packaging>pom</packaging>
   <name>Archiva :: Documentation</name>
-  <url>http://archiva.apache.org/docs/${project.version}/</url>
+  <url>https://archiva.apache.org/docs/${project.version}/</url>
 
   <properties>
     <siteFilePath>${user.home}/archiva-sites/archiva-docs-${project.version}/</siteFilePath>
-    <scmPubCheckoutDirectory>${basedir}/.site-content</scmPubCheckoutDirectory>
     <maven.build.timestamp.format>yyyy-MM-dd</maven.build.timestamp.format>
     <releaseDate>${maven.build.timestamp}</releaseDate>
     <!-- The git repository, where the site content is placed -->
     <siteRepositoryUrl>scm:git:https://gitbox.apache.org/repos/asf/archiva-web-content-INVALID.git</siteRepositoryUrl>
+    <scmPubCheckoutDirectory>${basedir}/.site-content</scmPubCheckoutDirectory>
   </properties>
 
   <build>
         <reportSets>
           <reportSet>
             <reports>
-              <report>license</report>
-              <report>project-team</report>
+              <report>licenses</report>
+              <report>team</report>
             </reports>
           </reportSet>
         </reportSets>
index bc3310ddb773c416316835a938d1506e4893b3d2..18cc67806e0fbdd6e669f44de8aa8f83162d740a 100644 (file)
       </twitter>
       <ohloh>
         <projectId>6670</projectId>
-        <widget>stats</widget>
+        <widget>thin-badge</widget>
       </ohloh>
+      <gitHub>
+        <projectId>apache/archiva</projectId>
+        <ribbonOrientation>right</ribbonOrientation>
+        <ribbonColor>black</ribbonColor>
+      </gitHub>
     </fluidoSkin>
 
   </custom>
   <version position="right" />
 
   <body>
+
     <breadcrumbs>
-      <item name="Apache Archiva" href="http://archiva.apache.org/index.html"/>
+      <item name="Apache" href="https://www.apache.org" />
+      <item name="Archiva" href="https://archiva.apache.org" />
+      <item name="Archiva Documentation" href="index.html" />
     </breadcrumbs>
 
     <menu name="Introduction">
index 22ba74a5d6a6a06f7b19e2ecf978f91ded6019f6..cf4fa237e6d442dea51461ad8346b6dccb113d2f 100644 (file)
@@ -28,7 +28,7 @@
   <artifactId>archiva-modules</artifactId>
   <packaging>pom</packaging>
   <name>Archiva :: Modules</name>
-  <url>http://archiva.apache.org/ref/${project.version}</url>
+  <url>https://archiva.apache.org/ref/${project.version}</url>
 
   <properties>
     <scmPubCheckoutDirectory>${basedir}/.site-content</scmPubCheckoutDirectory>
index 0dbaf9467b8e952ad75de601132b288507240d4b..1963e93ca6c8a360f7e0fedc0a4042b4cf12e3f2 100644 (file)
@@ -51,9 +51,9 @@
   
   <body>
     <breadcrumbs>
-<!-- TODO: need to stop them inheriting 
-      <item name="Reports" href="/reports" />
--->
+      <item name="Apache" href="https://www.apache.org" />
+      <item name="Archiva" href="https://archiva.apache.org" />
+      <item name="Archiva Modules" href="index.html" />
     </breadcrumbs>
 
     <menu name="Developers">
diff --git a/pom.xml b/pom.xml
index b9f6784689bdc0a15bd73855286792c8fb0c2155..eb4112dadc77067fc1f9ac5634199ff26e69401e 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -31,7 +31,7 @@
   <packaging>pom</packaging>
 
   <name>Apache Archiva</name>
-  <url>http://archiva.apache.org</url>
+  <url>https://archiva.apache.org</url>
 
   <modules>
     <module>archiva-cli</module>