Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Project

...

Configuration

...

Setting

...

up

...

a

...

Jasig

...

project

...

to

...

publish

...

a

...

Maven

...

site.

...

  1. Make

...

  1. sure

...

  1. the

...

  1. project

...

  1. is

...

  1. using

...

  1. the

...

  1. latest

...

  1. jasig-parent

...

  1. pom
  2. Add the following profiles to the project's

...

  1. POM.

...

  1. Changing

...

  1. the

...

  1. PROJECT_NAME

...

  1. path

...

  1. element

...

  1. to

...

  1. the

...

  1. artifactId

...

  1. of

...

  1. the

...

  1. project.

...

  1. Code Block
    xml
    xml
    
    <!-- 
     | Used by the continuous integrations server to deploy the project site.
     +-->
    <profile>
        <id>ci-local-site</id>
        <distributionManagement>
            <site>
                <id>ci-local-site</id>
                <url>${jasig-site-ci-dist-base}/PROJECT_NAME/${project.version}</url>
            </site>
        </distributionManagement>
    </profile>
    <!-- 
     | Should be activated manually by a developer that wishes to deploy a maven site for
     | the project
     +-->
    <profile>
        <id>manual-site</id>
        <distributionManagement>
            <site>
                <id>developer.jasig</id>
                <url>${jasig-site-dist-base}/PROJECT_NAME/${project.version}</url>
            </site>
        </distributionManagement>
    </profile>
    

...

  1. Change the top level <url> element to:
    Code Block
    xml
    xml
    <url>${jasig-site-base}/PROJECT_NAME/${project.version}</url>

...

  1. If the project needs to add additional reports or customize reporting plugin use the following examples. Note the defaultMergePolicy, combine.children, merge:children, and merge:removeDuplicates elements are key to making the override work
    • Adding memory and additional links to the javadoc plugin
      Code Block
      xml
      xml
      
      <plugin>
          <groupId>org.jasig.maven</groupId>
          <artifactId>maven-site-plugin</artifactId>
          <configuration>
              <defaultMergePolicy>MERGE</defaultMergePolicy>
              <reportPlugins combine.children="append">
                  <plugin>
                      <artifactId>maven-javadoc-plugin</artifactId>
                      <version>2.8</version>
                      <configuration>
                          <links merge:children="BOTH" merge:removeDuplicates="true">
                              <link>http://static.springsource.org/spring/docs/3.0.x/api/</link>
                              <link>http://ehcache.org/apidocs/</link>
                              <link>http://aopalliance.sourceforge.net/doc/</link>
                              <link>http://java.sun.com/javase/6/docs/api/</link>
                              <link>http://java.sun.com/javaee/5/docs/api/</link>
                          </links>
                          <maxmemory>768m</maxmemory>
                      </configuration>
                  </plugin>
              </reportPlugins>
          </configuration>
      </plugin>
      

...

    • Code Block
      xml
      xml
      
      <plugin>
          <groupId>org.jasig.maven</groupId>
          <artifactId>maven-site-plugin</artifactId>
          <configuration>
              <defaultMergePolicy>MERGE</defaultMergePolicy>
              <reportPlugins combine.children="append">
                  <plugin>
                      <artifactId>maven-javadoc-plugin</artifactId>
                      <version>2.8</version>
                      <configuration>
                          <links merge:children="BOTH" merge:removeDuplicates="true">
                              <link>http://static.springsource.org/spring/docs/3.0.x/api/</link>
                              <link>http://ehcache.org/apidocs/</link>
                              <link>http://aopalliance.sourceforge.net/doc/</link>
                              <link>http://java.sun.com/javase/6/docs/api/</link>
                              <link>http://java.sun.com/javaee/5/docs/api/</link>
                          </links>
                          <maxmemory>768m</maxmemory>
                      </configuration>
                  </plugin>
              </reportPlugins>
          </configuration>
      </plugin>
      

...

    • Adding the maven-plugin-plugin

...

    • report

...

    • Code Block
      xml
      xml
      
      <plugin>
          <groupId>org.jasig.maven</groupId>
          <artifactId>maven-site-plugin</artifactId>
          <configuration>
              <defaultMergePolicy>MERGE</defaultMergePolicy>
              <reportPlugins combine.children="append">
                  <plugin>
                      <artifactId>maven-plugin-plugin</artifactId>
                      <version>2.9</version>
                  </plugin>
              </reportPlugins>
          </configuration>
      </plugin>
      

...

Staging the Site

Before deploying the site you should run the following command to test the site generation:

No Format
mvn clean install site:site site:stage -Pmanual-site
{noformat}

h2. Deploying the Site
To deploy the site run:
{noformat}

Deploying the Site

To deploy the site run:

No Format
mvn clean install site:site site:stage -Pmanual-site
{noformat}

If

...

deploying

...

the

...

site

...

after

...

cutting

...

a

...

release

...

run:

...

}
No Format
cd target/checkout
mvn site:site site:stage -Pmanual-site
{noformat}