Build.xml and properties

Description

The utils_dev build.xml file draws properties from build.properties and propserties.xml. These files also access a file mybuild.properties if it exists. Within these properties the following environment variables can be set:

env.ADEMPIERE_SOURCE=${adempiere.base}
env.ADEMPIERE_ROOT=${env.ADEMPIERE_SOURCE}/adempiere
env.ADEMPIERE_HOME=${env.ADEMPIERE_ROOT}/Adempiere
env.ADEMPIERE_INSTALL=${env.ADEMPIERE_SOURCE}/adempiere/install
env.ADEMPIERE_VERSION=ADempiere
env.ADEMPIERE_VERSION_FILE=380LTS
env.ADEMPIERE_VENDOR=ADempiere
env.ENCODING=UTF-8
env.XDOCLET_HOME=${env.ADEMPIERE_SOURCE}/tools
env.ADEMPIERE_ENV=Y

The install target does the following:

<!-- ================================================ -->
<!-- Adempiere Local Install -->
<!-- ================================================ -->
<target name="install" depends="" description="Environment dependent">
<echo message="=========== Install Adempiere"/>
<copy todir="${env.ADEMPIERE_INSTALL}" verbose="true">
<fileset dir="install/build" includes="Adempiere_*"/>
</copy>
<!-- Delete Existing stuff, but not utils + data -->
<delete failonerror="false">
<fileset dir="${env.ADEMPIERE_HOME}/lib"/>
<fileset dir="${env.ADEMPIERE_HOME}/jboss"/>
</delete>
<!-- Unzip Install File -->
<unzip src="install/build/Adempiere_${env.ADEMPIERE_VERSION_FILE}.zip"
dest="${env.ADEMPIERE_ROOT}"
overwrite="yes"/>
<!-- Run Setup -->
<!--
<input addproperty="runSetupInput"
message="Run Setup(Y/N) ? "
validargs="Y,y,N,n"/>

<antcall target="runSetup"/>
-->
</target>

The ant target "clean-all" does the following:

<target name="clean-all" depends="clean">
<delete dir="${env.ADEMPIERE_ROOT}"/>
</target>

To use the system to create a local install, the environment variable can be set in mybuild.properties as follows.

env.ADEMPIERE_ROOT=c:\

Then the install will be created and updated in c:\adempiere.

The problem is that clean-all will attempt to delete c:\ which will fail (thankfully).

Recommend that the build.xml be changed to

<target name="clean-all" depends="clean">
<delete dir="${env.ADEMPIERE_HOME}"/>
</target>

This will delete c:\adempiere which was the intent.

Environment

None

Activity

Show:
Michael McKay
February 27, 2014, 11:06 PM

Feature branch created.
Changes committed in ef4d02

Fixed

Assignee

Unassigned

Reporter

Michael McKay

Labels

None

Priority

Minor