diff options
author | Martin Stockhammer <martin_s@apache.org> | 2018-11-04 13:33:23 +0100 |
---|---|---|
committer | Martin Stockhammer <martin_s@apache.org> | 2018-11-04 13:33:23 +0100 |
commit | d29ac49e8068689b5f8458f7886167d9e8fa179c (patch) | |
tree | 583a9c7ca659dbdd6c359861b1ff925a9c4d5eab /archiva-docs/pom.xml | |
parent | d8b6d1ce007971e3a3674fd4ce423ae5855881ec (diff) | |
download | archiva-d29ac49e8068689b5f8458f7886167d9e8fa179c.tar.gz archiva-d29ac49e8068689b5f8458f7886167d9e8fa179c.zip |
Adding git site build changes for archiva-docs
Diffstat (limited to 'archiva-docs/pom.xml')
-rw-r--r-- | archiva-docs/pom.xml | 66 |
1 files changed, 64 insertions, 2 deletions
diff --git a/archiva-docs/pom.xml b/archiva-docs/pom.xml index 59d935ba2..f7d70cf1b 100644 --- a/archiva-docs/pom.xml +++ b/archiva-docs/pom.xml @@ -34,6 +34,8 @@ <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> </properties> <build> @@ -55,10 +57,25 @@ </pluginManagement> <plugins> <plugin> + <!-- + SCM Publish plugin. + We deactivated the deletion, because the patterns for ignorePathsToDelete does only use the file/directory names + not the relative paths. + Site plugin is deploying into the subdirectory docs/${project.version} the publish plugin is copying from + target directly. + --> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-scm-publish-plugin</artifactId> <configuration> - <checkinComment>Apache Archiva Versionned docs for ${project.version}</checkinComment> + <checkinComment>Apache Archiva Versioned docs for ${project.version}</checkinComment> + <skipDeletedFiles>true</skipDeletedFiles> + <content>${project.build.directory}/staging</content> + <tryUpdate>true</tryUpdate> +<!-- + <ignorePathsToDelete> + <path>%regex[^(?!docs/).*$]</path> + </ignorePathsToDelete> +--> </configuration> <executions> <execution> @@ -75,6 +92,7 @@ <artifactId>maven-site-plugin</artifactId> <configuration> <skipDeploy>true</skipDeploy> + <stagingDirectory>${project.build.directory}/staging/docs/${project.version}/</stagingDirectory> </configuration> <executions> <execution> @@ -155,8 +173,52 @@ <distributionManagement> <site> <id>apache.website</id> - <url>scm:svn:https://svn.apache.org/repos/asf/archiva/site-content/docs/${project.version}</url> + <url>${siteRepositoryUrl}</url> </site> </distributionManagement> + <profiles> + <!-- + 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> + <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> |