svn-gvsig-desktop / tags / v2_0_0_Build_2028 / libraries / org.gvsig.exportto / prepare-workspace.xml @ 35603
History | View | Annotate | Download (4.75 KB)
1 | 34981 | jpiera | <project name="org.gvsig.initial.build" default="prepare-workspace"> |
---|---|---|---|
2 | |||
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}" description="Additional ant tasks libs folder" /> |
||
11 | |||
12 | <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 | <mkdir dir="target" /> |
||
29 | |||
30 | <!-- 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 | <!-- Unzip de build jar file into the workspace root folder -->
|
||
34 | <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 | <!-- Copy the maven launchers to the workspace metadata folder -->
|
||
51 | <copy todir="${workspace.basedir}/.metadata"> |
||
52 | <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 | </copy>
|
||
57 | |||
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 | <!-- Configure the eclipse workspace -->
|
||
66 | <ant antfile="${build.basedir}/maven-goals.xml" target="mvn-configure-eclipse-workspace" /> |
||
67 | |||
68 | <!-- Configure the gvSIG profile -->
|
||
69 | <ant antfile="${build.basedir}/check-gvsig-profile.xml" target="initialize" /> |
||
70 | |||
71 | <property name="user-settings-file-location" value="${user.home}/.m2/settings.xml" /> |
||
72 | |||
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 | <xmltask source="${user-settings-file-location}" dest="${user-settings-file-location}"> |
||
80 | <copy path="//:settings/:profiles/:profile[:id/text() = 'gvsig-install']/:properties/:gvsig.install.dir/text()" property="current-gvsig-location" /> |
||
81 | </xmltask>
|
||
82 | |||
83 | <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 | <!-- Compile, install and generate eclipse projects -->
|
||
87 | <ant antfile="${build.basedir}/maven-goals.xml" target="mvn-install-and-eclipse-eclipse" /> |
||
88 | |||
89 | <echo>INFORMATION!!!</echo> |
||
90 | <echo>Restart eclipse and then proceed to import the subprojects contained into the main project</echo> |
||
91 | |||
92 | <!-- TODO: copiar al proyecto de configuraciĆ³n general -->
|
||
93 | </target>
|
||
94 | |||
95 | <target name="clean"> |
||
96 | <delete dir="target" /> |
||
97 | </target>
|
||
98 | |||
99 | </project> |