svn-gvsig-desktop / tags / v2_0_0_Build_2031 / build / ant-tasks / subversion-tasks.xml @ 36053
History | View | Annotate | Download (7.83 KB)
1 | 29554 | cordinyana | <project name="gvSIG-subversion-tasks" default="svn.checkout.all" |
---|---|---|---|
2 | xmlns:artifact="antlib:org.apache.maven.artifact.ant"> |
||
3 | |||
4 | <dirname property="gvSIG-subversion-tasks.basedir" file="${ant.file.gvSIG-subversion-tasks}" /> |
||
5 | <import file="${gvSIG-subversion-tasks.basedir}/ant-tasks-config.xml" /> |
||
6 | |||
7 | <description>
|
||
8 | Ant tasks and macros to interact with subversion |
||
9 | </description>
|
||
10 | |||
11 | <!-- Subversion targets -->
|
||
12 | 31337 | cordinyana | <target name="svn.checkout.all" |
13 | depends="svn.checkout.allprojects,eclipse.projects" |
||
14 | 29554 | cordinyana | description="Checkouts all projects defined in a parent module pom.xml"> |
15 | 31337 | cordinyana | <echo>
|
16 | Note: |
||
17 | Once the process has finished, import the projects into your |
||
18 | eclipse workspace.</echo>
|
||
19 | </target>
|
||
20 | |||
21 | <target name="svn.checkout.allprojects" depends="svn.getparams"> |
||
22 | 31307 | cordinyana | |
23 | 29554 | cordinyana | <artifact:pom id="pom" file="pom.xml" /> |
24 | 35773 | cordinyana | <echo>Checking out the gvSIG projects for the group ${pom.artifactId}: ${pom.modules}</echo> |
25 | 29554 | cordinyana | <for list="${pom.modules}" param="svn.module" delimiter=",[]" trim="true"> |
26 | <sequential>
|
||
27 | <propertyregex property="svn.module" input="@{svn.module}" |
||
28 | regexp="[./]*(.*)" replace="\1" casesensitive="false" |
||
29 | override="true" /> |
||
30 | 34115 | cordinyana | <!-- just to ignore submodules as they are already check out -->
|
31 | 34116 | cordinyana | <var name="svn.issubmodule" unset="true" /> |
32 | 34115 | cordinyana | <available file="${basedir}/${svn.module}" |
33 | property="svn.issubmodule" /> |
||
34 | 34116 | cordinyana | <antcall target="svn.checkout.module"> |
35 | 29554 | cordinyana | <param name="svn.module" value="${svn.module}" /> |
36 | </antcall>
|
||
37 | </sequential>
|
||
38 | </for>
|
||
39 | </target>
|
||
40 | 31307 | cordinyana | |
41 | <target name="eclipse.projects" if="create.eclipse.projects"> |
||
42 | <!-- Create the eclipse project configuration for all downloaded projects -->
|
||
43 | <if>
|
||
44 | <equals arg1="${create.eclipse.projects}" arg2="true" /> |
||
45 | <then>
|
||
46 | 31349 | cordinyana | <maven arg="-Dmaven.test.failure.ignore install" /> |
47 | 31307 | cordinyana | <maven arg="-P eclipse-project" /> |
48 | </then>
|
||
49 | </if>
|
||
50 | </target>
|
||
51 | 29554 | cordinyana | |
52 | 32650 | cordinyana | <target name="svn.update.all" depends="svn.getparams" |
53 | 29554 | cordinyana | description="Updates all projects defined in a parent module pom.xml"> |
54 | <artifact:pom id="pom" file="pom.xml" /> |
||
55 | <for list="${pom.modules}" param="svn.module" delimiter=",[]" trim="true"> |
||
56 | <sequential>
|
||
57 | <propertyregex property="svn.module" input="@{svn.module}" |
||
58 | regexp="[./]*(.*)" replace="\1" casesensitive="false" |
||
59 | override="true" /> |
||
60 | 34116 | cordinyana | <!-- just to ignore submodules as they are already check out -->
|
61 | <var name="svn.issubmodule" unset="true" /> |
||
62 | <available file="${basedir}/${svn.module}" |
||
63 | property="svn.issubmodule" /> |
||
64 | <antcall target="svn.update.module"> |
||
65 | 29554 | cordinyana | <param name="svn.module" value="${svn.module}" /> |
66 | </antcall>
|
||
67 | </sequential>
|
||
68 | </for>
|
||
69 | </target>
|
||
70 | 34116 | cordinyana | |
71 | <target name="svn.checkout.module" unless="svn.issubmodule"> |
||
72 | <var name="svn.isgroup" unset="true" /> |
||
73 | <available file="${build.folder}/projects/${svn.module}" |
||
74 | property="svn.isgroup" /> |
||
75 | <antcall target="svn.checkout.group"> |
||
76 | <param name="svn.module" value="${svn.module}" /> |
||
77 | </antcall>
|
||
78 | <antcall target="svn.checkout.project"> |
||
79 | <param name="svn.module" value="${svn.module}" /> |
||
80 | </antcall>
|
||
81 | </target>
|
||
82 | 29554 | cordinyana | |
83 | <target name="svn.checkout.group" if="svn.isgroup"> |
||
84 | <echo>group: ${svn.module}</echo> |
||
85 | <ant dir="${build.folder}/projects/${svn.module}" |
||
86 | 31337 | cordinyana | target="svn.checkout.allprojects" /> |
87 | 29554 | cordinyana | </target>
|
88 | |||
89 | 34116 | cordinyana | <target name="svn.checkout.project" unless="svn.isgroup" |
90 | 29554 | cordinyana | depends="svn.get.project.path"> |
91 | <echo>project: ${svn.module}</echo> |
||
92 | <antcall target="svn.checkout"> |
||
93 | 29706 | cordinyana | <param name="svn.project.path" value="${workspace_loc}" /> |
94 | 32624 | cordinyana | <param name="svn.project.url" value="${svn.module.url}" /> |
95 | 29554 | cordinyana | </antcall>
|
96 | </target>
|
||
97 | |||
98 | 34116 | cordinyana | <target name="svn.update.module" unless="svn.issubmodule"> |
99 | <var name="svn.isgroup" unset="true" /> |
||
100 | <available file="${build.folder}/projects/${svn.module}" |
||
101 | property="svn.isgroup" /> |
||
102 | <antcall target="svn.update.group"> |
||
103 | <param name="svn.module" value="${svn.module}" /> |
||
104 | </antcall>
|
||
105 | <antcall target="svn.update.project"> |
||
106 | <param name="svn.module" value="${svn.module}" /> |
||
107 | </antcall>
|
||
108 | </target>
|
||
109 | 29554 | cordinyana | |
110 | 34116 | cordinyana | <target name="svn.update.group" if="svn.isgroup"> |
111 | <echo>group: ${svn.module}</echo> |
||
112 | <ant dir="${build.folder}/projects/${svn.module}" target="svn.update.all" /> |
||
113 | </target>
|
||
114 | |||
115 | 29554 | cordinyana | <target name="svn.update.project" unless="svn.isgroup" |
116 | depends="svn.get.project.path"> |
||
117 | <echo>project: ${svn.module}</echo> |
||
118 | <antcall target="svn.update"> |
||
119 | 29706 | cordinyana | <param name="svn.project.path" value="${workspace_loc}" /> |
120 | 32624 | cordinyana | <param name="svn.project.url" value="${svn.module.url}" /> |
121 | 29554 | cordinyana | </antcall>
|
122 | </target>
|
||
123 | |||
124 | <target name="svn.checkout"> |
||
125 | <echo>url: ${svn.project.url}</echo> |
||
126 | 30597 | jjdelcerro | <echo>SVNKit version: ${svnkit.version}</echo> |
127 | 29554 | cordinyana | <java classname="org.tmatesoft.svn.cli.SVN" dir="${svn.project.path}" |
128 | fork="true" failonerror="true"> |
||
129 | 32648 | cordinyana | <arg value="--non-interactive"/> |
130 | 29554 | cordinyana | <arg value="co" /> |
131 | <arg value="--username" /> |
||
132 | <arg value="${svn.username}" /> |
||
133 | <arg value="--password" /> |
||
134 | <arg value="${svn.password}" /> |
||
135 | <arg value="${svn.project.url}" /> |
||
136 | <classpath>
|
||
137 | 30597 | jjdelcerro | <pathelement location="${ant.libs.dir}/svnkit-${svnkit.version}.jar" /> |
138 | <pathelement location="${ant.libs.dir}/svnkit-cli-${svnkit.version}.jar" /> |
||
139 | 29554 | cordinyana | </classpath>
|
140 | </java>
|
||
141 | </target>
|
||
142 | |||
143 | <target name="svn.update"> |
||
144 | 32650 | cordinyana | <echo>url: ${svn.project.url}</echo> |
145 | <echo>SVNKit version: ${svnkit.version}</echo> |
||
146 | 29554 | cordinyana | <java classname="org.tmatesoft.svn.cli.SVN" dir="${svn.project.path}" |
147 | fork="true" failonerror="true"> |
||
148 | 32648 | cordinyana | <arg value="--non-interactive"/> |
149 | 29554 | cordinyana | <arg value="update" /> |
150 | <arg value="${svn.module}" /> |
||
151 | <classpath>
|
||
152 | 30597 | jjdelcerro | <pathelement location="${ant.libs.dir}/svnkit-${svnkit.version}.jar" /> |
153 | <pathelement location="${ant.libs.dir}/svnkit-cli-${svnkit.version}.jar" /> |
||
154 | 29554 | cordinyana | </classpath>
|
155 | </java>
|
||
156 | </target>
|
||
157 | |||
158 | 31307 | cordinyana | <!--
|
159 | Get subversion parameters using the AntForms utility:
|
||
160 | http://antforms.sourceforge.net/
|
||
161 | -->
|
||
162 | 29706 | cordinyana | <target name="svn.getparams" unless="svn.repository.url"> |
163 | 31307 | cordinyana | <!-- Default values -->
|
164 | <property name="create.eclipse.projects" value="true"/> |
||
165 | 32359 | cordinyana | <property name="svn.repository.url" value="https://svn.forge.osor.eu/svn/gvsig-desktop/branches/v2_0_0_prep"/> |
166 | 29554 | cordinyana | <!--
|
167 | <property name="svn.username" value="guest"/> <property name="svn.password"
|
||
168 | value="guest"/>
|
||
169 | -->
|
||
170 | <antform title="SVN parameters" image="${gvsiglogo}" resetMessage="Cancel" |
||
171 | previousTarget="cancel"> |
||
172 | 32359 | cordinyana | |
173 | 32362 | cordinyana | <textProperty label="gvSIG 2.0 subversion repository: " property="svn.repository.url" |
174 | password="false" editable="false" columns="38"/> |
||
175 | 29554 | cordinyana | |
176 | 30634 | cordinyana | <label>
|
177 | Note: |
||
178 | Select the SVNKit version which relates to the SVN version of the other SVN |
||
179 | clients you are using, like the SVN command line client or Eclipse. In the |
||
180 | case of Eclipse, you have to install a version of the Subclipse plugin which |
||
181 | provides the same SVNKit version as the one selected, or to install the |
||
182 | Subversive plugin and configure it to use the selected SVNKit version in the |
||
183 | plugin preferences. |
||
184 | |||
185 | The relationship with the subversion version is : |
||
186 | SVNKit 1.1.7 -> Subversion 1.4 -> ¿? |
||
187 | SVNKit 1.2.3 -> Subversion 1.5 -> Subclipse 1.4.* |
||
188 | SVNKit 1.3.0 -> Subversion 1.6 -> Subclipse 1.6.* |
||
189 | |||
190 | 31307 | cordinyana | In the case of Subversive, you can select the SVNKit version in the eclipse preferences: |
191 | 30634 | cordinyana | Team > SVN > SVN Connector |
192 | </label>
|
||
193 | |||
194 | 30597 | jjdelcerro | <selectionProperty label="SVNKit version to use: " |
195 | property="svnkit.version" |
||
196 | 35749 | cordinyana | values="1.3.0;1.2.3;1.1.7" |
197 | 30597 | jjdelcerro | separator=";" /> |
198 | |||
199 | 29707 | cordinyana | <label>
|
200 | Note: |
||
201 | 30634 | cordinyana | Once the process has finished, import the projects into your eclipse workspace. |
202 | </label>
|
||
203 | 29554 | cordinyana | </antform>
|
204 | </target>
|
||
205 | |||
206 | <target name="svn.get.project.path"> |
||
207 | <description>
|
||
208 | Converts a project name to a project path in subversion. |
||
209 | Ej: libTools -> libraries/libTools
|
||
210 | </description>
|
||
211 | 32624 | cordinyana | <property file="${gvSIG-subversion-tasks.basedir}/projects-svn-repository.properties"/> |
212 | <propertycopy property="svn.module.url" from="${svn.module}" |
||
213 | override="true" silent="true"/> |
||
214 | 29554 | cordinyana | </target>
|
215 | </project> |