File: build.xml

package info (click to toggle)
libnb-platform18-java 12.1-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 729,800 kB
  • sloc: java: 5,059,097; xml: 574,432; php: 78,788; javascript: 29,039; ansic: 10,278; sh: 6,386; cpp: 4,612; jsp: 3,643; sql: 1,097; makefile: 540; objc: 288; perl: 277; haskell: 93
file content (144 lines) | stat: -rw-r--r-- 5,747 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
<?xml version="1.0" encoding="UTF-8"?>
<!--

    Licensed to the Apache Software Foundation (ASF) under one
    or more contributor license agreements.  See the NOTICE file
    distributed with this work for additional information
    regarding copyright ownership.  The ASF licenses this file
    to you 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 basedir="." default="build" name="ergonomics/ide.ergonomics">
    <description>Builds, tests, and runs the project org.netbeans.modules.ide.ergonomics</description>
    <import file="../../nbbuild/templates/projectized.xml"/>
    <property name="anttasks.jar" value="${nbantext.jar}"/>

    <target name="-release.dir" depends="-disable-kits,projectized-common.-release.dir"/>
    <target name="jar-prep" depends="-generate-proxies,projectized-common.jar-prep"/>
    <target name="clean" depends="-clean-release,projectized-common.clean"/>

    <!--
    -
    - Internal implementation
    -
    -->
    <target name="-compile-ant" depends="projectized-common.basic-init">
        <mkdir dir="${src-ant.build}"/>
        <depend srcdir="src-ant" destdir="${src-ant.build}" cache="build/depcache-ant">
            <classpath>
                <path path="${src-ant.cp}"/>
            </classpath>
        </depend>
        <javac srcdir="src-ant" destdir="${src-ant.build}"
            deprecation="${build.compiler.deprecation}"
            debug="true"
            source="1.6" target="1.6" includeantruntime="false">
            <classpath>
                <path path="${src-ant.cp}"/>
            </classpath>
            <compilerarg line="${javac.compilerargs}"/>
        </javac>
        <copy todir="${src-ant.build}">
            <fileset dir="src-ant" excludes="${jar-excludes}"/>
        </copy>
        <taskdef name="extractlayer"
             classname="org.netbeans.modules.ide.ergonomics.ant.ExtractLayer"
             classpath="${src-ant.build}:${src-ant.cp}"/>
        <taskdef name="resolvelist"
             classname="org.netbeans.nbbuild.ResolveList"
             classpath="${anttasks.jar}"/>
    </target>

    <target name="-init-clusters">
        <property name="common.ergonomics" location="src-ant/org/netbeans/modules/ide/ergonomics/ant/common-ergonomics.xml"/>
        <resolvelist
            name="ergonomic.clusters.includes"
            list="${nb.clusters.list}"
        >
            <mapper type="glob" from="*" to="*.dir"/>
        </resolvelist>
        <dirset 
            id="ergonomic.clusters"
            dir="${netbeans.dest.dir}"
            includes="${ergonomic.clusters.includes}"
        >
            <exclude name="harness"/>
            <exclude name="ide"/>
            <exclude name="platform"/>
            <exclude name="ergonomics"/>
            <exclude name="extra"/>
            <exclude name="nb"/>
        </dirset>
    </target>

    <target name="-clean-release">
        <property name="build.release.dir" location="build/release"/>
        <delete dir="${build.release.dir}"/>
    </target>
    <target name="-init-static-analysis">
        <property name="build.release.dir" location="build/release"/>
        <condition property="skip.static.analysis">
            <and>
                <equals arg1="${static.analysis}" arg2="false"/>
                <available file="${build.release.dir}"/>
            </and>
        </condition>
    </target>

    <!--
    - multi cluster operations
    -->
    <target 
        name="-disable-kits"
        depends="-init-clusters,-init-static-analysis"
        unless="skip.static.analysis"
    >
        <mkdir dir="${build.release.dir}/config/Modules"/>
        <subant genericantfile="${common.ergonomics}" target="-disable-one-cluster">
            <property name="xmldir" value="${build.release.dir}/config/Modules"/>
            <property name="ergonomicsdir" location="${basedir}"/>
            <property name="src-ant.cp" value="${src-ant.cp}"/>
            <property name="anttasks.jar" value="${anttasks.jar}"/>
            <dirset refid="ergonomic.clusters"/>
        </subant>
        <pathconvert property="extra.module.files" pathsep=",">
            <path>
                <fileset id="-disable-kits" dir="${build.release.dir}">
                    <include name="**/*"/>
                </fileset>
            </path>
            <chainedmapper>
                <flattenmapper/>
                <globmapper from="*" to="config/Modules/*"/>
            </chainedmapper>
        </pathconvert>
        <copy todir="${cluster}">
            <fileset dir="${build.release.dir}" includes="${extra.module.files}"/>
        </copy>
    </target>

    <target 
        name="-generate-proxies"
        depends="-init-clusters,-init-static-analysis,-compile-ant"
        unless="skip.static.analysis"
    >
        <subant genericantfile="${common.ergonomics}" target="-proxy-one-cluster">
            <property name="ergonomicsdir" location="${basedir}"/>
            <property name="src-ant.cp" value="${src-ant.cp}"/>
            <property name="cluster.entries" location="${netbeans.dest.dir}"/>
            <property name="anttasks.jar" value="${anttasks.jar}"/>
            <dirset refid="ergonomic.clusters"/>
        </subant>
    </target>
</project>