1
<?xml version="1.0" encoding="UTF-8"?>
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
8
http://www.apache.org/licenses/LICENSE-2.0
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
18
<project name="packager" default="build">
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"/>
28
<include name="packager.xml"/>
33
<!-- Set ${resourceURL} (case 1) -->
34
<target name="setResourceURL1" if="ivy.packager.resourceURL">
35
<property name="resourceURL" value="${ivy.packager.resourceURL}"/>
38
<!-- Set ${resourceURL} (case 2) -->
39
<target name="setResourceURL2" unless="ivy.packager.resourceURL">
40
<property name="resourceURL" value=""/>
43
<!-- Apply XSLT to generate ant build file -->
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}"/>
51
<!-- Main build target: invoke generated build file -->
52
<target name="build" depends="validate, setResourceURL1, setResourceURL2, style">
53
<ant antfile="packager-output.xml"/>