<?xml version="1.0"?>
<!--
$Id: build.xml 9407 2004-03-13 08:15:56Z nickchalko $
Copyright 2004 The Apache Software Foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<project name="version-environment" default="env">

	<!-- Reference version ant tasks -->
	<taskdef resource="depot-version-antlib.xml"/>

	<target name="env">

		<!-- Check for something NOT available -->
		<version-available 
			property="bogus.version.available" 
			versionId="org.apache.bogus"/>
		<echo>
	version.available -> [${bogus.version.available}]
		</echo>

		<!-- Check for something available -->
		<version-available 
			property="version.available" 
			versionId="org.apache.depot.version"/>
		<echo> 
	version.available -> [${version.available}]
		</echo>

		<!-- 
		Display what is available 
		-->
		<version-environment/>
		
		<!-- 
		Create XML on what is available *anywhere* 
		
		Examples:
			build-env.xml
			test-env.xml
			etc...
		-->
		<property name="env.file" value="transient/sample-environment.xml" />
		<version-environment 
			xml="true"
			output="${env.file}"/>

		<available file="${env.file}" property="env.file.available"/>
		<echo>
	${env.file} available, is ${env.file.available}
		</echo>		
		<concat><filelist 
					dir="transient"
					files="sample-environment.xml"/></concat>

		<!--
			
			Check the environment (check constraints).
			
		-->
		<version-environment-check />	
	</target>
</project>
