<!-- This macro executes the default application of an eclipse installation that resides | |
in the folder ${buildtools}/@app | |
--> | |
<macrodef name="eclipse.launch"> | |
<attribute name="app" /> | |
<attribute name="workspace" default="${workspace}" /> | |
<element name="args" optional="true" /> | |
<sequential> | |
<!-- We assume that the eclipse installation is beneath ${tools} --> | |
<property name="@{app}.deploy.dir" value="${tools}/@{app}" /> | |
<!-- Find the Eclipse launcher and assing its location to the @{app}.launcher property --> | |
<pathconvert property="@{app}.launcher"> | |
<first count="1"> | |
<sort> | |
<fileset dir="${@{app}.deploy.dir}/plugins" includes="**/org.eclipse.equinox.launcher_*.jar" /> | |
<reverse xmlns="antlib:org.apache.tools.ant.types.resources.comparators"> | |
<date /> | |
</reverse> | |
</sort> | |
</first> | |
</pathconvert> | |
<!-- Copy Eclipse Variables preferences --> | |
<copy file="${relengDir}/templates/org.eclipse.core.variables.prefs" | |
toFile="@{workspace}/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.core.variables.prefs"/> | |
<!-- Launch the eclipse application --> | |
<java fork="true" jar="${@{app}.launcher}" dir="${@{app}.deploy.dir}" failonerror="true"> | |
<%@ egf:patternCall | |
patternId="platform:/plugin/org.eclipse.egf.portfolio.eclipse.build/egf/Build.fcore#LogicalName=org.eclipse.egf.portfolio.eclipse.build.buckminster.call.build.xml.Xmx" | |
%> | |
<jvmarg value="-DrelengDir=relengDir"/> | |
<%for(PropertyWrapper propertyWrapper : new PropertiesHelper().getRuntimeProperties(job)) {%> | |
<jvmarg value="-D<%=propertyWrapper.getKey()%>=${<%=propertyWrapper.getKey()%>}"/> | |
<%}%> | |
<arg value="-data" /> | |
<arg value="@{workspace}" /> | |
<args /> | |
</java> | |
</sequential> | |
</macrodef> |