afaik subprojects inherit from parent maven.xml. this allow to factorize some pre or postgoal. In your case, as you dont want the postgoal to be inherited perhaps you could try to replace <postGoal name="site"/> by <postGoal name="multiproject:site"/> or _eventually_ smtg like that :
<postGoal name="site">
<j:if test="${pom.artifactId != 'masterAritfactId'}">
<attainGoal name="hivedoc"/>
</j:if>
</postGoal>-- gd
Howard M. Lewis Ship wrote:
Looks like it does to me.
My top-level maven.xml includes:
<postGoal name="site"> <attainGoal name="hivedoc"/> </postGoal>
<goal name="hivedoc" description="Create HiveDoc from the installed HiveMind JARs."> <!-- Some kind of voodoo magic I picked up from the docbook plugin. --> <echo>Building Hivedoc ...</echo> <taskdef name="constructRegistry" classname="org.apache.commons.hivemind.ant.ConstructRegistry"> <classpath id="hivemind.jars.classpath"> <fileset dir="${maven.repo.local}"> <include name="commons-hivemind/jars/*-${pom.currentVersion}.jar"/> </fileset> </classpath> </taskdef> <constructRegistry output="target/registry.xml"> <descriptors refid="hivemind.jars.classpath"/> </constructRegistry> <mkdir dir="target/docs/hivedocs"/> <j:set var="output.dir" value="target/docs/hivedocs"/> <mkdir dir="${output.dir}"/> <java fork="true" classname="com.icl.saxon.StyleSheet"> <arg line="-o ${output.dir}/index.html"/> <arg line="target/registry.xml"/> <arg line="src/xsl/hivemind.xsl"/> <arg line="base.dir=${output.dir}"/> <classpath> <pathelement location="${pom.getDependencyPath('saxon')}"/> </classpath> </java> <copy todir="${output.dir}" file="src/xsl/hivemind.css"/>
</goal>
But what I'm seeing is that in my subproject, the hivedoc rule is being executed as well.
C:\workspace\hivemind>maven multiproject:site __ __ | \/ |__ _Apache__ ___ | |\/| / _` \ V / -_) ' \ ~ intelligent projects ~ |_| |_\__,_|\_/\___|_||_| v. 1.0-rc1-SNAPSHOT
Starting the reactor... Our processing order: HiveMind Framework HiveMind Library +---------------------------------------- | Gathering project list HiveMind Framework | Memory: 3M/11M +---------------------------------------- +---------------------------------------- | Gathering project list HiveMind Library | Memory: 3M/11M +---------------------------------------- multiproject:site: multiproject:site-init:
multiproject:create-nav: [echo] Producing aggregate navigation... [echo] Producing user supplied navigation... Starting the reactor... Our processing order: HiveMind Framework HiveMind Library +---------------------------------------- | Gathering project list HiveMind Framework | Memory: 7M/11M +---------------------------------------- +---------------------------------------- | Gathering project list HiveMind Library | Memory: 7M/11M +----------------------------------------
multiproject:site-init:
multiproject:create-overview-page: [echo] C:\workspace\hivemind\target\generated-xdocs C:\workspace\hivemind\target\generated-xdocs [echo] create true Starting the reactor... Our processing order: HiveMind Framework HiveMind Library +---------------------------------------- | Generating site for HiveMind Framework | Memory: 8M/11M +----------------------------------------
site: xdoc:register-reports: maven-javadoc-plugin:register:
maven-jxr-plugin:register:
maven-junit-report-plugin:register:
maven-clover-plugin:register:
site:run-reports: [echo] Generating the JavaDocs... xdoc:init:
maven-javadoc-plugin:report: [javadoc] Generating Javadoc [javadoc] Javadoc execution [javadoc] Loading source file C:\workspace\hivemind\framework\src\java\org\apache\commons\hivemind\ant\ConstructRegistry.java... [javadoc] Loading source file C:\workspace\hivemind\framework\src\java\org\apache\commons\hivemind\ant\ManifestClassPath.java...
. . .
[clover-report] Writing report to 'C:\workspace\hivemind\framework\target\docs\clover' [clover-report] Merged results from 58 coverage recordings. [clover-report] Done. Processed 11 packages.
xdoc:init:
xdoc:register-reports: maven-javadoc-plugin:register:
maven-jxr-plugin:register:
maven-junit-report-plugin:register:
maven-clover-plugin:register:
xdoc:generate-from-pom: [echo] Generating xdocs from POM ...
xdoc:transform: xdoc:init:
xdoc:copy-resources: [copy] Copying 5 files to C:\workspace\hivemind\framework\target\docs\style [copy] Copying 89 files to C:\workspace\hivemind\framework\target\docs\images About to use JSL stylesheet file:/C:/Documents and Settings/Howard/.maven/plugins/maven-xdoc-plugin-1.4-SNAPSHOT/plugin-resources/site.jsl
xdoc:init:
xdoc:copy-user-resources:
xdoc:init:
xdoc:jelly-init:
xdoc:register-reports: maven-javadoc-plugin:register:
maven-jxr-plugin:register:
maven-junit-report-plugin:register:
maven-clover-plugin:register:
xdoc:jelly-transform: [echo] Generating C:/workspace/hivemind/framework/target/docs/cvs-usage.html from C:\workspace\hivemind\framework\target\generated-xdocs\cvs-usage.xml [echo] Generating C:/workspace/hivemind/framework/target/docs/dependencies.html from C:\workspace\hivemind\framework\target\generated-xdocs\dependencies.xml [echo] Generating C:/workspace/hivemind/framework/target/docs/index.html from C:\workspace\hivemind\framework\target\generated-xdocs\index.xml [echo] Generating C:/workspace/hivemind/framework/target/docs/issue-tracking.html from C:\workspace\hivemind\framework\target\generated-xdocs\issue-tracking.xml [echo] Generating C:/workspace/hivemind/framework/target/docs/javadoc.html from C:\workspace\hivemind\framework\target\generated-xdocs\javadoc.xml [echo] Generating C:/workspace/hivemind/framework/target/docs/junit-report.html from C:\workspace\hivemind\framework\target\generated-xdocs\junit-report.xml [echo] Generating C:/workspace/hivemind/framework/target/docs/mail-lists.html from C:\workspace\hivemind\framework\target\generated-xdocs\mail-lists.xml [echo] Generating C:/workspace/hivemind/framework/target/docs/maven-reports.html from C:\workspace\hivemind\framework\target\generated-xdocs\maven-reports.xml [echo] Generating C:/workspace/hivemind/framework/target/docs/project-info.html from C:\workspace\hivemind\framework\target\generated-xdocs\project-info.xml [echo] Generating C:/workspace/hivemind/framework/target/docs/team-list.html from C:\workspace\hivemind\framework\target\generated-xdocs\team-list.xml Transforming user supplied documentation. [echo] Generating C:/workspace/hivemind/framework/target/docs/ant/ConstructRegistry.html from C:\workspace\hivemind\framework\xdocs\ant\ConstructRegistry.xml [echo] Generating C:/workspace/hivemind/framework/target/docs/ant/index.html from C:\workspace\hivemind\framework\xdocs\ant\index.xml [echo] Generating C:/workspace/hivemind/framework/target/docs/ant/ManifestClassPath.html from C:\workspace\hivemind\framework\xdocs\ant\ManifestClassPath.xml [echo] Generating C:/workspace/hivemind/framework/target/docs/ApplicationDefaults.html from C:\workspace\hivemind\framework\xdocs\ApplicationDefaults.xml [echo] Generating C:/workspace/hivemind/framework/target/docs/BuilderFactory.html from C:\workspace\hivemind\framework\xdocs\BuilderFactory.xml [echo] Generating C:/workspace/hivemind/framework/target/docs/ClassFactory.html from C:\workspace\hivemind\framework\xdocs\ClassFactory.xml [echo] Generating C:/workspace/hivemind/framework/target/docs/FactoryDefaults.html from C:\workspace\hivemind\framework\xdocs\FactoryDefaults.xml [echo] Generating C:/workspace/hivemind/framework/target/docs/LoggingInterceptor.html from C:\workspace\hivemind\framework\xdocs\LoggingInterceptor.xml [echo] Generating C:/workspace/hivemind/framework/target/docs/SymbolSource.html from C:\workspace\hivemind\framework\xdocs\SymbolSource.xml [echo] Generating C:/workspace/hivemind/framework/target/docs/ThreadEventNotifier.html from C:\workspace\hivemind\framework\xdocs\ThreadEventNotifier.xml [echo] Generating C:/workspace/hivemind/framework/target/docs/ThreadLocalStorage.html from C:\workspace\hivemind\framework\xdocs\ThreadLocalStorage.xml
xdoc:
hivedoc: [echo] Building Hivedoc ... [java] Stylesheet file src\xsl\hivemind.xsl does not exist [java] [ERROR] Java Result: 2
BUILD FAILED File...... file:/C:/Documents and Settings/Howard/.maven/plugins/maven-multiproject-plugin-1.1-SNAPSHOT/ Element... maven:reactor Line...... 69 Column.... 7 Unable to obtain goal [site] -- file:/C:/workspace/hivemind/framework/:59:60: <copy> Warning: Could not find file C:\workspace\hivemind\framework\src\xsl\hivemind.css to copy.
Total time: 1 minutes 55 seconds Finished at: Thu Oct 09 15:50:15 EDT 2003
C:\workspace\hivemind>
Is this expected / desired action? Is there a way I can defeat this, so that the rule only affects my top-level project?
I'm going to try empty <goal name="hivedoc"/> in my subprojects.
-- Howard M. Lewis Ship Creator, Tapestry: Java Web Components http://jakarta.apache.org/tapestry http://jakarta.apache.org/commons/sandbox/hivemind/ http://javatapestry.blogspot.com
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
