o applying patches for

MAVEN-1045
  MAVEN-1046


git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@114403 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
jvanzyl committed 2003-11-25 15:56:18 +00:00
1 parent 1cd9808b41
commit 2aa6f27db6
1 file changed
+30 -15
+30 -15
View File
@@ -15,24 +15,28 @@
|
-->
<define:tag name="generate">
<!-- Get the template -->
<!-- create a temporary variable with no dots in the name to get around a jexl bug -->
<j:set var="presettemplate" value="${template}"/>
<j:if test="${empty(presettemplate)}">
<i:ask question="${maven.genapp.prompt.template}" answer="template" default="${maven.genapp.default.template}"/>
</j:if>
<!-- If template is in the user's home directory, use it -->
<u:available file="${user.home}/.maven/template/${template}">
<j:set var="maven.genapp.template.dir" value="${user.home}/.maven/template/${template}"/>
</u:available>
<!-- If a template directory is provided directly, then use it (and don't ask)! -->
<j:set var="currenttemplatedir" value="${maven.genapp.template.dir}"/>
<j:if test="${empty(currenttemplatedir)}">
<!-- The template was not found in user.home, check in the plugin resources -->
<u:available file="${plugin.resources}/${template}">
<j:set var="maven.genapp.template.dir" value="${plugin.resources}/${template}"/>
<!-- Get the template -->
<!-- create a temporary variable with no dots in the name to get around a jexl bug -->
<j:set var="presettemplate" value="${template}"/>
<j:if test="${empty(presettemplate)}">
<i:ask question="${maven.genapp.prompt.template}" answer="template" default="${maven.genapp.default.template}"/>
</j:if>
<!-- If template is in the user's home directory, use it -->
<u:available file="${user.home}/.maven/template/${template}">
<j:set var="maven.genapp.template.dir" value="${user.home}/.maven/template/${template}"/>
</u:available>
<j:set var="currenttemplatedir" value="${maven.genapp.template.dir}"/>
<j:if test="${empty(currenttemplatedir)}">
<!-- The template was not found in user.home, check in the plugin resources -->
<u:available file="${plugin.resources}/${template}">
<j:set var="maven.genapp.template.dir" value="${plugin.resources}/${template}"/>
</u:available>
</j:if>
</j:if>
<j:set var="currenttemplatedir" value="${maven.genapp.template.dir}"/>
@@ -119,6 +123,17 @@
</j:forEach>
</ant:fileset>
</ant:copy>
<!-- copy config files normally excluded by Ant default excludes -->
<ant:copy todir="${basedir}">
<ant:fileset dir="${maven.genapp.resources}" defaultexcludes="no">
<ant:include name="**/.*"/>
<ant:exclude name="**/.svn/**"/>
<ant:exclude name="**/*~"/>
<ant:exclude name="**/*.bak"/>
<ant:exclude name="**/*.swp"/>
</ant:fileset>
</ant:copy>
<!-- Run the specific jelly script for the template -->
<u:available file="${maven.genapp.template.dir}/template.jelly">