PageRenderTime 145ms CodeModel.GetById 96ms app.highlight 2ms RepoModel.GetById 44ms app.codeStats 0ms

/asl/asl-common.xml

http://mp-rechnungs-und-kundenverwaltung.googlecode.com/
XML | 84 lines | 33 code | 10 blank | 41 comment | 0 complexity | 41308fa3a5385ab7024053c3e7f4fc01 MD5 | raw file
 1<?xml version="1.0" encoding="utf-8"?> 
 2<!--
 3********************************************************************************
 4* Ant Script Library - common targets module 
 5* Contains properties and targets 
 6* Module property prefix: "common"
 7********************************************************************************
 8* Copyright 2009 Joe Schmetzer
 9*
10* Licensed under the Apache License, Version 2.0 (the "License");
11* you may not use this file except in compliance with the License.
12* You may obtain a copy of the License at
13*
14*     http://www.apache.org/licenses/LICENSE-2.0
15*
16* Unless required by applicable law or agreed to in writing, software
17* distributed under the License is distributed on an "AS IS" BASIS,
18* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19* See the License for the specific language governing permissions and
20* limitations under the License.
21********************************************************************************
22 -->
23<project name="asl-common">
24    <dirname property="asl-common.basedir" file="${ant.file.asl-common}"/>
25	<!-- User specific property overrides -->
26	<property file="${user.home}/asl.properties"/>
27 	
28 	<!-- Project specific property overrides -->
29 	<property file="asl.properties"/>
30
31    <!-- ***********************************************************************
32    * Common properties.
33    ************************************************************************ -->
34    <property name="common.target-dir" location="target"/>
35    <property name="common.dist-dir" location="${common.target-dir}/dist"/>
36
37    <!-- ***********************************************************************
38    * target: clean
39    ************************************************************************ -->
40    <target name="clean" description="Deletes files generated by the build">
41        <delete dir="${common.target-dir}"/>
42    </target>
43    
44    <!-- ***********************************************************************
45    * target: -init-time
46    ************************************************************************ -->
47    <target name="-init-time">
48        <!-- Initialise standard time and date properties (including DSTAMP and TSTAMP) -->
49        <tstamp>
50            <format property="common.timestamp" pattern="yyyy-MM-dd HH:mm"/>
51            <format property="common.timestamp-long" pattern="d-MMMM-yyyy HH:mm"/>
52            <format property="common.date-iso" pattern="yyyyMMdd"/>
53            <format property="common.year" pattern="yyyy"/>
54        </tstamp>
55    </target>
56 	
57    <!-- ***********************************************************************
58    * target: -init-version
59    * This is an empty target that allows users to override how the property
60    * ${release.version} is set.
61    ************************************************************************ -->
62    <target name="-init-version"/>
63
64    <!-- ***********************************************************************
65    * macrodef: asl-check-libs
66    ************************************************************************ -->
67    <macrodef name="asl-check-libs"
68              description="Checks to see if the libraries for an optional task are available">
69        <attribute name="libname"/>
70        <attribute name="jar"/>
71        <sequential>
72            <available file="@{jar}" property="asl-common.@{libname}-jar-present"/>
73            <fail unless="asl-common.@{libname}-jar-present">Unable to intialise @{libname} task.
74                 
75The jar file "@{jar}"
76is missing. To install this jar, run the following command:
77
78    ant -f ${java-report.basedir}/asl-tasklib-install.xml install-@{libname}
79            </fail>
80        </sequential>
81    </macrodef>
82     
83</project>
84