I'm using maven 1.1 beta 2.
I didn't have to upgrade linkcheck plugin since it was already the
latest (a part from the snapshot releases).
Here's my maven.xml file:
<project xmlns:j="jelly:core" xmlns:maven="jelly:maven"
xmlns:ant="jelly:ant" xmlns:util="jelly:util" xmlns:doc="doc"
xmlns:i = "jelly:interaction">
<goal name="usage">
<echo>SmartDocument Platform
The following goals are defined :
Compilation:
- allWar : this will generate all sub-project wars
- allClean : this will clean all sub-project
Distribution : this will generate distribution files (zip + gz)
- dist:build-plateform : generates a plateform distribution
(core + services)
- dist:build-plateform-withAppServ : generates a plateform
distribution including Tomcat server
- dist:build-plateform-withoutDoc : generates a plateform
distribution without documentation
- dist:build-demo : generates a demo distribution (demo + core +
services)
- dist:build-services : generates a services distribution
including Tomcat server
- dist:build-services-withAppServ : generates a services
distribution
- dist:build-services-withoutDoc : generates a services
distribution without documentation
- dist:build-sdk : generates a SDK distribution (native)
Documentation : this will generate project documentation
- site-services : generates documentation for SD services
- site-plateform : generates plateform documentation (SD core +
services)
- site-all : generates all projects documentation (core,
services and demo)
Release : this will generates releases and deploy them to Codex
- codex-release-site : This will generate all the web pages and
deploy them to Codex
- codex-release-services : This will generate the SD services
delivery and deploy it to Codex
- codex-release-plateform : This will generate the SD core and
services deliveries and deploy them to Codex
- codex-release-sdk : This will generate the SD sdk delivery and
deploy it to Codex
- codex-release-demo : This will generate the SD demo delivery
and deploy it to Codex
</echo>
</goal>
<!--
==========================================================================
-->
<!-- M A I N G O A L S
-->
<!--
==========================================================================
-->
<goal name="allClean" description="Clean all sub-projects">
<j:set var="maven.test.skip" value="true" />
<maven:reactor basedir="${basedir}"
includes="*/project.xml,*/*/project.xml"
excludes="smartdocument.native/project.xml" goals="clean"
banner="Cleaning..." ignoreFailures="false" />
</goal>
<goal name="allWar" description="War all sub-projects">
<j:set var="maven.test.skip" value="false" scope="parent" />
<j:switch on="true">
<j:case value="${servicesDistrib}">
<maven:reactor basedir="${basedir}"
includes="smartdocument.services/*/project.xml"
goals="war"
banner="Generating war file..." ignoreFailures="true" />
</j:case>
<j:case value="${plateformDistrib}">
<maven:reactor basedir="${basedir}"
includes="smartdocument.core/project.xml,smartdocument.services/*/project.xml"
goals="war" banner="Generating war file..."
ignoreFailures="true" />
</j:case>
<j:case value="${demoDistrib}">
<maven:reactor basedir="${basedir}"
includes="smartdocument.core/project.xml,smartdocument.demo/project.xml,smartdocument.services/*/project.xml"
goals="war" banner="Generating war file..."
ignoreFailures="true" />
</j:case>
<j:default>
<maven:reactor basedir="${basedir}"
includes="*/project.xml,*/*/project.xml"
excludes="smartdocument.services/project.xml,smartdocument.native/project.xml"
goals="war" banner="Generating war file..."
ignoreFailures="false" />
</j:default>
</j:switch>
</goal>
<goal name="dist:build-plateform-withAppServ"
description="Prepare plateform distrib containing war files and
application server">
<j:set var="maven.final.name"
value="smartdocument.plateform-${pom.currentVersion}" />
<attainGoal name="check-MAVEN_OPTS" />
<j:set var="includeAppServer" value="true" />
<j:set var="plateformDistrib" value="true" />
<attainGoal name="dist:build" />
</goal>
<goal name="dist:build-plateform-withoutDoc"
description="Prepare plateform distrib containing war files and
documentation">
<j:set var="maven.final.name"
value="smartdocument.plateform-${pom.currentVersion}" />
<j:set var="plateformDistribwithoutDoc" value="true" />
<j:set var="plateformDistrib" value="true" />
<attainGoal name="dist:build" />
</goal>
<goal name="dist:build-plateform" description="Prepare plateform
distrib">
<j:set var="maven.final.name"
value="smartdocument.plateform-${pom.currentVersion}" />
<attainGoal name="check-MAVEN_OPTS" />
<j:set var="plateformDistrib" value="true" />
<attainGoal name="dist:build" />
</goal>
<goal name="dist:build-sdk" description="Prepare sdk distrib">
<j:set var="maven.final.name"
value="smartdocument.sdk-${pom.currentVersion}" />
<attainGoal name="check-MAVEN_OPTS" />
<j:set var="sdkDistrib" value="true" />
<attainGoal name="dist:build" />
</goal>
<goal name="dist:build-demo"
description="Prepare demo distrib">
<maven:pom projectDescriptor="smartdocument.demo/project.xml"
var="pomDemo"/>
<j:set var="maven.final.name"
value="smartdocument.demo-${pomDemo.currentVersion}" />
<attainGoal name="check-MAVEN_OPTS" />
<j:set var="includeAppServer" value="true" />
<j:set var="demoDistrib" value="true" />
<attainGoal name="dist:build" />
</goal>
<goal name="dist:build-services-withAppServ"
description="Prepare distrib with all SD war services +
application server">
<maven:pom
projectDescriptor="smartdocument.services/project.xml" var="pomServices"/>
<j:set var="maven.final.name"
value="smartdocument.services-${pomServices.currentVersion}" />
<attainGoal name="check-MAVEN_OPTS" />
<j:set var="includeAppServer" value="true" />
<j:set var="servicesDistrib" value="true" />
<attainGoal name="dist:build" />
</goal>
<goal name="dist:build-services-withoutDoc"
description="Prepare distrib containing the SD war services and
no documentation">
<maven:pom
projectDescriptor="smartdocument.services/project.xml" var="pomServices"/>
<j:set var="maven.final.name"
value="smartdocument.services-${pomServices.currentVersion}" />
<j:set var="servicesDistribwithoutDoc" value="true" />
<j:set var="servicesDistrib" value="true" />
<attainGoal name="dist:build" />
</goal>
<goal name="dist:build-services"
description="Prepare distrib with all SD war services">
<maven:pom
projectDescriptor="smartdocument.services/project.xml" var="pomServices"/>
<j:set var="maven.final.name"
value="smartdocument.services-${pomServices.currentVersion}" />
<attainGoal name="check-MAVEN_OPTS" />
<j:set var="servicesDistrib" value="true" />
<attainGoal name="dist:build" />
</goal>
<goal name="site-services">
<attainGoal name="check-MAVEN_OPTS" />
<maven:pom
projectDescriptor="smartdocument.services/project.xml" var="pomServices"/>
<j:set var="maven.final.name"
value="smartdocument.services-${pomServices.currentVersion}" />
<!-- Next redondant commands are mandatory to generate the sub
sub projects documentation
with a tree like navigation style -->
<j:set var="maven.multiproject.includes"
value="smartdocument.services/project.xml" />
<!-- to skip linkcheck task. Takes too much time -->
<j:set var="maven.xdoc.skip.uptodate" value="true" />
<j:set var="goal" value="multiproject:site" />
<attainGoal name="multiproject:goal" />
<attainGoal name="multiproject:site" />
</goal>
<goal name="site-plateform">
<attainGoal name="check-MAVEN_OPTS" />
<j:set var="maven.final.name"
value="smartdocument.plateform-${pom.currentVersion}" />
<!-- Next redondant commands are mandatory to generate the sub
sub projects documentation
with a tree like navigation style -->
<j:set var="maven.multiproject.includes"
value="smartdocument.core/project.xml,smartdocument.services/project.xml" />
<!-- to skip linkcheck task. Takes too much time -->
<j:set var="maven.xdoc.skip.uptodate" value="true" />
<j:set var="goal" value="multiproject:site" />
<attainGoal name="multiproject:goal" />
<attainGoal name="multiproject:site" />
</goal>
<goal name="site-all">
<attainGoal name="check-MAVEN_OPTS" />
<j:set var="maven.final.name"
value="smartdocument.all-${pom.currentVersion}" />
<!-- Next redondant commands are mandatory to generate the sub
sub projects documentation
with a tree like navigation style -->
<j:set var="maven.multiproject.includes" value="*/project.xml" />
<j:set var="maven.multiproject.excludes"
value="smartdocument.native/project.xml" />
<!-- to skip linkcheck task. Takes too much time -->
<j:set var="maven.xdoc.skip.uptodate" value="true" />
<j:set var="goal" value="multiproject:site" />
<attainGoal name="multiproject:goal" />
<attainGoal name="multiproject:site" />
</goal>
<goal name="codex-release-site"
description="Generate and deploy web site to Codex">
<attainGoal name="allClean" />
<attainGoal name="check-MAVEN_OPTS" />
<attainGoal name="site-plateform" />
<attainGoal name="site:${maven.site.deploy.method}deploy" />
</goal>
<goal name="codex-release-services"
description="Generate and Deploy services release to codex">
<attainGoal name="dist:build-services" />
<attainGoal name="codex-deploy-services" />
</goal>
<goal name="codex-release-demo"
description="Generate and Deploy services release to codex">
<attainGoal name="dist:build-demo" />
<attainGoal name="codex-deploy-demo" />
</goal>
<goal name="codex-release-plateform"
description="Generate and Deploy plateform release to codex">
<attainGoal name="dist:build-plateform" />
<attainGoal name="codex-deploy-plateform" />
</goal>
<goal name="codex-release-sdk"
description="Generate and Deploy sdk release to codex">
<attainGoal name="dist:build-sdk" />
<attainGoal name="codex-deploy-sdk" />
</goal>
<!--
==========================================================================
-->
<!-- S E C O N D A R Y G O A L S
-->
<!--
==========================================================================
-->
<goal name="codex-deploy-services"
description="Deploy services distrib to codex">
<maven:pom
projectDescriptor="smartdocument.services/project.xml" var="pomServices"/>
<j:set var="maven.codex.project.version"
value="${pomServices.currentVersion}" />
<j:set var="maven.codex.project.groupId" value="336" />
<j:set var="maven.codex.project.packageName"
value="SmartDocument services" />
<j:set var="maven.codex.project.releaseNotes"
value="smartdocument.services/RELEASE.txt" />
<j:set var="maven.codex.project.changeLog"
value="smartdocument.services/xdocs/changes.xml" />
<attainGoal name="codex:deploy" />
</goal>
<goal name="codex-deploy-demo"
description="Deploy demo distrib to codex">
<maven:pom projectDescriptor="smartdocument.demo/project.xml"
var="pomDemo"/>
<j:set var="maven.codex.project.version"
value="${pomDemo.currentVersion}" />
<j:set var="maven.codex.project.groupId" value="336" />
<j:set var="maven.codex.project.packageName"
value="SmartDocument demo" />
<j:set var="maven.codex.project.releaseNotes"
value="smartdocument.demo/RELEASE.txt" />
<j:set var="maven.codex.project.changeLog"
value="smartdocument.demo/xdocs/changes.xml" />
<attainGoal name="codex:deploy" />
</goal>
<goal name="codex-deploy-plateform"
description="Deploy plateform distrib to codex">
<j:set var="maven.codex.project.groupId" value="336" />
<j:set var="maven.codex.project.packageName"
value="SmartDocument plateform" />
<j:set var="maven.codex.project.version"
value="${pom.currentVersion}" />
<j:set var="maven.codex.project.releaseNotes"
value="RELEASE.txt" />
<j:set var="maven.codex.project.changeLog"
value="xdocs/changes.xml" />
<attainGoal name="codex:deploy" />
</goal>
<goal name="codex-deploy-sdk"
description="Deploy services distrib to codex">
<maven:pom projectDescriptor="smartdocument.native/project.xml"
var="pomSDK"/>
<j:set var="maven.codex.project.version"
value="${pomSDK.currentVersion}" />
<j:set var="maven.codex.project.version"
value="${pom.currentVersion}" />
<j:set var="maven.codex.project.groupId" value="336" />
<j:set var="maven.codex.project.packageName"
value="SmartDocument sdk" />
<j:set var="maven.codex.project.releaseNotes"
value="smartdocument.native/RELEASE.txt" />
<j:set var="maven.codex.project.changeLog"
value="smartdocument.native/xdocs/changes.xml" />
<attainGoal name="codex:deploy" />
</goal>
<goal name="check-MAVEN_OPTS">
<!-- WOULD BE NICE TO CHECK ALSO THAT VALUE GREATER OR EQUAL TO
512m -->
<j:switch on="true">
<j:case value="${MAVEN_OPTSchecked}"></j:case>
<j:default>
<j:set var="MAVEN_OPTSchecked" value="true" />
<ant:property environment="env" />
<j:if test="${context.getVariable('env.MAVEN_OPTS') ==
null}">
<ant:fail>
Mandatory environment variable MAVEN_OPTS must
be set to at least 512m (-Xmx512m)
E.g: setenv MAVEN_OPTS -Xmx512m
</ant:fail>
</j:if>
<echo>
================================ WARNING
================================
SOME GOALS MIGHT RUN OUT OF MEMORY. TO OVERCOME THIS
PROBLEM, TRY TO INCREASE THE JAVA HEAP SIZE BY
SETTING/UPDATING THE
MAVEN_OPTS VALUE SUCH AS : setenv MAVEN_OPTS -Xmx512m
=======================================================================
</echo>
</j:default>
</j:switch>
</goal>
<goal name="misc">
<maven:pom
projectDescriptor="smartdocument.services/project.xml" var="pomDemo"/>
<echo>pomDemo: ${pomDemo.currentVersion}</echo>
<j:forEach var="dep" items="${pomDemo.getDependencies()}">
<echo>${pomDemo.getDependencyPath(dep.getId())}</echo>
</j:forEach>
</goal>
<preGoal name="dist:build-setup">
<attainGoal name="check-MAVEN_OPTS" />
<attainGoal name="clean" />
<attainGoal name="allClean" />
</preGoal>
<postGoal name="dist:prepare-bin-filesystem">
<!-- copying war files in distrib -->
<j:switch on="true">
<j:case value="${servicesDistrib}">
<!-- compiling wars -->
<attainGoal name="allWar" />
<j:switch on="true">
<j:case value="${servicesDistribwithoutDoc}">
<!-- removing docs generated by
dist:prepare-bin-filesystem-->
<delete
dir="${maven.dist.bin.assembly.dir}/docs" />
</j:case>
<j:default>
<!-- compiling docs -->
<attainGoal name="site-services" />
</j:default>
</j:switch>
<!-- copying war files in distrib -->
<maven:reactor basedir="${basedir}"
excludes="*/project.xml"
includes="smartdocument.services/*/project.xml"
postProcessing="true" collectOnly="true"
collectionVar="multiprjs"
ignoreFailures="false" />
<j:forEach var="project" items="${multiprjs}">
<echo>
Copying
${project.getContext().getVariable("maven.build.dir")}/${project.getArtifactId()}.war
to ${maven.dist.bin.assembly.dir}
</echo>
<copy
file='${project.getContext().getVariable("maven.build.dir")}/${project.getArtifactId()}.war'
tofile="${maven.dist.bin.assembly.dir}/${project.getArtifactId()}.war" />
</j:forEach>
</j:case>
<j:case value="${sdkDistrib}">
<ant:copy todir="${maven.dist.bin.assembly.dir}">
<ant:fileset dir="smartdocument.native">
</ant:fileset>
</ant:copy>
<mkdir dir="${maven.dist.bin.assembly.dir}/libs" />
<maven:reactor basedir="${basedir}"
includes="smartdocument.native/project.xml"
postProcessing="true"
collectOnly="true" collectionVar="multiprjs"
ignoreFailures="false" />
<j:forEach var="project" items="${multiprjs}">
<j:forEach var="dep"
items="${project.getDependencies()}">
<ant:copy
todir="${maven.dist.bin.assembly.dir}/libs">
<ant:fileset
file="${project.getDependencyPath(dep.getId())}">
</ant:fileset>
</ant:copy>
</j:forEach>
</j:forEach>
</j:case>
<j:case value="${demoDistrib}">
<!-- compiling wars -->
<attainGoal name="allWar" />
<!--<j:switch on="true">
<j:case value="${plateformDistribwithoutDoc}">
<delete
dir="${maven.dist.bin.assembly.dir}/docs" />
</j:case>
<j:default>
<attainGoal name="site-plateform" />
</j:default>
</j:switch>-->
<!-- copying war files in distrib -->
<maven:reactor basedir="${basedir}"
includes="smartdocument.core/project.xml,smartdocument.services/*/project.xml,smartdocument.demo/project.xml"
postProcessing="true" collectOnly="true"
collectionVar="multiprjs"
ignoreFailures="false" />
<j:forEach var="project" items="${multiprjs}">
<echo>
Copying
${project.getContext().getVariable("maven.build.dir")}/${project.getArtifactId()}.war
to ${maven.dist.bin.assembly.dir}
</echo>
<copy
file='${project.getContext().getVariable("maven.build.dir")}/${project.getArtifactId()}.war'
tofile="${maven.dist.bin.assembly.dir}/${project.getArtifactId()}.war" />
</j:forEach>
</j:case>
<j:case value="${plateformDistrib}">
<!-- compiling wars -->
<attainGoal name="allWar" />
<j:switch on="true">
<j:case value="${plateformDistribwithoutDoc}">
<!-- removing docs generated by
dist:prepare-bin-filesystem-->
<delete
dir="${maven.dist.bin.assembly.dir}/docs" />
</j:case>
<j:default>
<!-- compiling docs -->
<attainGoal name="site-plateform" />
</j:default>
</j:switch>
<!-- copying war files in distrib -->
<maven:reactor basedir="${basedir}"
includes="smartdocument.core/project.xml,smartdocument.services/*/project.xml"
postProcessing="true" collectOnly="true"
collectionVar="multiprjs"
ignoreFailures="false" />
<j:forEach var="project" items="${multiprjs}">
<echo>
Copying
${project.getContext().getVariable("maven.build.dir")}/${project.getArtifactId()}.war
to ${maven.dist.bin.assembly.dir}
</echo>
<copy
file='${project.getContext().getVariable("maven.build.dir")}/${project.getArtifactId()}.war'
tofile="${maven.dist.bin.assembly.dir}/${project.getArtifactId()}.war" />
</j:forEach>
</j:case>
<j:default>
<!-- compiling wars -->
<attainGoal name="allWar" />
<attainGoal name="site-plateform" />
<maven:reactor basedir="${basedir}"
includes="*/project.xml,*/*/project.xml"
excludes="project.xml,smartdocument.services/project.xml,smartdocument.native/project.xml"
postProcessing="true" collectOnly="true"
collectionVar="multiprjs"
ignoreFailures="false" />
<j:forEach var="project" items="${multiprjs}">
<echo>
Copying
${project.getContext().getVariable("maven.build.dir")}/${project.getArtifactId()}.war
to ${maven.dist.bin.assembly.dir}
</echo>
<copy
file='${project.getContext().getVariable("maven.build.dir")}/${project.getArtifactId()}.war'
tofile="${maven.dist.bin.assembly.dir}/${project.getArtifactId()}.war" />
</j:forEach>
</j:default>
</j:switch>
<delete
file="${maven.dist.bin.assembly.dir}/${maven.final.name}.jar" />
<!-- including application server repo if needed -->
<j:if test="${includeAppServer == 'true'}">
<echo>Integrating application server in the distribution</echo>
<echo>Unziping Tomcat dependency
${pom.getDependency('apache-tomcat:apache-tomcat')} to
${maven.dist.bin.assembly.dir}</echo>
<unzip
src="${pom.getDependencyPath('apache-tomcat:apache-tomcat')}"
dest="${maven.dist.bin.assembly.dir}/tmp"/>
<util:file var="apacheDir"
name="${maven.dist.bin.assembly.dir}/tmp"/>
<j:forEach var="unzippedDir" items="${apacheDir.listFiles()}">
<move todir="${maven.dist.bin.assembly.dir}">
<fileset dir="${unzippedDir}">
<include name="*/**" />
</fileset>
</move>
</j:forEach>
<delete dir="${maven.dist.bin.assembly.dir}/tmp" />
</j:if>
<!-- Moving war files into webapps dir -->
<move todir="${maven.dist.bin.assembly.dir}/webapps">
<fileset dir="${maven.dist.bin.assembly.dir}">
<include name="*.war" />
</fileset>
</move>
<j:if test="${demoDistrib == 'true'}">
<j:set var="maven.appserver.home_param"
value="${maven.dist.bin.assembly.dir}" scope="parent" />
<maven:reactor basedir="${basedir}"
includes="smartdocument.bpel/ActiveBpel/LoanInc/project.xml"
goals="bpel-deploy-engine,bpel-deploy"
banner="Installing and deploying bpel"
ignoreFailures="false"
/>
</j:if>
</postGoal>
<postGoal name="multiproject:site">
<util:available file="${maven.dist.bin.assembly.dir}">
<util:available
file="${maven.dist.bin.assembly.dir}/docs">
<delete dir="${maven.dist.bin.assembly.dir}/docs" />
</util:available>
<util:available file="${maven.build.dir}/docs">
<!-- gathering javadocs to top level -->
<!-- apidocs generated but not inserted into generated
docs ... -->
<mkdir dir="${maven.dist.bin.assembly.dir}/docs" />
<ant:copy todir="${maven.dist.bin.assembly.dir}/docs">
<ant:fileset dir="${maven.build.dir}/docs" />
</ant:copy>
</util:available>
</util:available>
</postGoal>
<goal name="dist:build-src" />
<goal name="dist:deploy-src" />
</project>
Arnaud HERITIER a écrit :
I was sure ;-)
I need to review the code
Did you try to upgrade the plugin to see if it helps ?
You are using maven 1.0.2 or 1.1 beta 2 ?
What is the release of the linkcheck plugin (maven -i)
Arnaud
On 2/24/06, Michael Niemaz <[EMAIL PROTECTED]> wrote:
I see although when I set this property, it takes 12 minutes to complete
instead of 30 and the generated site looks ok.
Plus i don't see all the verbose linkcheck output in the console.
Are you sure of what you are stating?
--mike
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]