gvsig-geoprocess / org.gvsig.geoprocess / tags / gvsig-v2_0_0_Build_2021 / prepare-workspace.xml @ 754
History | View | Annotate | Download (4.87 KB)
1 | 20 | nbrodin | <project name="org.gvsig.initial.build" default="prepare-workspace"> |
---|---|---|---|
2 | 98 | cordinyana | |
3 | <dirname property="org.gvsig.initial.build.basedir" file="${ant.file.org.gvsig.initial.build}" /> |
||
4 | |||
5 | <property name="workspace.basedir" value="${org.gvsig.initial.build.basedir}/.." /> |
||
6 | <property name="build.basedir" value="${workspace.basedir}/org.gvsig.maven.base.build" description="Eclipse workspace location" /> |
||
7 | <property name="build.jar.version" value="1.0.6-SNAPSHOT" /> |
||
8 | <property name="build.jar.file" value="org.gvsig.maven.base.build-${build.jar.version}.jar" /> |
||
9 | |||
10 | <property name="ant.libs.dir" location="${build.basedir}" |
||
11 | description="Additional ant tasks libs folder" /> |
||
12 | 20 | nbrodin | |
13 | 98 | cordinyana | <taskdef name="xmltask" classname="com.oopsconsultancy.xmltask.ant.XmlTask"> |
14 | <classpath>
|
||
15 | <pathelement location="${ant.libs.dir}/com.oopsconsultancy.xmltask-1.16.1.jar" /> |
||
16 | </classpath>
|
||
17 | </taskdef>
|
||
18 | 20 | nbrodin | |
19 | 98 | cordinyana | <target name="check-maven-base-build-available"> |
20 | <available file="${user.home}/.m2/repository/org/gvsig/org.gvsig.maven.base.build/${build.jar.version}/${build.jar.file}" property="maven-base-build-available" /> |
||
21 | </target>
|
||
22 | |||
23 | <target name="get-maven-base-build-local" depends="check-maven-base-build-available" if="maven-base-build-available"> |
||
24 | <!-- Unzip de build jar file from the maven repository into the workspace root folder -->
|
||
25 | <copy todir="${workspace.basedir}" preservelastmodified="false" filtering="false"> |
||
26 | <zipfileset src="${user.home}/.m2/repository/org/gvsig/org.gvsig.maven.base.build/${build.jar.version}/${build.jar.file}"> |
||
27 | <patternset>
|
||
28 | <exclude name="META-INF/**" /> |
||
29 | </patternset>
|
||
30 | </zipfileset>
|
||
31 | </copy>
|
||
32 | </target>
|
||
33 | |||
34 | <target name="get-maven-base-build-remote" depends="check-maven-base-build-available" unless="maven-base-build-available"> |
||
35 | <!-- Download the build jar file -->
|
||
36 | <get src="http://gvsig-desktop.forge.osor.eu/downloads/pub/projects/gvSIG-desktop/maven-repository/org/gvsig/org.gvsig.maven.base.build/${build.jar.version}/${build.jar.file}" dest="target/${build.jar.file}" verbose="true" /> |
||
37 | |||
38 | 20 | nbrodin | <!-- Unzip de build jar file into the workspace root folder -->
|
39 | 98 | cordinyana | <copy todir="${workspace.basedir}" preservelastmodified="false" filtering="false"> |
40 | <zipfileset src="target/${build.jar.file}"> |
||
41 | <patternset>
|
||
42 | <exclude name="META-INF/**" /> |
||
43 | </patternset>
|
||
44 | </zipfileset>
|
||
45 | <filterset>
|
||
46 | <filter token="GVSIG_HOME" value="/home/cordin/projects/gvsig/svn/gvSIG-2.0-build/build/product" /> |
||
47 | </filterset>
|
||
48 | </copy>
|
||
49 | |||
50 | </target>
|
||
51 | |||
52 | <target name="prepare-workspace" depends="get-maven-base-build-local,get-maven-base-build-remote"> |
||
53 | |||
54 | <mkdir dir="target" /> |
||
55 | |||
56 | <chmod dir="${build.basedir}/maven/bin" perm="u+x" includes="m2,mvn,mvnDebug" /> |
||
57 | |||
58 | 20 | nbrodin | <!-- Copy the maven launchers to the workspace metadata folder -->
|
59 | <copy todir="${workspace.basedir}/.metadata"> |
||
60 | 98 | cordinyana | <fileset dir="${build.basedir}/eclipse-launchers"> |
61 | <exclude name="**/org.eclipse.jdt.core.prefs" /> |
||
62 | <exclude name="**/org.eclipse.core.variables.prefs" /> |
||
63 | </fileset>
|
||
64 | 20 | nbrodin | </copy>
|
65 | 98 | cordinyana | |
66 | <concat destfile="${workspace.basedir}/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.core.prefs" append="true"> |
||
67 | <filelist dir="${build.basedir}/eclipse-launchers/.plugins/org.eclipse.core.runtime/.settings" files="org.eclipse.jdt.core.prefs" /> |
||
68 | </concat>
|
||
69 | <concat destfile="${workspace.basedir}/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.core.variables.prefs" append="true"> |
||
70 | <filelist dir="${build.basedir}/eclipse-launchers/.plugins/org.eclipse.core.runtime/.settings" files="org.eclipse.core.variables.prefs" /> |
||
71 | </concat>
|
||
72 | |||
73 | 20 | nbrodin | <!-- Configure the eclipse workspace -->
|
74 | 98 | cordinyana | <ant antfile="${build.basedir}/maven-goals.xml" target="mvn-configure-eclipse-workspace" /> |
75 | 20 | nbrodin | |
76 | 98 | cordinyana | <!-- Configure the gvSIG profile -->
|
77 | <ant antfile="${build.basedir}/check-gvsig-profile.xml" target="initialize" /> |
||
78 | 20 | nbrodin | |
79 | 98 | cordinyana | <property name="user-settings-file-location" value="${user.home}/.m2/settings.xml" /> |
80 | <xmltask source="${user-settings-file-location}" dest="${user-settings-file-location}"> |
||
81 | <copy path="//:settings/:profiles/:profile[:id/text() = 'gvsig-install']/:properties/:gvsig.install.dir/text()" property="current-gvsig-location"/> |
||
82 | </xmltask>
|
||
83 | |||
84 | <replace file="${workspace.basedir}/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.core.prefs" |
||
85 | token="@GVSIG_HOME@" value="${current-gvsig-location}"/> |
||
86 | <replace file="${workspace.basedir}/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.core.variables.prefs" |
||
87 | token="@GVSIG_HOME@" value="${current-gvsig-location}"/> |
||
88 | |||
89 | 20 | nbrodin | <!-- Compile, install and generate eclipse projects -->
|
90 | 98 | cordinyana | <ant antfile="${build.basedir}/maven-goals.xml" target="mvn-install-and-eclipse-eclipse" /> |
91 | |||
92 | 20 | nbrodin | <echo>INFORMATION!!!</echo> |
93 | <echo>Restart eclipse and then proceed to import the subprojects contained into the main project</echo> |
||
94 | 98 | cordinyana | |
95 | 20 | nbrodin | <!-- TODO: copiar al proyecto de configuración general -->
|
96 | </target>
|
||
97 | 98 | cordinyana | |
98 | 20 | nbrodin | <target name="clean"> |
99 | 98 | cordinyana | <delete dir="target" /> |
100 | 20 | nbrodin | </target>
|
101 | |||
102 | 98 | cordinyana | </project> |