gvsig-plugintemplates / org.gvsig.fortunecookies / trunk / provider-based-implementation-with-user-interface / org.gvsig.fortunecookies.app / prepare-workspace.xml @ 129
History | View | Annotate | Download (4.88 KB)
1 |
<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 |
|
29 |
<mkdir dir="target" /> |
30 |
|
31 |
<!-- Download the build jar file -->
|
32 |
<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" /> |
33 |
|
34 |
<!-- Unzip de build jar file into the workspace root folder -->
|
35 |
<copy todir="${workspace.basedir}" preservelastmodified="false" filtering="false"> |
36 |
<zipfileset src="target/${build.jar.file}"> |
37 |
<patternset>
|
38 |
<exclude name="META-INF/**" /> |
39 |
</patternset>
|
40 |
</zipfileset>
|
41 |
<filterset>
|
42 |
<filter token="GVSIG_HOME" value="/home/cordin/projects/gvsig/svn/gvSIG-2.0-build/build/product" /> |
43 |
</filterset>
|
44 |
</copy>
|
45 |
|
46 |
</target>
|
47 |
|
48 |
<target name="prepare-workspace" depends="get-maven-base-build-local,get-maven-base-build-remote"> |
49 |
|
50 |
<mkdir dir="target" /> |
51 |
|
52 |
<chmod dir="${build.basedir}/maven/bin" perm="u+x" includes="m2,mvn,mvnDebug" /> |
53 |
|
54 |
<!-- Copy the maven launchers to the workspace metadata folder -->
|
55 |
<copy todir="${workspace.basedir}/.metadata"> |
56 |
<fileset dir="${build.basedir}/eclipse-launchers"> |
57 |
<exclude name="**/org.eclipse.jdt.core.prefs" /> |
58 |
<exclude name="**/org.eclipse.core.variables.prefs" /> |
59 |
</fileset>
|
60 |
</copy>
|
61 |
|
62 |
<concat destfile="${workspace.basedir}/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.core.prefs" append="true"> |
63 |
<filelist dir="${build.basedir}/eclipse-launchers/.plugins/org.eclipse.core.runtime/.settings" files="org.eclipse.jdt.core.prefs" /> |
64 |
</concat>
|
65 |
<concat destfile="${workspace.basedir}/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.core.variables.prefs" append="true"> |
66 |
<filelist dir="${build.basedir}/eclipse-launchers/.plugins/org.eclipse.core.runtime/.settings" files="org.eclipse.core.variables.prefs" /> |
67 |
</concat>
|
68 |
|
69 |
<!-- Configure the eclipse workspace -->
|
70 |
<ant antfile="${build.basedir}/maven-goals.xml" target="mvn-configure-eclipse-workspace" /> |
71 |
|
72 |
<!-- Configure the gvSIG profile -->
|
73 |
<ant antfile="${build.basedir}/check-gvsig-profile.xml" target="initialize" /> |
74 |
|
75 |
<property name="user-settings-file-location" value="${user.home}/.m2/settings.xml" /> |
76 |
|
77 |
<taskdef name="xmltask" classname="com.oopsconsultancy.xmltask.ant.XmlTask"> |
78 |
<classpath>
|
79 |
<pathelement location="${ant.libs.dir}/com.oopsconsultancy.xmltask-1.16.1.jar" /> |
80 |
</classpath>
|
81 |
</taskdef>
|
82 |
|
83 |
<xmltask source="${user-settings-file-location}" dest="${user-settings-file-location}"> |
84 |
<copy path="//:settings/:profiles/:profile[:id/text() = 'gvsig-install']/:properties/:gvsig.install.dir/text()" property="current-gvsig-location" /> |
85 |
</xmltask>
|
86 |
|
87 |
<replace file="${workspace.basedir}/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.core.prefs" token="@GVSIG_HOME@" value="${current-gvsig-location}" /> |
88 |
<replace file="${workspace.basedir}/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.core.variables.prefs" token="@GVSIG_HOME@" value="${current-gvsig-location}" /> |
89 |
|
90 |
<!-- Compile, install and generate eclipse projects -->
|
91 |
<ant antfile="${build.basedir}/maven-goals.xml" target="mvn-install-and-eclipse-eclipse" /> |
92 |
|
93 |
<echo>INFORMATION!!!</echo> |
94 |
<echo>Restart eclipse and then proceed to import the subprojects contained into the main project</echo> |
95 |
|
96 |
<!-- TODO: copiar al proyecto de configuraciĆ³n general -->
|
97 |
</target>
|
98 |
|
99 |
<target name="clean"> |
100 |
<delete dir="target" /> |
101 |
</target>
|
102 |
|
103 |
</project>
|