Permalink
Browse files

* Added in SCM publish for GitHub pages

  • Loading branch information...
1 parent beef710 commit 182cea8991eb33851c12ed587912dfe6646a8513 @mike-ensor committed Jan 22, 2013
Showing with 189 additions and 20 deletions.
  1. +93 −20 pom.xml
  2. +52 −0 src/site/site.xml
  3. +44 −0 src/site/xdoc/index.xml.vm
View
113 pom.xml
@@ -45,10 +45,9 @@
<name>Nexus Snapshot Repository</name>
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
</snapshotRepository>
- <!--<site>-->
<site>
<id>site-docs</id>
- <url>${site.url}/${project.artifactId}</url>
+ <url>file://${site-docs.url}/${project.artifactId}</url>
</site>
</distributionManagement>
@@ -81,32 +80,61 @@
</developers>
<properties>
- <site.url>file://${env.HOME}/sitedocs/${project.artifactId}</site.url>
+
+ <!-- ======================== -->
+ <!-- SITE DOC PROPERTIES -->
+ <!-- ======================== -->
+
+ <!-- @OVERRIDE - Expected to be a "FILE" URI, project.artifactId will be appended automatically -->
+ <site-docs.url>/${env.HOME}/sitedocs/${project.artifactId}</site-docs.url>
+ <!-- Best practice is to override this property in your settings.xml file -->
+ <site-docs.siteMainDirectory>${project.build.outputDirectory}/scmpublish</site-docs.siteMainDirectory>
+ <!-- @OVERRIDE this property per each project -->
<repository.domain>github.com</repository.domain>
+ <!-- @OVERRIDE this property per each project -->
<repository.user>mike-ensor</repository.user>
+ <!-- @OVERRIDE this property per each project -->
<repository.name>clickconcepts-master-pom</repository.name>
+ <!-- @OVERRIDE as needed -->
+ <scm-publish.scmBranch>gh-pages</scm-publish.scmBranch>
+ <!-- @OVERRIDE as needed -->
+ <scm-publish.pubScmUrl>scm:git:git@github.com:mike-ensor/clickconcepts-master-pom.git</scm-publish.pubScmUrl>
+ <site-docs.siteMainDirectory>${project.reporting.outputDirectory}</site-docs.siteMainDirectory>
+
+ <!-- ======================== -->
+ <!-- PROJECT PROPERTIES -->
+ <!-- ======================== -->
+
<!-- encoding of project resources -->
<maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.7</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
+ <surefire.jvm.args>-Xms256m -Xmx512m -XX:MaxPermSize=512m</surefire.jvm.args>
- <cobertura.version>1.9.2</cobertura.version>
+ <!-- ==================================== -->
+ <!-- PROJECT DEPENDENCIES PROPERTIES -->
+ <!-- ==================================== -->
+ <cobertura.version>1.9.4.1</cobertura.version>
- <!-- Plugin versions -->
+ <!-- ======================== -->
+ <!-- PLUGIN PROPERTIES -->
+ <!-- ======================== -->
+ <plugin.ant.version>1.7</plugin.ant.version>
<plugin.assembly.version>2.4</plugin.assembly.version>
<plugin.checkstyle.version>2.9.1</plugin.checkstyle.version>
<plugin.clean.version>2.5</plugin.clean.version>
<plugin.changelog.version>2.2</plugin.changelog.version>
+ <plugin.changes.version>2.8</plugin.changes.version>
<plugin.cobertura.version>2.5.2</plugin.cobertura.version>
<plugin.codenarc.version>0.18-1</plugin.codenarc.version>
<plugin.compiler.version>3.0</plugin.compiler.version>
<plugin.dependency.version>2.6</plugin.dependency.version>
<plugin.deploy.version>2.7</plugin.deploy.version>
<plugin.eclipse.version>2.9</plugin.eclipse.version>
<plugin.enforcer.version>1.2</plugin.enforcer.version>
- <plugin.failsafe.version>2.12.4</plugin.failsafe.version>
+ <plugin.failsafe.version>2.13</plugin.failsafe.version>
<plugin.findbugs.version>2.5.2</plugin.findbugs.version>
<plugin.gpg.version>1.4</plugin.gpg.version>
<plugin.install.version>2.4</plugin.install.version>
@@ -118,44 +146,59 @@
<plugin.project-info-reports.version>2.6</plugin.project-info-reports.version>
<plugin.release.version>2.4</plugin.release.version>
<plugin.resources.version>2.6</plugin.resources.version>
+ <plugin.scm-publish.version>1.0-beta-2</plugin.scm-publish.version>
<plugin.site.version>3.2</plugin.site.version>
<plugin.source.version>2.2.1</plugin.source.version>
<plugin.surefire.version>2.13</plugin.surefire.version>
<plugin.taglist.version>2.4</plugin.taglist.version>
<plugin.wagon-ssh.version>2.2</plugin.wagon-ssh.version>
<plugin.wagon-webdav.version>1.0</plugin.wagon-webdav.version>
- <plugin.versions.version>1.3.1</plugin.versions.version>
+ <plugin.versions.version>2.0</plugin.versions.version>
+ <!-- ============================= -->
+ <!-- CODE ANALYSIS PROPERTIES -->
+ <!-- ============================= -->
+ <!-- @OVERRIDE as needed -->
<maven-checkstyle-plugin.configLocation>${project.basedir}/code-analysis/checkstyle.xml</maven-checkstyle-plugin.configLocation>
+ <!-- @OVERRIDE as needed -->
<maven-pmd-plugin.configLocation>${project.basedir}/code-analysis/pmd.xml</maven-pmd-plugin.configLocation>
- <surefire.jvm.args>-Xms256m -Xmx512m -XX:MaxPermSize=512m</surefire.jvm.args>
+ <!-- @OVERRIDE as needed -->
+ <cobertura.base.package>com.clickconcepts</cobertura.base.package>
+ <!-- Needed for Code Narc only -->
+ <groovy.version>2.0.6</groovy.version>
+
+ <!-- ========================== -->
+ <!-- CHANGE LOG PROPERTIES -->
+ <!-- ========================== -->
<!-- GITHUB Changelog Parameters -->
<changelog.github.fileUri>${project.scm.url}/tree/master/%FILE%</changelog.github.fileUri>
<changelog.revision.github.fileUri>${project.scm.url}/commit</changelog.revision.github.fileUri>
-
<!-- BitBucket Changelog Parameters -->
<changelog.bitbucket.fileUri>${project.scm.url}/src/%REV%/%FILE%?at=master</changelog.bitbucket.fileUri>
<changelog.revision.bitbucket.fileUri>${project.scm.url}/commits/%REV%</changelog.revision.bitbucket.fileUri>
-
<!-- NOTE: Choose the changelog File Uri for your project. By default, this will fail if not setup -->
+ <!-- example: <changelog.fileUri>${changelog.bitbucket.fileUri}</changelog.fileUri> -->
+ <!-- ENFORCER will fail if these are not defined -->
<changelog.fileUri/>
<changelog.revision.fileUri/>
- <cobertura.base.package>com.clickconcepts</cobertura.base.package>
- <!-- Needed for Code Narc only -->
- <groovy.version>2.0.6</groovy.version>
-
+ <!-- ============================= -->
+ <!-- PLUGIN STATUS PROPERTIES -->
+ <!-- ============================= -->
+ <!-- @OVERRIDE as needed -->
<checkstyle.skip>false</checkstyle.skip>
- <cobertura.skip>false</cobertura.skip>
- <!-- Codenarc turned off by default -->
+ <cobertura.skip>true</cobertura.skip>
+ <!-- Cobertura is not active by default, look for project>cobertura plugin for more details -->
<codenarc.skip>true</codenarc.skip>
+ <!-- Codenarc turned off by default -->
+ <enforcer.skip>false</enforcer.skip>
<findbugs.skip>false</findbugs.skip>
<javadocs.skip>false</javadocs.skip>
<pmd.skip>false</pmd.skip>
<versions.skip>false</versions.skip>
+ <!-- skip to avoid long runs against maven central for dependency and plugin versions -->
- <plugin.changes.version>2.8</plugin.changes.version>
</properties>
<issueManagement>
@@ -180,6 +223,24 @@
</extensions>
<pluginManagement>
<plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <version>${plugin.ant.version}</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-scm-publish-plugin</artifactId>
+ <version>${plugin.scm-publish.version}</version>
+ <inherited>true</inherited>
+ <configuration>
+ <content>${project.reporting.outputDirectory}</content>
+ <checkoutDirectory>${site-docs.siteMainDirectory}</checkoutDirectory>
+ <checkinComment>Publishing Site Docs for ${project.artifactId}:${project.version}</checkinComment>
+ <scmBranch>${scm-publish.scmBranch}</scmBranch>
+ <pubScmUrl>${scm-publish.pubScmUrl}</pubScmUrl>
+ </configuration>
+ </plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>taglist-maven-plugin</artifactId>
@@ -268,6 +329,9 @@
<artifactId>maven-enforcer-plugin</artifactId>
<version>${plugin.enforcer.version}</version>
<inherited>true</inherited>
+ <configuration>
+ <skip>${enforcer.skip}</skip>
+ </configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
@@ -478,6 +542,7 @@
<version>${plugin.site.version}</version>
<inherited>true</inherited>
<configuration>
+ <stagingDirectory>${site-docs.url}</stagingDirectory>
<attach>true</attach>
<reportPlugins>
<plugin>
@@ -744,10 +809,10 @@
<regexMessage>Please set the property [changelog.revision.fileUri] to BitBucket (changelog.revision.bitbucket.fileUri), GitHub (changelog.revision.github.fileUri) or Other (make your own)</regexMessage>
</requireProperty>
<requireProperty>
- <property>site.url</property>
+ <property>site-docs.url</property>
<regex>.*\w.*</regex>
<!-- Intention is to show off the enforcer plugin make sure that there is a specific property set -->
- <message>Required site.url parameter missing</message>
+ <message>Required site-docs.url parameter missing</message>
</requireProperty>
<requireProperty>
<property>repository.domain</property>
@@ -798,12 +863,20 @@
<groupId>net.sourceforge.cobertura</groupId>
<artifactId>cobertura-runtime</artifactId>
<version>${cobertura.version}</version>
- <scope>provided</scope>
+ <optional>true</optional>
<type>pom</type>
</dependency>
</dependencies>
<profiles>
+ <profile>
+ <id>install</id>
+ <properties>
+ <changelog.fileUri>${changelog.bitbucket.fileUri}</changelog.fileUri>
+ <changelog.revision.fileUri>${changelog.revision.bitbucket.fileUri}</changelog.revision.fileUri>
+ <enforcer.skip>true</enforcer.skip>
+ </properties>
+ </profile>
<profile>
<id>release-sign-artifacts</id>
<!-- Settings file must define a proflie called "gpg" that has the value for the password needed below -->
View
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/DECORATION/1.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/DECORATION/1.0.0 http://maven.apache.org/xsd/decoration-1.0.0.xsd"
+ name="${project.artifactId}">
+ <skin>
+ <groupId>org.apache.maven.skins</groupId>
+ <artifactId>maven-fluido-skin</artifactId>
+ <version>1.3.0</version>
+ </skin>
+
+ <poweredBy>
+ <logo name="Click Concepts" href="http://www.ensor.cc" img="http://www.acquitygroup.com/App_Themes/AcquityCorporate/images/logo.gif"/>
+ </poweredBy>
+
+ <custom>
+ <fluidoSkin>
+ <topBarEnabled>true</topBarEnabled>
+ <topBarIcon>
+ <name>Click Concepts</name>
+ <alt>Click Concepts Homepage</alt>
+ <src>http://www.acquitygroup.com/App_Themes/AcquityCorporate/images/logo.gif</src>
+ <href>http://www.ensor.cc</href>
+ </topBarIcon>
+ <sourceLineNumbersEnabled>true</sourceLineNumbersEnabled>
+ <twitter>
+ <user>mikeensor</user>
+ <showUser>true</showUser>
+ <showFollowers>true</showFollowers>
+ </twitter>
+
+ </fluidoSkin>
+ </custom>
+
+ <publishDate format="dd MMM yyyy"/>
+
+ <version position="right"/>
+
+ <body>
+
+ <links>
+ <item name="Mike Ensor's Blog" href="http://www.ensor.cc/"/>
+ <item name="Github Homepage" href="http://www.github.com/mike-ensor"/>
+ </links>
+
+ <menu name="Documentation">
+ <item name="Home" href="/index.html"/>
+ </menu>
+ <menu name="Modules" ref="modules"/>
+ <menu name="Reports" ref="reports"/>
+ </body>
+</project>
View
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<document xmlns="http://maven.apache.org/XDOC/2.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 http://maven.apache.org/xsd/xdoc-2.0.xsd">
+
+ <properties>
+ <title>Parent POM for projects</title>
+ <author email="mike@clickconcepts.com">Mike!</author>
+ </properties>
+
+ <!-- Optional HEAD element, which is copied as is into the XHTML <head> element -->
+ <head>
+ <title>${title}</title>
+ <meta content="Documentation site for Parent POM" name="description"/>
+ </head>
+
+ <body>
+
+ <!-- The body of the document contains a number of sections -->
+ <section name="section 1">
+
+ <h1>Master/Parent POM for Click Concepts</h1>
+ <p>This is a paragraph inside of section 1</p>
+ <!-- in addition to XHTML, any number of subsections can be within a section -->
+ <subsection name="Plugins">
+ <p>Plugins and versions are all up-to-date and are listed in the Parent POM</p>
+ <h3>Code Quality Plugins</h3>
+ <ul>
+ <li>PMD/CPD</li>
+ <li>Checkstyle</li>
+ <li>CodeNarc</li>
+ <li>FindBugs</li>
+ </ul>
+ </subsection>
+ </section>
+
+ <section name="other section">
+ <p>This is how you run site documentation</p>
+ <source>
+ mvn clean verify site:run
+ </source>
+ </section>
+ </body>
+</document>

0 comments on commit 182cea8

Please sign in to comment.