michal 2003/07/27 14:48:41 Modified: src/plugins-build/multiproject/src/plugin-resources/templates navigation-aggregate.xml navigation-independent.xml src/plugins-build/multiproject plugin.jelly plugin.properties Added: src/plugins-build/multiproject/src/plugin-resources/templates projects-overview.xml Log: Added generation of "Projects Overview". Goals multiproject:create-nav and multiproject:create-overview-page are independed but still reactor usage should be rationalized as at the moment for generating web site 3 passes of reactor are needed. Revision Changes Path 1.3 +3 -0 maven/src/plugins-build/multiproject/src/plugin-resources/templates/navigation-aggregate.xml Index: navigation-aggregate.xml =================================================================== RCS file: /home/cvs/maven/src/plugins-build/multiproject/src/plugin-resources/templates/navigation-aggregate.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- navigation-aggregate.xml 21 Jul 2003 01:13:52 -0000 1.2 +++ navigation-aggregate.xml 27 Jul 2003 21:48:41 -0000 1.3 @@ -6,6 +6,9 @@ <body> <menu name="Projects"> + #if ($createOverviewPage == "true" ) + <item name="Overview" href="projects-overview.xml"/> + #end #foreach ($reactorProject in $reactorProjects) <item name="$reactorProject.name" href="/${aggregateDir}${reactorProject.artifactId}/index.html"/> #end 1.2 +3 -0 maven/src/plugins-build/multiproject/src/plugin-resources/templates/navigation-independent.xml Index: navigation-independent.xml =================================================================== RCS file: /home/cvs/maven/src/plugins-build/multiproject/src/plugin-resources/templates/navigation-independent.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- navigation-independent.xml 4 Jul 2003 04:42:27 -0000 1.1 +++ navigation-independent.xml 27 Jul 2003 21:48:41 -0000 1.2 @@ -6,6 +6,9 @@ <body> <menu name="Projects"> + #if ($createOverviewPage == "true" ) + <item name="Overview" href="projects-overview.xml"/> + #end #foreach ($reactorProject in $reactorProjects) <item name="$reactorProject.name" href="${reactorProject.url}"/> #end 1.1 maven/src/plugins-build/multiproject/src/plugin-resources/templates/projects-overview.xml Index: projects-overview.xml =================================================================== <?xml version="1.0"?> <document> <properties> <title>Overview of projects</title> <author email="[EMAIL PROTECTED]">Michal Maczka</author> </properties> <body> #foreach ($reactorProject in $reactorProjects) <section name="$reactorProject.name"> <p> ${reactorProject.description} </p> </section> #end </body> </document> 1.20 +42 -1 maven/src/plugins-build/multiproject/plugin.jelly Index: plugin.jelly =================================================================== RCS file: /home/cvs/maven/src/plugins-build/multiproject/plugin.jelly,v retrieving revision 1.19 retrieving revision 1.20 diff -u -r1.19 -r1.20 --- plugin.jelly 26 Jul 2003 22:09:31 -0000 1.19 +++ plugin.jelly 27 Jul 2003 21:48:41 -0000 1.20 @@ -29,6 +29,7 @@ description="Run the site goal of all subprojects"> <attainGoal name="multiproject:create-nav"/> + <attainGoal name="multiproject:create-overview-page"/> <!-- FIXME: This can't use multiproject:goal as it throws away the projects --> <!-- generate site docs --> @@ -94,11 +95,12 @@ <!-- generate navbar for project based on aggregate or independent --> <j:set var="aggregateDir" value="${maven.multiproject.aggregateDir}"/> <j:set var="navType" value="${maven.multiproject.navigation}"/> + <j:set var="createOverviewPage" value="${maven.multiproject.overviewPage}"/> <j:if test="${navType != ''}"> <echo>Producing ${navType} navigation...</echo> <velocity:merge name="${maven.gen.docs}/navigation.xml" - basedir="${plugin.resources}/templates" + basedir="${maven.multiproject.templates}" template="navigation-${navType}.xml"/> </j:if> @@ -116,8 +118,47 @@ basedir="${maven.docs.src}" template="navigation.xml"/> </j:if> + + </goal> + + <!--==================================================================--> + <!-- Generate Overview of all projects --> + <!--==================================================================--> + <goal name="multiproject:create-overview-page"> + + <mkdir dir="${maven.gen.docs}"/> + + <j:set var="createOverviewPage" value="${maven.multiproject.overviewPage}"/> + <j:if test="${createOverviewPage=='true'}"> + + <!-- FIXME: 2) Needs to be a tag + | get all projects for template processing + | --> + <maven:reactor + basedir="${maven.multiproject.basedir}" + banner="Getting projects for creating an overview page" + includes="${maven.multiproject.includes}" + excludes="${maven.multiproject.excludes}" + postProcessing="true" + ignoreFailures="true" + /> + + <ant:echo>Using tamplate:${maven.multiproject.templates}/projects-overview.xml</ant:echo> + <velocity:merge + name="${maven.gen.docs}/projects-overview.xml" + basedir="${maven.multiproject.templates}" + template="projects-overview.xml"/> + </j:if> + + </goal> + + + + + + <!--==================================================================--> <!-- Run specific sets of goals for all subprojects --> 1.6 +4 -0 maven/src/plugins-build/multiproject/plugin.properties Index: plugin.properties =================================================================== RCS file: /home/cvs/maven/src/plugins-build/multiproject/plugin.properties,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- plugin.properties 21 Jul 2003 01:13:52 -0000 1.5 +++ plugin.properties 27 Jul 2003 21:48:41 -0000 1.6 @@ -7,6 +7,7 @@ maven.multiproject.includes=**/project.xml maven.multiproject.excludes= maven.multiproject.ignoreFailures=false +maven.multiproject.templates=${plugin.resources}/templates # Decide whether to aggregate all project generated web sites in one # place or to provide external links to each project's web site. @@ -17,3 +18,6 @@ # directory under target/docs where aggregated sites are copied to maven.multiproject.aggregateDir=multiproject/ + +#should overview page be created? +maven.multiproject.overviewPage=true
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]