~ubuntu-branches/ubuntu/trusty/ivy/trusty

« back to all changes in this revision

Viewing changes to src/java/org/apache/ivy/plugins/resolver/packager/build.xml

  • Committer: Bazaar Package Importer
  • Author(s): Varun Hiremath
  • Date: 2009-03-06 22:04:56 UTC
  • Revision ID: james.westby@ubuntu.com-20090306220456-5v37luqiuqda8ewp
Tags: upstream-2.0.0
ImportĀ upstreamĀ versionĀ 2.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?xml version="1.0" encoding="UTF-8"?>
 
2
 
 
3
<!--
 
4
    Licensed under the Apache License, Version 2.0 (the "License"); you may
 
5
    not use this file except in compliance with the License. You may obtain
 
6
    a copy of the License at
 
7
 
 
8
        http://www.apache.org/licenses/LICENSE-2.0
 
9
 
 
10
    Unless required by applicable law or agreed to in writing, software
 
11
    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 
12
    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 
13
    License for the specific language governing permissions and limitations
 
14
    under the License.
 
15
-->
 
16
 
 
17
<!-- $Id$ -->
 
18
<project name="packager" default="build">
 
19
 
 
20
    <!-- Validate packager.xml -->
 
21
    <target name="validate" if="ivy.packager.validate">
 
22
        <xmlvalidate failonerror="true" warn="yes" lenient="no">
 
23
            <attribute name="http://xml.org/sax/features/namespaces" value="true"/>
 
24
            <attribute name="http://apache.org/xml/features/validation/schema" value="true"/>
 
25
            <attribute name="http://apache.org/xml/features/validation/schema-full-checking" value="true"/>
 
26
            <property name="http://apache.org/xml/properties/schema/external-noNamespaceSchemaLocation" value="packager-1.0.xsd"/>
 
27
            <fileset dir=".">
 
28
                <include name="packager.xml"/>
 
29
            </fileset>
 
30
        </xmlvalidate>
 
31
    </target>
 
32
 
 
33
    <!-- Set ${resourceURL} (case 1) -->
 
34
    <target name="setResourceURL1" if="ivy.packager.resourceURL">
 
35
        <property name="resourceURL" value="${ivy.packager.resourceURL}"/>
 
36
    </target>
 
37
 
 
38
    <!-- Set ${resourceURL} (case 2) -->
 
39
    <target name="setResourceURL2" unless="ivy.packager.resourceURL">
 
40
        <property name="resourceURL" value=""/>
 
41
    </target>
 
42
 
 
43
    <!-- Apply XSLT to generate ant build file -->
 
44
    <target name="style">
 
45
        <xslt style="packager.xsl" in="packager.xml" out="packager-output.xml">
 
46
            <param name="resourceURL" expression="${resourceURL}"/>
 
47
            <param name="restricted" expression="${ivy.packager.restricted}"/>
 
48
        </xslt>
 
49
    </target>
 
50
 
 
51
    <!-- Main build target: invoke generated build file -->
 
52
    <target name="build" depends="validate, setResourceURL1, setResourceURL2, style">
 
53
        <ant antfile="packager-output.xml"/>
 
54
    </target>
 
55
 
 
56
</project>