blob: 0522caf0edbc9843d54b03b2b6d68ed7a80d7097 [file] [log] [blame]
<!--
Copyright 2008-2010 the EasyAnt project
See the NOTICE file distributed with this work for additional information
regarding copyright ownership.
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.
-->
<project name="org.apache.easyant.plugins#scm-svn" xmlns:ea="antlib:org.apache.easyant">
<ea:core-version requiredrevision="[0.8,+]" />
<target name=":init" phase="validate" >
<ea:parameter phase="validate" />
<typedef resource="org/tigris/subversion/svnant/svnantlib.xml" classpathref="org.apache.easyant.plugins#scm-svn.classpath" />
</target>
<target name="-config" depends=":init">
<ea:parameter property="scm.connection.username" description="defines the username used to connect to the SCM" default=""/>
<ea:parameter property="scm.connection.password" description="defines the password used to connect to the SCM" default=""/>
<ea:parameter property="scm.connection.baseurl" description="the base scm url of your project" required="true"/>
<ea:parameter property="scm.svn.javahl" description="set to 'false' to use command line interface instead of JNI JavaHL binding" default="true"/>
<ea:parameter property="scm.svn.svnkit" description="set to 'false' to use command line interface instead of SVNKit binding" default="false"/>
<ea:parameter property="scm.svn.failonerror" description="controls wheter an error stops the build or is merely reported to the screen" default="true"/>
<ea:parameter property="scm.svn.dateformatter" description="formatter definition used to format/parse date (e.g. when revision is specified as date)" default="MM/DD/YYYY HH:MM AM_PM"/>
<ea:parameter property="scm.svn.datetimezone" description="time zone used to format/parse dates (e.g. when revision is specified as date)" default="local"/>
<ea:parameter property="scm.working.copy" default="${basedir}" description="Define the source url (used for copy)"/>
</target>
<target name=":tag" description="tag the project" depends="-config">
<echo>creating tag on the project</echo>
<ea:parameter property="scm.svn.base.tags" default="${scm.connection.baseurl}/tags" description="The url of tags base directory (used by svn protocol). It is not necessary to set it if you use the standard svn layout (branches/tags/trunk)."/>
<ea:parameter property="scm.tag.name" required="true" description="name of the tag to create"/>
<ea:parameter property="scm.commit.message" required="true" description="the commit message"/>
<svn username="${scm.connection.username}" password="${scm.connection.password}" javahl="${scm.svn.javahl}" svnkit="${scm.svn.svnkit}" dateFormatter="${scm.svn.dateformatter}" dateTimeZone="${scm.svn.datetimezone}" failOnError="${scm.svn.failonerror}">
<copy srcPath="${scm.working.copy}" destUrl="${scm.svn.base.tags}/${scm.tag.name}" message="${scm.commit.message}"/>
</svn>
</target>
<target name=":branch" description="branch the project" depends="-config">
<echo>creating branch on the project</echo>
<ea:parameter property="scm.svn.base.branches" default="${scm.connection.baseurl}/branches" description="The url of tags base directory (used by svn protocol). It is not necessary to set it if you use the standard svn layout (branches/tags/trunk)."/>
<ea:parameter property="scm.commit.message" required="true" description="the commit message"/>
<ea:parameter property="scm.branch.name" default="${module.version.target}" description="name of the branch to create"/>
<svn username="${scm.connection.username}" password="${scm.connection.password}" javahl="${scm.svn.javahl}" svnkit="${scm.svn.svnkit}" dateFormatter="${scm.svn.dateformatter}" dateTimeZone="${scm.svn.datetimezone}" failOnError="${scm.svn.failonerror}">
<copy srcPath="${scm.working.copy}" destUrl="${scm.svn.base.branches}/${scm.branch.name}" message="${scm.commit.message}"/>
</svn>
</target>
<!-- release -->
<target name="-init-release">
<ea:parameter property="scm.tag.name" default="${version}" description="name of the tag to create"/>
<ea:parameter property="scm.commit.message" default="EasyAnt: release ${version}" description="the commit message"/>
</target>
<target name=":release" phase="release" depends="generate-release-version,-init-release,:tag"/>
<!-- integration -->
<target name="-init-integration">
<ea:parameter property="scm.tag.name" default="${version}" description="name of the tag to create"/>
<ea:parameter property="scm.commit.message" default="EasyAnt: release ${version}" description="the commit message"/>
</target>
<target name=":integration" phase="publish-shared" depends="generate-shared-version,-init-integration,:tag"/>
<target name="doit" depends=":init" />
</project>