mcconnell 2004/04/14 15:18:56 Modified: merlin/kernel/plugin maven.xml merlin maven.xml merlin/platform/tutorials/dynamics index.ent project.xml merlin/platform/tutorials/lifecycle/activation project.xml merlin/platform/tutorials/lifecycle/excalibur project.xml merlin/platform/tutorials/main project.xml merlin/platform/tutorials maven.xml Added: merlin/platform/tutorials/dynamics copy-all.xsl merlin/platform/tutorials/lifecycle/activation copy-all.xsl merlin/platform/tutorials/main copy-all.xsl merlin/platform/tutorials/context/strategy copy-all.xsl merlin/platform/tutorials/jmx copy-all.xsl merlin/platform/tutorials/parameterization copy-all.xsl Log: Update to generate a clean tutorials distribution free of entity references. Revision Changes Path 1.8 +0 -2 avalon/merlin/kernel/plugin/maven.xml Index: maven.xml =================================================================== RCS file: /home/cvs/avalon/merlin/kernel/plugin/maven.xml,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- maven.xml 12 Apr 2004 16:01:57 -0000 1.7 +++ maven.xml 14 Apr 2004 22:18:55 -0000 1.8 @@ -10,7 +10,6 @@ </preGoal> <goal name="avalon:generate"> - <echo message="starting"/> <mkdir dir="${maven.build.dir}/classes"/> <ant:xslt in="${basedir}/project.xml" out="${maven.build.dir}/classes/project.xml" style="${basedir}/copy-all.xsl"> @@ -18,7 +17,6 @@ <outputproperty name="standalone" value="yes"/> <outputproperty name="indent" value="yes"/> </ant:xslt> - <echo message="done"/> </goal> </project> 1.66 +47 -33 avalon/merlin/maven.xml Index: maven.xml =================================================================== RCS file: /home/cvs/avalon/merlin/maven.xml,v retrieving revision 1.65 retrieving revision 1.66 diff -u -r1.65 -r1.66 --- maven.xml 11 Apr 2004 13:41:24 -0000 1.65 +++ maven.xml 14 Apr 2004 22:18:55 -0000 1.66 @@ -476,34 +476,6 @@ <!-- ============================================================================== - replicate the tutorial sources to the distribution directory - ============================================================================== - --> - - <goal name="avalon:tutorials"> - <ant:mkdir dir="${basedir}/target/tutorials"/> - <ant:copy todir="${basedir}/target/tutorials"> - <fileset dir="${basedir}/platform/tutorials"> - <include name="README.TXT"/> - <include name="project.xml"/> - <include name="maven.xml"/> - <include name="hello/**"/> - <include name="configuration/**"/> - <include name="context/**"/> - <include name="composition/**"/> - <include name="dependencies/**"/> - <include name="lifecycle/**"/> - <include name="meta/**"/> - <include name="profiles/**"/> - <include name="selection/**"/> - <exclude name="**/target/**"/> - <exclude name="**/*.log"/> - </fileset> - </ant:copy> - </goal> - - <!-- - ============================================================================== build the consolidated javadoc ============================================================================== --> @@ -583,19 +555,61 @@ <!-- ============================================================================== - veriify the the tutorials are buildable + veriify the the tutorials are buildable and generate a clean build defintion + (note: the xgen target is defined in the platform/tutorials/maven.xml file) ============================================================================== --> + <goal name="avalon:tutorials" prereqs="avalon:validate"> + <ant:copy todir="${basedir}/target/tutorials"> + <fileset dir="${basedir}/platform/tutorials"> + <include name="**/README.TXT"/> + <include name="project.xml"/> + <include name="maven.xml"/> + </fileset> + </ant:copy> + </goal> + <goal name="avalon:validate" - description="Validate that the tutorial targets are buildable." > + description="Generate a clean tutorial package." > + <j:set var="xyz" value="abc"/> + <maven:reactor + basedir="${basedir}" + includes="platform/tutorials/**/project.xml" + excludes="platform/tutorials/project.xml,**/target/**,platform/tutorials/mixed/**,platform/tutorials/jmx/**,platform/tutorials/security/**" + goals="xgen" + banner="Generation:" + ignoreFailures="false" + postProcessing="true" /> + + <!-- + copy the generated target/package directory to the + local target/tutorials directory + --> + + <j:set var="tutorialsDir" value="${basedir}/platform/tutorials"/> + <j:set var="tutorialsLen" value="${tutorialsDir.length()}"/> + <j:forEach var="child" items="${reactorProjects}"> + <j:set var="pkgPath" value="${child.file.parentFile.path}"/> + <j:set var="pkgLen" value="${pkgPath.length()}"/> + <j:set var="packageName" value="${pkgPath.substring( tutorialsLen )}"/> + <ant:copy toDir="${basedir}/target/tutorials${packageName}"> + <fileset dir="${child.file.parentFile}/target/package"/> + </ant:copy> + </j:forEach> + + </goal> + + <goal name="avalon:generate" + description="Generate a clean tutorial package." > + <j:set var="xyz" value="abc"/> <maven:reactor basedir="${basedir}" includes="platform/tutorials/**/project.xml" excludes="platform/tutorials/project.xml,**/target/**" - goals="jar:install" - banner="Validate:" - ignoreFailures="false" /> + banner="Transfer:" + postProcessing="true" /> + </goal> <!-- 1.3 +1 -0 avalon/merlin/platform/tutorials/dynamics/index.ent Index: index.ent =================================================================== RCS file: /home/cvs/avalon/merlin/platform/tutorials/dynamics/index.ent,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- index.ent 8 Apr 2004 11:58:32 -0000 1.2 +++ index.ent 14 Apr 2004 22:18:55 -0000 1.3 @@ -1 +1,2 @@ <!ENTITY % merlin-entities SYSTEM "file:../../../../versioning/avalon-merlin.ent"> %merlin-entities; +<!ENTITY % meta-entities SYSTEM "file:../../../../versioning/avalon-meta.ent"> %meta-entities; 1.5 +3 -3 avalon/merlin/platform/tutorials/dynamics/project.xml Index: project.xml =================================================================== RCS file: /home/cvs/avalon/merlin/platform/tutorials/dynamics/project.xml,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- project.xml 5 Apr 2004 15:00:05 -0000 1.4 +++ project.xml 14 Apr 2004 22:18:55 -0000 1.5 @@ -32,9 +32,9 @@ <version>&avalon-composition-api-version;</version> </dependency> <dependency> - <groupId>avalon-meta</groupId> - <artifactId>avalon-meta-api</artifactId> - <version>1.4-SNAPSHOT</version> + <groupId>&avalon-meta-id;</groupId> + <artifactId>&avalon-meta-api-id;</artifactId> + <version>&avalon-meta-api-version;</version> </dependency> </dependencies> 1.1 avalon/merlin/platform/tutorials/dynamics/copy-all.xsl Index: copy-all.xsl =================================================================== <?xml version="1.0"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml"> <xsl:template match="@*|*|text()|processing-instruction()" priority="-1"> <xsl:copy> <xsl:apply-templates select="@*|*|text()|processing-instruction()"/> </xsl:copy> </xsl:template> </xsl:stylesheet> 1.10 +3 -3 avalon/merlin/platform/tutorials/lifecycle/activation/project.xml Index: project.xml =================================================================== RCS file: /home/cvs/avalon/merlin/platform/tutorials/lifecycle/activation/project.xml,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- project.xml 5 Apr 2004 15:00:05 -0000 1.9 +++ project.xml 14 Apr 2004 22:18:56 -0000 1.10 @@ -32,9 +32,9 @@ <version>&avalon-composition-api-version;</version> </dependency> <dependency> - <groupId>avalon-meta</groupId> - <artifactId>avalon-meta-api</artifactId> - <version>1.4-SNAPSHOT</version> + <groupId>&avalon-meta-id;</groupId> + <artifactId>&avalon-meta-api-id;</artifactId> + <version>&avalon-meta-api-version;</version> </dependency> </dependencies> 1.1 avalon/merlin/platform/tutorials/lifecycle/activation/copy-all.xsl Index: copy-all.xsl =================================================================== <?xml version="1.0"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml"> <xsl:template match="@*|*|text()|processing-instruction()" priority="-1"> <xsl:copy> <xsl:apply-templates select="@*|*|text()|processing-instruction()"/> </xsl:copy> </xsl:template> </xsl:stylesheet> 1.2 +1 -1 avalon/merlin/platform/tutorials/lifecycle/excalibur/project.xml Index: project.xml =================================================================== RCS file: /home/cvs/avalon/merlin/platform/tutorials/lifecycle/excalibur/project.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- project.xml 24 Sep 2003 09:34:03 -0000 1.1 +++ project.xml 14 Apr 2004 22:18:56 -0000 1.2 @@ -26,7 +26,7 @@ <dependency> <groupId>excalibur-lifecycle</groupId> <artifactId>excalibur-lifecycle-api</artifactId> - <version>1.0</version> + <version>1.1</version> </dependency> </dependencies> 1.2 +6 -3 avalon/merlin/platform/tutorials/main/project.xml Index: project.xml =================================================================== RCS file: /home/cvs/avalon/merlin/platform/tutorials/main/project.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- project.xml 4 Mar 2004 07:28:19 -0000 1.1 +++ project.xml 14 Apr 2004 22:18:56 -0000 1.2 @@ -1,4 +1,7 @@ <?xml version="1.0" encoding="ISO-8859-1"?> +<!DOCTYPE project [ + <!ENTITY % index SYSTEM "file:index.ent"> %index; +]> <project> @@ -20,9 +23,9 @@ <dependencies> <dependency> - <groupId>avalon-repository</groupId> - <artifactId>avalon-repository-main</artifactId> - <version>2.0-SNAPSHOT</version> + <groupId>&avalon-repository-id;</groupId> + <artifactId>&avalon-repository-main-id;</artifactId> + <version>&avalon-repository-main-version;</version> </dependency> </dependencies> 1.1 avalon/merlin/platform/tutorials/main/copy-all.xsl Index: copy-all.xsl =================================================================== <?xml version="1.0"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml"> <xsl:template match="@*|*|text()|processing-instruction()" priority="-1"> <xsl:copy> <xsl:apply-templates select="@*|*|text()|processing-instruction()"/> </xsl:copy> </xsl:template> </xsl:stylesheet> 1.2 +28 -3 avalon/merlin/platform/tutorials/maven.xml Index: maven.xml =================================================================== RCS file: /home/cvs/avalon/merlin/platform/tutorials/maven.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- maven.xml 24 Sep 2003 09:33:40 -0000 1.1 +++ maven.xml 14 Apr 2004 22:18:56 -0000 1.2 @@ -1,10 +1,10 @@ -<project default="jar:jar" xmlns:maven="jelly:maven" xmlns:j="jelly:core" xmlns:util="jelly:util"> +<project default="jar:jar" xmlns:maven="jelly:maven" xmlns:j="jelly:core" xmlns:util="jelly:util" xmlns:ant="jelly:ant"> <preGoal name="java:compile"> <attainGoal name="avalon:meta"/> </preGoal> - <goal name="demo"> + <goal name="demo" prereqs="jar:install"> <j:set var="demo.target" value="${maven.build.dir}/classes/BLOCK-INF/block.xml"/> <util:file var="target" name="${demo.target}"/> <j:if test="${target.exists()}"> @@ -12,4 +12,29 @@ </j:if> </goal> -</project> \ No newline at end of file + <!-- utility goal used by the merlin distribution stuff --> + <goal name="xgen" prereqs="jar:install"> + <ant:mkdir dir="${maven.build.dir}/package"/> + <ant:copy toDir="${maven.build.dir}/package"> + <fileset dir="${pom.file.parentFile}"> + <exclude name="target/**"/> + <exclude name="*.log"/> + <exclude name=".*"/> + <exclude name="*.ent"/> + <exclude name="*.xsl"/> + </fileset> + </ant:copy> + <util:file var="xslFile" name="${basedir}/copy-all.xsl"/> + <j:if test="${xslFile.exists()}"> + <ant:delete file="${maven.build.dir}/package/project.xml"/> + <ant:xslt in="${pom.file}" + out="${maven.build.dir}/package/project.xml" + style="${xslFile}"> + <outputproperty name="method" value="xml" /> + <outputproperty name="standalone" value="yes"/> + <outputproperty name="indent" value="yes"/> + </ant:xslt> + </j:if> + </goal> + +</project> 1.1 avalon/merlin/platform/tutorials/context/strategy/copy-all.xsl Index: copy-all.xsl =================================================================== <?xml version="1.0"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml"> <xsl:template match="@*|*|text()|processing-instruction()" priority="-1"> <xsl:copy> <xsl:apply-templates select="@*|*|text()|processing-instruction()"/> </xsl:copy> </xsl:template> </xsl:stylesheet> 1.1 avalon/merlin/platform/tutorials/jmx/copy-all.xsl Index: copy-all.xsl =================================================================== <?xml version="1.0"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml"> <xsl:template match="@*|*|text()|processing-instruction()" priority="-1"> <xsl:copy> <xsl:apply-templates select="@*|*|text()|processing-instruction()"/> </xsl:copy> </xsl:template> </xsl:stylesheet> 1.1 avalon/merlin/platform/tutorials/parameterization/copy-all.xsl Index: copy-all.xsl =================================================================== <?xml version="1.0"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml"> <xsl:template match="@*|*|text()|processing-instruction()" priority="-1"> <xsl:copy> <xsl:apply-templates select="@*|*|text()|processing-instruction()"/> </xsl:copy> </xsl:template> </xsl:stylesheet>
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]