Changing to https urls and adding docu.
This commit is contained in:
parent
91c147513f
commit
bac9034488
|
@ -0,0 +1,81 @@
|
|||
Archiva Redback - 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
|
||||
|
||||
/redback/core
|
||||
|
||||
=== 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.
|
||||
|
||||
|
28
addstage.sh
28
addstage.sh
|
@ -1,28 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
MP="$1"
|
||||
PL=$(echo "$MP" | sed -e 's#/# #g' -e 's/^\.//g')
|
||||
|
||||
echo "$PL"
|
||||
STR="project"
|
||||
|
||||
if [ -f "${MP}/pom.xml" ]; then
|
||||
for DIR in $PL; do
|
||||
STR="${STR}.parent"
|
||||
done
|
||||
else
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo "$MP $PL"
|
||||
grep -q '<properties>' $MP/pom.xml
|
||||
if [ $? -eq 0 ]; then
|
||||
sed -i -e 's#<properties>#<properties>\n <site.staging.base>${'${STR}'.basedir}</site.staging.base>#g' $MP/pom.xml
|
||||
else
|
||||
grep -q '<packaging>' $MP/pom.xml
|
||||
if [ $? -eq 0 ]; then
|
||||
sed -i -e 's#\(.*</packaging>.*\)#\1\n <properties>\n <site.staging.base>${'${STR}'.basedir}</site.staging.base>\n </properties>#g' $MP/pom.xml
|
||||
else
|
||||
sed -i -e 's#\(.*</name>.*\)#\1\n <properties>\n <site.staging.base>${'${STR}'.basedir}</site.staging.base>\n </properties>#g' $MP/pom.xml
|
||||
fi
|
||||
fi
|
|
@ -1 +1,60 @@
|
|||
mvn clean site site:stage scm-publish:publish-scm $@
|
||||
#!/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"
|
||||
|
||||
SUB_DIR="redback/core"
|
||||
|
||||
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
|
||||
|
||||
|
|
56
pom.xml
56
pom.xml
|
@ -17,7 +17,8 @@
|
|||
~ specific language governing permissions and limitations
|
||||
~ under the License.
|
||||
-->
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<parent>
|
||||
|
@ -680,6 +681,13 @@
|
|||
<artifactId>openjpa-maven-plugin</artifactId>
|
||||
<version>${openjpa.version}</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-site-plugin</artifactId>
|
||||
<configuration>
|
||||
<skipDeploy>true</skipDeploy>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
<plugins>
|
||||
|
@ -711,7 +719,7 @@
|
|||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-site-plugin</artifactId>
|
||||
<inherited>false</inherited>
|
||||
<inherited>true</inherited>
|
||||
<configuration>
|
||||
<skipDeploy>true</skipDeploy>
|
||||
<stagingDirectory>${site.staging.base}/target/staging/redback/core/</stagingDirectory>
|
||||
|
@ -981,6 +989,50 @@
|
|||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
|
||||
<!--
|
||||
This runs a sparse git checkout for the web site content repository that contains only the doc directory.
|
||||
The profile is activated only, if the checkout directory does not exist.
|
||||
The executor runs a shell script.
|
||||
-->
|
||||
<profile>
|
||||
<id>site-checkout</id>
|
||||
<activation>
|
||||
|
||||
<file>
|
||||
<missing>${scmPubCheckoutDirectory}</missing>
|
||||
</file>
|
||||
</activation>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>exec-maven-plugin</artifactId>
|
||||
<version>1.6.0</version>
|
||||
<inherited>false</inherited>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>prepare-checkout</id>
|
||||
<phase>pre-site</phase>
|
||||
<goals>
|
||||
<goal>exec</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<executable>checkoutSite.sh</executable>
|
||||
<workingDirectory>${project.basedir}</workingDirectory>
|
||||
<arguments>
|
||||
<argument>-d</argument>
|
||||
<argument>${scmPubCheckoutDirectory}</argument>
|
||||
<argument>${siteRepositoryUrl}</argument>
|
||||
</arguments>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
|
||||
</profiles>
|
||||
|
||||
</project>
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
<sideBarEnabled>false</sideBarEnabled>
|
||||
<skipGenerationDate>true</skipGenerationDate>
|
||||
<googleSearch>
|
||||
<sitesearch>http://archiva.apache.org/redback</sitesearch>
|
||||
<sitesearch>https://archiva.apache.org/redback</sitesearch>
|
||||
</googleSearch>
|
||||
<twitter>
|
||||
<user>archiva</user>
|
||||
|
@ -38,16 +38,26 @@
|
|||
</twitter>
|
||||
<ohloh>
|
||||
<projectId>8659</projectId>
|
||||
<widget>stats</widget>
|
||||
<widget>thin-badge</widget>
|
||||
</ohloh>
|
||||
<gitHub>
|
||||
<projectId>apache/archiva-redback-core</projectId>
|
||||
<ribbonOrientation>right</ribbonOrientation>
|
||||
<ribbonColor>black</ribbonColor>
|
||||
</gitHub>
|
||||
</fluidoSkin>
|
||||
|
||||
</custom>
|
||||
|
||||
<publishDate format="yyyy-MM-dd" position="left" />
|
||||
<version position="left" />
|
||||
<publishDate format="yyyy-MM-dd" position="right" />
|
||||
<version position="right" />
|
||||
|
||||
<body>
|
||||
<breadcrumbs>
|
||||
<item name="Apache" href="https://www.apache.org" />
|
||||
<item name="Archiva" href="https://archiva.apache.org" />
|
||||
<item name="Redback" href="index.html" />
|
||||
</breadcrumbs>
|
||||
|
||||
<menu ref="reports" />
|
||||
<menu ref="modules" />
|
||||
|
|
Loading…
Reference in New Issue