You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@turbine.apache.org by jv...@apache.org on 2002/03/08 20:36:18 UTC

cvs commit: jakarta-turbine-maven/src/descriptors convert-project.dvsl

jvanzyl     02/03/08 11:36:18

  Modified:    src/descriptors convert-project.dvsl
  Log:
  First stage in separating each declared project in the gump descriptors
  into a separate project descriptor that is completely functional on
  its own.
  
  All I want from the gump descriptors now is the description, cvs info,
  and the package. I will determine the direct dependencies by
  analysis and dependency resolver will determine the indirect
  dependencies.
  
  Revision  Changes    Path
  1.3       +14 -53    jakarta-turbine-maven/src/descriptors/convert-project.dvsl
  
  Index: convert-project.dvsl
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-maven/src/descriptors/convert-project.dvsl,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- convert-project.dvsl	24 Feb 2002 21:37:43 -0000	1.2
  +++ convert-project.dvsl	8 Mar 2002 19:36:18 -0000	1.3
  @@ -1,61 +1,22 @@
   #match("module")
  +#set ($cvs = $context.node.cvs.attribute("repository"))
  +#set ($parentDescription = $context.node.description)
  +#set ($parentUrl = $context.node.url.attribute("href"))
  +$context.applyTemplates("project")
  +#end
  +
  +#match ("project")
  +#set ($description = $context.node.description)
  +#set ($url = $context.node.url.attribute("href"))
   <project>
  -  #set ($project = $context.node.attribute("name"))
     <name>$context.node.attribute("name")</name>
     <description>
  -  $context.node.description
  -  </description>
  -$context.applyTemplates("url")
  -$context.applyTemplates("cvs")
  -  <dependencies>
  -$context.applyTemplates("//depend")
  -$context.applyTemplates("//option")
  -  </dependencies>
  -  
  -  <build>
  -  <jars>
  -$context.applyTemplates("//jar")
  -  </jars>  
  +    #if($description)$description.toString().trim()#else$parentDescription.toString().trim()#end
     
  -  </build>
  +  </description>
  +  <package>$!context.node.package</package>
  +  <url>#if($url)$url#else$parentUrl#end</url>
  +  <cvs>$!cvs</cvs>
   </project>
  -#end
  -
  -#match("jar")
  -    <jar>
  -      <name>$attrib.name</name>
  -    </jar>
  -#end
  -
  -#match("ant")$!attrib.target#end
  -
  -#match("url")
  -  <url>$attrib.href</url>
  -#end
  -
  -#match("cvs")
  -  <repository id="$attrib.repository"/>
  -#end
  -
  -#match("depend")
  -    #if (!$context.toolbox.deptool.depExists($project,$attrib.project))
  -    $context.toolbox.deptool.addDep($project,$attrib.project)
  -    <dependency>
  -      <name>$attrib.project</name>
  -      <type>required</type>
  -      <version>$!attrib.version</version>
  -    </dependency>
  -    #end
  -#end
   
  -#match("option")
  -        
  -    #if (!$context.toolbox.deptool.depExists($project,$attrib.project))
  -    $context.toolbox.deptool.addDep($project,$attrib.project)
  -    <dependency>
  -      <name>$attrib.project</name>
  -      <type>optional</type>
  -      <version>$!attrib.version</version>
  -    </dependency>
  -    #end
   #end
  
  
  

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>