Adding new components. Updating for staging environment.
diff --git a/checkoutSite.sh b/checkoutSite.sh
index 5e582bd..4762b09 100755
--- a/checkoutSite.sh
+++ b/checkoutSite.sh
@@ -27,7 +27,7 @@
# is rather large and we don't want to checkout the complete data.
#
-SITE_DIR=".site-content"
+SITE_DIR="site-content"
GIT_REMOTE=""
GIT_USER=$(git config user.name)
@@ -42,6 +42,7 @@
FORCE=1
MODULE_DIR="${MY_PWD}"
PATTERN=""
+BRANCH="master"
while [ ! -z "$1" ]; do
case "$1" in
-f)
@@ -67,6 +68,11 @@
MODULE_DIR="$1"
shift
;;
+ -b)
+ shift
+ BRANCH="$1"
+ shift
+ ;;
*)
GIT_REMOTE="$1"
shift
@@ -119,6 +125,8 @@
cd "${SITE_DIR}" || { echo "Could not change to site dir ${SITE_DIR}"; exit 1; }
+git checkout "${BRANCH}"
+
git config core.sparsecheckout true
git config user.name "${GIT_USER}"
git config user.email "${GIT_EMAIL}"
diff --git a/deploySite.sh b/deploySite.sh
index 70b31fb..9c27114 100755
--- a/deploySite.sh
+++ b/deploySite.sh
@@ -26,40 +26,48 @@
THIS_DIR=$(dirname $0)
THIS_DIR=$(readlink -f ${THIS_DIR})
-CONTENT_DIR="site-content"
+CONTENT_DIR=".site-content"
+BRANCH="asf-staging-3.0"
+
+if grep -q '<scmPublishBranch>' pom.xml; then
+ BRANCH=$(sed -n -e 's/.*<scmPublishBranch>\(.*\)<\/scmPublishBranch>.*/\1/p' pom.xml)
+fi
+
+if grep -q '<scmPubCheckoutDirectory>' pom.xml; then
+ CONTENT_DIR=$(sed -n -e 's/.*<scmPubCheckoutDirectory>\(.*\)<\/scmPubCheckoutDirectory>.*/\1/p' pom.xml)
+fi
+
SUB_DIR=""
if [ -d "${CONTENT_DIR}/.git" ]; then
git -C "${CONTENT_DIR}" fetch origin
- git -C "${CONTENT_DIR}" reset --hard origin/master
+ git -C "${CONTENT_DIR}" reset --hard origin/${BRANCH}
+ git -C "${CONTENT_DIR}" clean -f -d
fi
echo ">>>> Creating site and reports <<<<"
-mvn clean site site:stage "$@"
-
-if [ $? -ne 0 ]; then
- echo ">>>> Error occurred. Stopping now. <<<<"
- exit 1
-fi
+mvn clean site "$@"
+mvn 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 "> 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
+if [ "${ANSWER}" == "yes" -o "${ANSWER}" == "YES" -o "${ANSWER}" == "y" -o "${ANSWER}" == "Y" ]; then
echo "> Starting publish process"
mvn scm-publish:publish-scm "$@"
else
echo "> Aborting now"
- echo "> Running git reset in ${CONTENT_DIR} directory"
+ echo "> Running git reset in .site-content directory"
git -C "${CONTENT_DIR}" fetch origin
- git -C "${CONTENT_DIR}" reset --hard origin/master
+ git -C "${CONTENT_DIR}" reset --hard origin/${BRANCH}
+ git -C "${CONTENT_DIR}" clean -f -d
echo ">>>> Finished <<<<"
fi
diff --git a/git-sparse-checkout-pattern b/git-sparse-checkout-pattern
index 14731a1..a3a5956 100644
--- a/git-sparse-checkout-pattern
+++ b/git-sparse-checkout-pattern
@@ -1,4 +1,5 @@
/*
!/ref
!/redback
-!/docs
\ No newline at end of file
+!/docs
+!/components
diff --git a/pom.xml b/pom.xml
index 9a8aa34..7f6ef58 100644
--- a/pom.xml
+++ b/pom.xml
@@ -51,6 +51,8 @@
<siteRepositoryUrl>scm:git:https://gitbox.apache.org/repos/asf/archiva-web-content.git</siteRepositoryUrl>
+ <scmPublishBranch>asf-staging</scmPublishBranch>
+
</properties>
<organization>
@@ -101,7 +103,9 @@
<ignorePathToDelete>docs**</ignorePathToDelete>
<ignorePathToDelete>ref**</ignorePathToDelete>
<ignorePathToDelete>redback**</ignorePathToDelete>
+ <ignorePathsToDelete>components**</ignorePathsToDelete>
</ignorePathsToDelete>
+ <scmBranch>${scmPublishBranch}</scmBranch>
</configuration>
<executions>
<execution>
@@ -199,6 +203,8 @@
<arguments>
<argument>-d</argument>
<argument>${scmPubCheckoutDirectory}</argument>
+ <argument>-b</argument>
+ <argument>${scmPublishBranch}</argument>
<argument>${siteRepositoryUrl}</argument>
</arguments>
</configuration>
diff --git a/src/site/filtered-resources/.htaccess b/src/site/filtered-resources/.htaccess
index 527b94d..637b684 100644
--- a/src/site/filtered-resources/.htaccess
+++ b/src/site/filtered-resources/.htaccess
@@ -1,7 +1,8 @@
ErrorDocument 404 /errors/404.html
Redirect Permanent /reports http://archiva.apache.org/ref/${archivaReleaseVersion}
Redirect /download.html /download.cgi
-Redirect /index.html /index.cgi
+# We do not use index.cgi anymore
+# Redirect /index.html /index.cgi
Redirect Permanent /docs/current http://archiva.apache.org/docs/${archivaReleaseVersion}
#former docs use LICENCE.txt
-Redirect Permanent /LICENSE.txt http://archiva.apache.org/license.html
\ No newline at end of file
+Redirect Permanent /LICENSE.txt http://archiva.apache.org/license.html
diff --git a/src/site/resources/css/site.css b/src/site/resources/css/site.css
index be165db..18bc1bc 100644
--- a/src/site/resources/css/site.css
+++ b/src/site/resources/css/site.css
@@ -1,6 +1,12 @@
body {
padding-top: 1px;
}
+
+a.externalLink[href^="https"] {
+ background: url('../images/external-link-12x12.png') right center no-repeat;
+ padding-right: 18px;
+}
+
#leftColumn {
display: none !important
}
diff --git a/src/site/resources/images/external-link-12x12.png b/src/site/resources/images/external-link-12x12.png
new file mode 100644
index 0000000..8ea642e
--- /dev/null
+++ b/src/site/resources/images/external-link-12x12.png
Binary files differ
diff --git a/src/site/resources/images/external-link.png b/src/site/resources/images/external-link.png
new file mode 100644
index 0000000..bd5fbd4
--- /dev/null
+++ b/src/site/resources/images/external-link.png
Binary files differ
diff --git a/src/site/site.xml b/src/site/site.xml
index d09928d..1ecf1fc 100644
--- a/src/site/site.xml
+++ b/src/site/site.xml
@@ -90,7 +90,7 @@
<item name="Get involved" href="/get-involved.html"/>
<item name="How we do things" href="developers/how-we-do-things.html"/>
<item name="Redback" href="redback"/>
- <item name="Redback Components" href="redback/components"/>
+ <item name="Archiva Components" href="components"/>
<item name="Javascript application Architecture" href="/jsui/index.html">
<item name="Rest service" href="/jsui/rest.html"/>
<item name="JS Template loading" href="/jsui/template-loading.html"/>
@@ -109,6 +109,11 @@
<item name="Thanks" href="http://www.apache.org/foundation/thanks.html"/>
</menu>
+ <breadcrumbs>
+ <item name="Apache" href="https://www.apache.org" />
+ <item name="Archiva" href="/" />
+ </breadcrumbs>
+
<footer>
<![CDATA[
<div class="row pull-left">Apache ${project.name}, ${project.name}, Apache, the Apache feather logo, and the Apache ${project.name} project logos are trademarks of The Apache Software Foundation.</div>
diff --git a/src/site/xdoc/download.xml.vm b/src/site/xdoc/download.xml.vm
index cee5d4e..8ef04cd 100644
--- a/src/site/xdoc/download.xml.vm
+++ b/src/site/xdoc/download.xml.vm
@@ -30,7 +30,7 @@
<table>
<tr>
<td><b>JDK</b></td>
- <td>1.7 or above</td>
+ <td>1.8</td>
</tr>
<tr>
<td><b>No minimum requirement</b></td>