Revision 29170 branches/v2_0_0_prep/build/build.xml
build.xml | ||
---|---|---|
1 |
<project name="Complete_build_system" basedir="." default="prepare-eclipse-workspace"> |
|
1 |
<project name="Complete_build_system" basedir="." default="prepare-eclipse-workspace" xmlns:artifact="antlib:org.apache.maven.artifact.ant">
|
|
2 | 2 |
<description> |
3 | 3 |
Builds and prepare folders to work with eclipse using maven. |
4 | 4 |
Also is able to generate a release of all system with binaries distribution |
... | ... | |
7 | 7 |
<!-- set global properties for this build --> |
8 | 8 |
<dirname file="${ant.file.Complete_build_system}" property="ant.file.Complete_build_system.dir"/> |
9 | 9 |
<dirname file="${ant.file.Complete_build_system.dir}" property="workspace_loc"/> |
10 |
|
|
10 | 11 |
<property name="mavendir" location="${ant.file.Complete_build_system.dir}/maven" /> |
11 | 12 |
<property environment="environment"/> |
12 | 13 |
|
... | ... | |
53 | 54 |
<presetdef name="maven"> |
54 | 55 |
<exec executable="${mvn.executable}"> |
55 | 56 |
<env key="JAVA_HOME" value="${java.home}"/> |
57 |
<env key="MAVEN_OPTS" value="-Xmx256M -XX:MaxPermSize=64m"/> |
|
56 | 58 |
</exec> |
57 | 59 |
</presetdef> |
58 | 60 |
|
59 |
<target name="prepare-eclipse-workspace" depends="mvn-clean,mvn-install-without-tests">
|
|
61 |
<target name="prepare-eclipse-workspace"> |
|
60 | 62 |
<maven> |
61 | 63 |
<arg value="-Declipse.workspace='${workspace_loc}'" /> |
62 | 64 |
<arg value="eclipse:add-maven-repo" /> |
63 | 65 |
</maven> |
64 |
<maven> |
|
65 |
<arg value="eclipse:eclipse" /> |
|
66 |
</maven> |
|
67 |
|
|
68 | 66 |
</target> |
69 | 67 |
<target name="mvn-clean"> |
70 | 68 |
<maven> |
... | ... | |
114 | 112 |
|
115 | 113 |
<!-- target name="work" description="prepares system to begin working with eclipse" depends="prepare-eclipse-workspace" / --> |
116 | 114 |
|
115 |
<property name="ant.file.ant_libs.dir" location="../../ant-tasks"/> |
|
116 |
|
|
117 |
<path id="maven-ant-tasks.classpath" path="${ant.file.ant_libs.dir}/maven-ant-tasks-2.0.10.jar" /> |
|
118 |
<typedef resource="org/apache/maven/artifact/ant/antlib.xml" |
|
119 |
uri="antlib:org.apache.maven.artifact.ant" |
|
120 |
classpathref="maven-ant-tasks.classpath" /> |
|
121 |
|
|
122 |
<!-- |
|
123 |
==================================== |
|
124 |
ant-contrib library load |
|
125 |
==================================== |
|
126 |
--> |
|
127 |
<taskdef resource="net/sf/antcontrib/antlib.xml"> |
|
128 |
<classpath> |
|
129 |
<pathelement location="${ant.file.ant_libs.dir}/ant-contrib-1.0b3.jar"/> |
|
130 |
<pathelement location="${ant.file.ant_libs.dir}/bcel-5.1.jar"/> |
|
131 |
<pathelement location="${ant.file.ant_libs.dir}/commons-httpclient-3.0.1.jar"/> |
|
132 |
<pathelement location="${ant.file.ant_libs.dir}/commons-logging-1.0.4.jar"/> |
|
133 |
<pathelement location="${ant.file.ant_libs.dir}/ivy-1.3.1.jar"/> |
|
134 |
</classpath> |
|
135 |
</taskdef> |
|
136 |
|
|
137 |
<target name="svn.checkout.all" depends="svn.getparams,svn.checkout"> |
|
138 |
</target> |
|
139 |
|
|
140 |
<target name="svn.checkout"> |
|
141 |
<artifact:pom id="pom" file="pom.xml" /> |
|
142 |
<for list="${pom.modules}" param="svn.module" delimiter=",[]" trim="true"> |
|
143 |
<sequential> |
|
144 |
<var name="svn.isgroup" unset="true"/> |
|
145 |
<propertyregex property="svn.module" |
|
146 |
input="@{svn.module}" |
|
147 |
regexp="[./]*(.*)" |
|
148 |
replace="\1" |
|
149 |
casesensitive="false" |
|
150 |
override="true"/> |
|
151 |
<available file="../${svn.module}" property="svn.isgroup"/> |
|
152 |
<antcall target="svn.getgroup"> |
|
153 |
<param name="svn.module" value="${svn.module}"/> |
|
154 |
</antcall> |
|
155 |
<antcall target="svn.getproject"> |
|
156 |
<param name="svn.module" value="${svn.module}"/> |
|
157 |
</antcall> |
|
158 |
</sequential> |
|
159 |
</for> |
|
160 |
</target> |
|
161 |
|
|
162 |
<target name="svn.getgroup" if="svn.isgroup"> |
|
163 |
<echo>group: ${svn.module}</echo> |
|
164 |
<ant dir="../${svn.module}" target="svn.checkout"/> |
|
165 |
</target> |
|
166 |
|
|
167 |
<target name="svn.getproject" unless="svn.isgroup"> |
|
168 |
<propertyregex property="svn.module" |
|
169 |
input="${svn.module}" |
|
170 |
regexp="^lib.*" |
|
171 |
replace="libraries/\0" |
|
172 |
casesensitive="false" |
|
173 |
override="true"/> |
|
174 |
<propertyregex property="svn.module" |
|
175 |
input="${svn.module}" |
|
176 |
regexp="^ext.*" |
|
177 |
replace="extensions/\0" |
|
178 |
casesensitive="false" |
|
179 |
override="true"/> |
|
180 |
<propertyregex property="svn.module" |
|
181 |
input="${svn.module}" |
|
182 |
regexp="^app.*" |
|
183 |
replace="applications/\0" |
|
184 |
casesensitive="false" |
|
185 |
override="true"/> |
|
186 |
<propertyregex property="svn.module" |
|
187 |
input="${svn.module}" |
|
188 |
regexp="^_fw.*" |
|
189 |
replace="frameworks/\0" |
|
190 |
casesensitive="false" |
|
191 |
override="true"/> |
|
192 |
<echo>project: ${svn.module}</echo> |
|
193 |
<antcall target="svn.checkout.project"> |
|
194 |
<param name="svn.project.path" value="../../.."/> |
|
195 |
<param name="svn.project.url" value="${svn.repository.url}/${svn.module}"/> |
|
196 |
<!-- |
|
197 |
<param name="svn.username" value="guest"/> |
|
198 |
<param name="svn.password" value=""/> |
|
199 |
--> |
|
200 |
</antcall> |
|
201 |
</target> |
|
202 |
|
|
203 |
<target name="svn.checkout.project"> |
|
204 |
<echo>url: ${svn.project.url}</echo> |
|
205 |
<java classname="org.tmatesoft.svn.cli.SVN" |
|
206 |
dir="${svn.project.path}" |
|
207 |
fork="true" |
|
208 |
failonerror="true"> |
|
209 |
<arg value="co" /> |
|
210 |
<arg value="--username"/> |
|
211 |
<arg value="${svn.username}"/> |
|
212 |
<arg value="--password"/> |
|
213 |
<arg value="${svn.password}"/> |
|
214 |
<arg value="${svn.project.url}" /> |
|
215 |
<classpath> |
|
216 |
<pathelement location="${ant.file.ant_libs.dir}/svnkit.jar" /> |
|
217 |
<pathelement location="${ant.file.ant_libs.dir}/svnkit-cli.jar" /> |
|
218 |
</classpath> |
|
219 |
</java> |
|
220 |
</target> |
|
221 |
|
|
222 |
<target name="svn.getparams"> |
|
223 |
<input |
|
224 |
message="SVN url (url to the branch to checkout):" |
|
225 |
addproperty="svn.repository.url" |
|
226 |
defaultvalue="https://gvsig.org/svn/gvSIG/branches/v2_0_0_prep" |
|
227 |
/> |
|
228 |
<input |
|
229 |
message="SVN user name:" |
|
230 |
addproperty="svn.username" |
|
231 |
defaultvalue="guest" |
|
232 |
/> |
|
233 |
<input |
|
234 |
message="SVN user password:" |
|
235 |
addproperty="svn.password" |
|
236 |
defaultvalue="guest" |
|
237 |
> |
|
238 |
<!-- |
|
239 |
defaultvalue="guest" |
|
240 |
defaultvalue="http://subversion.gvsig.org/gvSIG/branches/v2_0_0_prep" |
|
241 |
<handler classname="org.apache.tools.ant.input.SecureInputHandler" /> |
|
242 |
--> |
|
243 |
</input> |
|
244 |
</target> |
|
117 | 245 |
</project> |
118 | 246 |
|
Also available in: Unified diff