]>
git.argeo.org Git - gpl/argeo-slc.git/blob - maven/plugins/maven-argeo-pde-plugin/src/main/scripts/argeo-pde.build.xml
2 <property name=
"projectDirectory" location=
"${basedir}" />
3 <property name=
"eclipseAntArgs" value=
"" />
4 <property name=
"elementBuildScript" location=
"${projectDirectory}/build.xml" />
5 <property name=
"buildTempFolder" location=
"${projectDirectory}/target/argeo-pde-temp" />
6 <property name=
"buildScriptProperties" value=
"" />
8 <available file=
"${projectDirectory}/plugin.xml" property=
"elementType" value=
"plugin" />
9 <available file=
"${projectDirectory}/feature.xml" property=
"elementType" value=
"feature" />
11 <property name=
"pluginDestination" location=
"${projectDirectory}/target/plugins" />
12 <property name=
"featureDestination" location=
"${projectDirectory}/target/features" />
14 <target name=
"build" depends=
"init">
15 <fail message=
"Property buildScriptTargets has to be set" unless=
"buildScriptTargets" />
16 <eclipseAnt antfile=
"${ant.file}" antargs=
"eclipse.generateScripts" />
17 <eclipseAnt antfile=
"${elementBuildScript}" antargs=
"${buildScriptTargets} -Dplugin.destination=${pluginDestination} -Dfeature.destination=${featureDestination} ${buildScriptProperties}" />
20 <target name=
"clean" depends=
"logContext,clean.elementBuildScript">
21 <delete file=
"${projectDirectory}/javaCompiler...args" verbose=
"true" />
24 <target name=
"clean.elementBuildScript" if=
"elementBuildScript.exists">
25 <ant antfile=
"${elementBuildScript}" target=
"clean" />
26 <delete file=
"${elementBuildScript}" verbose=
"true" />
29 <target name=
"logContext">
30 <echo message=
"basedir=${basedir}" />
31 <echo message=
"ant.file=${ant.file}" />
32 <echo message=
"projectDirectory=${projectDirectory}" />
33 <echo message=
"baseLocation=${baseLocation}" />
34 <echo message=
"elementId=${elementId}" />
35 <echo message=
"elementBuildScript=${elementBuildScript}" />
36 <echo message=
"eclipseAntArgs=${eclipseAntArgs}" />
37 <echo message=
"buildScriptTargets=${buildScriptTargets}" />
38 <echo message=
"buildScriptProperties=${buildScriptProperties}" />
40 <available file=
"${elementBuildScript}" property=
"elementBuildScript.exists" value=
"true" />
43 <target name=
"init" depends=
"logContext">
44 <mkdir dir=
"${projectDirectory}/target/plugins" />
45 <mkdir dir=
"${projectDirectory}/target/features" />
48 <!-- TARGETS TO BE CALLED WITH ANT ECLIPSE -->
49 <target name=
"eclipse.generateScripts">
50 <fail message=
"Property elementType has to be set" unless=
"elementType" />
51 <eclipse.buildScript
elements=
"${elementType}@${elementId}" buildDirectory=
"${projectDirectory}/../.." baseLocation=
"${baseLocation}" outputUpdateJars=
"true" generateVersionsLists=
"true"/>
55 <macrodef name=
"eclipseAnt">
56 <attribute name=
"antfile" />
57 <attribute name=
"antargs" />
59 <java fork=
"true" classname=
"org.eclipse.core.launcher.Main" failonerror=
"true">
61 <fileset dir=
"${baseLocation}/plugins">
62 <include name=
"org.eclipse.equinox.launcher_*.jar" />
65 <arg line=
"-application org.eclipse.ant.core.antRunner" />
66 <arg line=
"-buildfile @{antfile}" />
67 <arg line=
"-DbaseLocation=${baseLocation} -DprojectDirectory=${projectDirectory} -DelementId=${elementId} -DbuildTempFolder=${buildTempFolder} -Dtemp.folder=${buildTempFolder}/temp.folder -Dfeature.temp.folder=${buildTempFolder}/feature.temp.folder" />
68 <arg line=
"${eclipseAntArgs}" />
69 <arg line=
"@{antargs}" />