Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

Setting up a Jasig project to publish a Maven site.

  1. Make sure the project is using the latest jasig-parent pom
  2. Add the following profiles to the project's POM
    <!-- 
     | 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}/resource-server/${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}/resource-server/${project.version}</url>
            </site>
        </distributionManagement>
    </profile>
    
  3. 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
      <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>
      
      <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
      <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>
      
  • No labels