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