You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by br...@apache.org on 2004/12/10 14:15:16 UTC
cvs commit: maven-plugins/gump/src/plugin-resources module.jelly project.jelly
brett 2004/12/10 05:15:16
Modified: gump/src/plugin-resources module.jelly project.jelly
Log:
hand roll the pretty printing so we can preserve correct formatting
Revision Changes Path
1.2 +11 -17 maven-plugins/gump/src/plugin-resources/module.jelly
Index: module.jelly
===================================================================
RCS file: /home/cvs/maven-plugins/gump/src/plugin-resources/module.jelly,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- module.jelly 10 Dec 2004 12:18:15 -0000 1.1
+++ module.jelly 10 Dec 2004 13:15:15 -0000 1.2
@@ -18,33 +18,27 @@
-->
<j:file name="${maven.gump.descriptor}"
- prettyPrint="true"
+ escapeText="false"
xmlns:j="jelly:core"
xmlns:x="jelly:xml"
xmlns="dummy">
<!-- This should probably be pom.groupId, except I think module may need to be unique in gump space -->
-<module name="${pom.artifactId}">
-<j:whitespace><x:comment>
+<!-- Note the nasty CDATA stuff: required to ensure proper handling by gump on empty tags -->
+<j:whitespace>
+<x:comment>
- This descriptor was automatically generated using Maven.
- To regenerate, run: "maven ${goal}"
-
- If you have a requirement that leads to hand editing, please consider filing
- a feature request at ${plugin.issueTrackingUrl}
-</x:comment></j:whitespace>
+</x:comment>
+<module name="${pom.artifactId}">
<description>${pom.shortDescription}</description>
- <url href="${pom.url}"/>
- <j:choose>
- <j:when test="${scmTokens[1] == 'cvs'}">
- <cvs repository="${pom.gumpRepositoryId}" module="${moduleName}" />
- </j:when>
- <j:when test="${scmTokens[1] == 'svn'}">
- <svn repository="${pom.gumpRepositoryId}" dir="${moduleName}" />
- </j:when>
- <!-- this field has already been validated to ensure there isn't something missing here -->
- </j:choose>
- <j:forEach var="project" items="${reactorProjects}">
- <j:import file="${plugin.resources}/project.jelly" inherit="true" />
- </j:forEach>
+ <![CDATA[<url href="${pom.url}"/>]]>
+
+ <j:choose><j:when test="${scmTokens[1] == 'cvs'}"><![CDATA[<cvs repository="${pom.gumpRepositoryId}" module="${moduleName}" />]]></j:when><j:when test="${scmTokens[1] == 'svn'}"><![CDATA[<svn repository="${pom.gumpRepositoryId}" dir="${moduleName}" />]]></j:when></j:choose><j:forEach var="project" items="${reactorProjects}">
+ <j:import file="${plugin.resources}/project.jelly" inherit="true" /></j:forEach>
</module>
+</j:whitespace>
</j:file>
1.2 +28 -39 maven-plugins/gump/src/plugin-resources/project.jelly
Index: project.jelly
===================================================================
RCS file: /home/cvs/maven-plugins/gump/src/plugin-resources/project.jelly,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- project.jelly 10 Dec 2004 12:18:15 -0000 1.1
+++ project.jelly 10 Dec 2004 13:15:15 -0000 1.2
@@ -17,52 +17,41 @@
*/
-->
-<!-- Note: all variables must be relative to the project, or from the project context -->
-<j:whitespace
+<j:jelly
xmlns:j="jelly:core"
xmlns:maven="jelly:maven"
xmlns:u="jelly:util"
xmlns:license="license"
xmlns="dummy">
-<project name="${project.artifactId}">
- <maven:makeRelativePath basedir="${basedir}" var="homeDir" separator="/" path="${project.file.parent}" />
- <j:if test="${genAnt}">
- <ant buildfile="build.xml" target="${maven.gump.ant.target}">
- <property name="final.name" value="${project.artifactId}-@@DATE@@"/>
- </ant>
- </j:if>
- <j:if test="${genMaven}">
- <maven goal="${maven.gump.maven.goals}" basedir="${homeDir}">
- <property name="maven.final.name" value="${project.artifactId}-@@DATE@@"/>
- </maven>
- </j:if>
-
- <j:forEach var="dep" items="${project.dependencies}">
- <j:set var="projectId" value="${dep.artifactId}"/>
- <j:if test="${dep.getProperty('gump.project') != null}">
- <j:set var="projectId" value="${dep.getProperty('gump.project')}"/>
- </j:if>
- <depend project="${projectId}" />
- </j:forEach>
-
- <home nested="${homeDir}" />
+<!-- Note: all variables must be relative to the project, or from the project context -->
+<maven:makeRelativePath basedir="${basedir}" var="homeDir" separator="/" path="${project.file.parent}" />
+<maven:makeRelativePath basedir="${project.file.parent}" var="mavenBuildDir" separator="/" path="${project.context.getVariable('maven.build.dir')}" />
+<maven:makeRelativePath basedir="${basedir}" var="mavenDocsDest" separator="/" path="${project.context.getVariable('maven.docs.dest')}" />
+<!-- As the test reports is a plugin property, we can't reliably get it from the project context. Forced to assume the default -->
+<maven:get var="testReportsDirectory" plugin="maven-test-plugin" property="maven.test.reportsDirectory" />
+<maven:makeRelativePath basedir="${basedir}" var="mavenTestReportsDest" separator="/" path="${testReportsDirectory}" />
- <maven:makeRelativePath basedir="${project.file.parent}" var="mavenBuildDir" separator="/" path="${project.context.getVariable('maven.build.dir')}" />
- <jar name="${mavenBuildDir}/${project.artifactId}-@@DATE@@.jar" />
-
- <maven:makeRelativePath basedir="${basedir}" var="mavenDocsDest" separator="/" path="${project.context.getVariable('maven.docs.dest')}" />
- <javadoc nested="${mavenDocsDest}/apidocs" />
+<j:whitespace>
+ <project name="${project.artifactId}">
+ <j:if test="${genAnt}"><ant buildfile="build.xml" target="${maven.gump.ant.target}">
+ <![CDATA[<property name="final.name" value="${project.artifactId}-@@DATE@@"/>]]>
+ </ant></j:if><j:if test="${genMaven}"><maven goal="${maven.gump.maven.goals}" basedir="${homeDir}">
+ <![CDATA[<property name="maven.final.name" value="${project.artifactId}-@@DATE@@"/>]]>
+ </maven></j:if>
- <!-- As the test reports is a plugin property, we can't reliably get it from the project context.
- Forced to assume the default -->
- <maven:get var="testReportsDirectory" plugin="maven-test-plugin" property="maven.test.reportsDirectory" />
- <maven:makeRelativePath basedir="${basedir}" var="mavenTestReportsDest" separator="/" path="${testReportsDirectory}" />
- <junitreport nested="${homeDir}/${mavenTestReportsDest}" />
-
- <nag from="${project.artifactId} development <${project.build.nagEmailAddress}>"
- to="${project.build.nagEmailAddress}"/>
+ <j:forEach var="dep" items="${project.dependencies}"><j:set var="projectId" value="${dep.artifactId}"/><j:if test="${dep.getProperty('gump.project') != null}"><j:set var="projectId" value="${dep.getProperty('gump.project')}"/></j:if><![CDATA[<depend project="${projectId}" />]]>
+ </j:forEach><![CDATA[
+ <home nested="${homeDir}" />
+
+ <jar name="${mavenBuildDir}/${project.artifactId}-@@DATE@@.jar" />
+
+ <javadoc nested="${mavenDocsDest}/apidocs" />
+
+ <junitreport nested="${homeDir}/${mavenTestReportsDest}" />
-</project>
-</j:whitespace>
+ <nag from="${project.artifactId} development <${project.build.nagEmailAddress}>"
+ to="${project.build.nagEmailAddress}"/>]]>
+ </project></j:whitespace>
+</j:jelly>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org