fix perform release when running on a clean project

git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@114768 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
brett 2004-03-02 00:17:58 +00:00
parent 64883a0a37
commit c8dcb8d02a

View File

@ -97,6 +97,25 @@
<goal name="scm:bootstrap-project"
description="Bootstrap a project from SCM"
prereqs="scm:checkout-project">
<!-- TODO: check tagged syntax ok with other SCM than CVS, including in docs -->
<j:set var="checkTagged" value="${maven.scm.check.tagged}"/>
<j:if test="${checkTagged}">
<!-- TODO: what about branch tags? Check <version>? What about cvs command for such? -->
<j:set var="tag" value="${maven.scm.cvs.sticky.tag}"/>
<j:if test="${tag == 'HEAD'}">
<maven:pom var="project" projectDescriptor="${maven.scm.checkout.dir}/${maven.scm.cvs.module}/project.xml"/>
<log:info>WARNING: you are releasing HEAD. This will overwrite any previous release versioned '${project.currentVersion}'.</log:info>
<i:ask
question="Are you sure (y/n)?"
answer="ok"
default="n"
/>
<j:if test="${ok != 'y'}">
<ant:fail>Cancelled by response '${ok}'</ant:fail>
</j:if>
</j:if>
</j:if>
<maven:maven
descriptor="${maven.scm.bootstrap.pom.dir}/project.xml"
goals="${maven.scm.bootstrap.goals}"
@ -158,25 +177,7 @@
<i:ask question="What goals are you using to build?" answer="maven.scm.bootstrap.goals" default="multiproject:deploy" />
</j:if>
<!-- TODO: check tagged syntax ok with other SCM than CVS, including in docs -->
<j:set var="checkTagged" value="${maven.scm.check.tagged}"/>
<j:if test="${checkTagged}">
<!-- TODO: what about branch tags? Check <version>? What about cvs command for such? -->
<j:set var="tag" value="${maven.scm.cvs.sticky.tag}"/>
<j:if test="${tag == 'HEAD'}">
<maven:pom var="project" projectDescriptor="${maven.scm.checkout.dir}/${maven.scm.cvs.module}/project.xml"/>
<log:info>WARNING: you are releasing HEAD. This will overwrite any previous release versioned '${project.currentVersion}'.</log:info>
<i:ask
question="Are you sure (y/n)?"
answer="ok"
default="n"
/>
<j:if test="${ok != 'y'}">
<ant:fail>Cancelled by response '${ok}'</ant:fail>
</j:if>
</j:if>
<attainGoal name="scm:bootstrap-project" />
</j:if>
</goal>
<!--==================================================================-->