<project name="evo-app-load-properties" >
	
	<property name="properties.base.dir" value="${basedir}/properties" />
	<property name="lib.tools.dir" value="${basedir}/lib.tools" />
	
	<target name="load-static-properties" >
		<property name="app.dir" value="${basedir}" />
		<property name="evolute.dir" value="${basedir}/../evolute" />
		<property name="evolute.lib.dir" value="${evolute.dir}/lib" />
		<property name="evolute.lib.tools.dir" value="${evolute.dir}/lib.tools" />
		<property name="evolute.ant.dir" value="${evolute.dir}/ant" />
		<property name="evolute.jar.name" value="evolute.jar" />
		<property name="app.src.dir" value="${app.dir}/src" />
		<property name="app.lib.dir" value="${app.dir}/lib" />
		<property name="app.dist.dir" value="${app.dir}/dist" />
		<property name="app.dist.lib.dir" value="${app.dist.dir}/lib" />
		<property name="app.deploy.dist.dir" value="${app.dir}/deploy" />
		<property name="app.deploy.dist.lib.dir" value="${app.deploy.dist.dir}/lib" />
		<property name="app.build.dir" value="${app.dir}/build" />
		<property name="app.dependencies.chache.dir" value="${app.dir}/dependenciesCache" />
		<property name="app.max.mem" value="512M" />
		<property name="codegen.project.ant" value="${basedir}/../codegen/build.xml"/>
		<property name="codegen.properties.file" value="${basedir}/properties/codegen.xml"/>
		<property name="leaf.project.ant" value="${basedir}/../LEAF/build.xml"/>
		
		<path id="app.jar.classpath">
			<fileset dir="${app.lib.dir}" />
		</path>

		<path id="app.build.classpath">
			<pathelement location="${app.build.dir}" />
			<path refid="app.jar.classpath" />
		</path>
		
		<path id="lib.tools.classpath">
			<fileset dir="${lib.tools.dir}" />
		</path>
		
		<typedef resource="org/tigris/subversion/svnant/svnantlib.xml" classpathref="lib.tools.classpath" />
		
	</target>
	
	<target name="load-properties-file" >
		<property name="properties.dir" value="${properties.base.dir}" />
		<property file="${properties.dir}/app.properties" />
		<property file="${properties.dir}/project.properties" />
		<antcall target="load-static-properties"/>
	</target>
	
	<target name="load-properties" depends="load-properties-file,load-static-properties">
		
		<property name="app.name" value="${app.appName}" />
		<property name="app.main" value="${app.main-class}" />
		
		<property name="app.jar.name" value="${app.name}.jar" />
		<property name="jnlp.dir" value="${app.dir}/jnlp" />
		<property name="jnlp.extensions.dir" value="${jnlp.dir}/extensions" />
		<property name="app.java.version" value="${java.version}" />
		<property name="app.deploy.server" value="www.evolute.pt" />
		<property name="app.deploy.path" value="/home/software/src_${app.name}" />
		<property name="app.deploy.jnlp.path" value="${app.deploy.path}/jnlp" />
		<property name="app.deploy.production.script" value="/home/software/auto_deploy.sh ${app.name}" />
		<property name="app.deploy.test.script" value="/home/software/auto_test_deploy.sh ${app.name}" />
		<property name="deploy.prepare.script" value="/home/software/auto_prepare_deploy.sh ${app.name}" />
		<property name="app.version.file" value="${properties.base.dir}/version.properties" />
		<property name="app.version.comment" value="${app.name} versioning file" />
		<property name="app.run.args" value="" />
		<property name="app.ws.wsdl.url" value="${app.ws.wsdl.url.protocol}://${app.ws.wsdl.url.host}:${app.ws.wsdl.url.port}${app.ws.wsdl.url.path}" />
		
		<property name="leaf.main" value="com.evolute.leaf.Main" />
	</target>
	
</project> 