cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nicola...@apache.org
Subject svn commit: r188763 - /cocoon/trunk/tools/src/classpath-build.xsl
Date Tue, 07 Jun 2005 13:03:25 GMT
Author: nicolaken
Date: Tue Jun  7 06:03:25 2005
New Revision: 188763

URL: http://svn.apache.org/viewcvs?rev=188763&view=rev
Log:
  Crude stylesheet to generate a buildfile that creates a 
  classpath from gump.xml and the maven artifact task.

  To use, transform the gump.xml filewith this stylesheet, 
  install the Maven Artifact Ant task in your Ant lib 
  dir, and run the generated file.

  Currently it fails halfway.

Added:
    cocoon/trunk/tools/src/classpath-build.xsl   (with props)

Added: cocoon/trunk/tools/src/classpath-build.xsl
URL: http://svn.apache.org/viewcvs/cocoon/trunk/tools/src/classpath-build.xsl?rev=188763&view=auto
==============================================================================
--- cocoon/trunk/tools/src/classpath-build.xsl (added)
+++ cocoon/trunk/tools/src/classpath-build.xsl Tue Jun  7 06:03:25 2005
@@ -0,0 +1,87 @@
+<?xml version="1.0"?>
+
+<!--
+  Copyright 1999-2004 The Apache Software Foundation
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<!--
+  To use, transform the gump.xml filewith this stylesheet, install the 
+  Maven Artifact Ant task in your Ant lib dir, and run the generated file.
+-->
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+ 
+  <xsl:output method="xml" indent="yes"/>
+
+  <xsl:template match="/"><xsl:apply-templates select="module"/></xsl:template>
+
+  <xsl:template match="module">
+    <project name="ccocoon-classpath" 
+             xmlns:artifact="antlib:org.apache.maven.artifact.ant" 
+             default="classpath">
+          
+       <description>Autogenerated Ant build file that creates the classpath.</description>
+	   <target name="classpath">
+         <artifact:dependencies pathId="dependency.classpath">
+	        <xsl:for-each select="project">
+               <xsl:for-each select="depend | dependx">
+               
+	               <xsl:choose>
+	               
+	               	<xsl:when test="@locallib">
+	               	 <xsl:comment>
+	               	   <xsl:value-of select="@locallib" />
+	               	 </xsl:comment>
+	               	</xsl:when>
+	               	
+	               	<xsl:when test="@groupId and @artifactId and @version">
+	                   <dependency groupId="{@groupId}" 
+	                               artifactId="{@artifactId}" 
+	                               version="{@version}"/>
+	               	</xsl:when>
+               	
+	               	<xsl:otherwise>
+	               	 <xsl:comment>Skipping <xsl:value-of select="@project" />
+	               	 </xsl:comment>
+	               	</xsl:otherwise>
+	               	
+	               </xsl:choose>
+
+	           </xsl:for-each>
+	       </xsl:for-each>
+         </artifact:dependencies>
+         
+         
+       <path id="local.classpath">
+	        <xsl:for-each select="project">
+               <xsl:for-each select="depend | dependx">
+	              <xsl:if test="@locallib">
+	              	 <path location="lib/{@locallib}"/>
+                  </xsl:if>
+	           </xsl:for-each>
+	       </xsl:for-each>
+       </path>
+    
+    
+        <path id="classpath">
+          <path refid="dependency.classpath"/>
+          <path refid="local.classpath"/>
+        </path>
+
+         
+	   </target>
+	 </project>
+  </xsl:template>
+
+
+</xsl:stylesheet>

Propchange: cocoon/trunk/tools/src/classpath-build.xsl
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message