findbugs-import.xml
author Jan Lahoda <jlahoda@netbeans.org>
Sun, 08 Jan 2017 20:11:20 +0100
changeset 1035 97d4ae8fcb13
parent 772 85bb885bccd9
permissions -rw-r--r--
Fixing license headers for various files
jlahoda@43
     1
<?xml version="1.0" encoding="UTF-8"?>
jlahoda@43
     2
<!--
jlahoda@43
     3
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
jlahoda@43
     4
jlahoda@43
     5
Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
jlahoda@43
     6
jlahoda@43
     7
jlahoda@43
     8
The contents of this file are subject to the terms of either the GNU
jlahoda@43
     9
General Public License Version 2 only ("GPL") or the Common
jlahoda@43
    10
Development and Distribution License("CDDL") (collectively, the
jlahoda@43
    11
"License"). You may not use this file except in compliance with the
jlahoda@43
    12
License. You can obtain a copy of the License at
jlahoda@43
    13
http://www.netbeans.org/cddl-gplv2.html
jlahoda@43
    14
or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
jlahoda@43
    15
specific language governing permissions and limitations under the
jlahoda@43
    16
License.  When distributing the software, include this License Header
jlahoda@43
    17
Notice in each file and include the License file at
jlahoda@43
    18
nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
jlahoda@43
    19
particular file as subject to the "Classpath" exception as provided
jlahoda@43
    20
by Sun in the GPL Version 2 section of the License file that
jlahoda@43
    21
accompanied this code. If applicable, add the following below the
jlahoda@43
    22
License Header, with the fields enclosed by brackets [] replaced by
jlahoda@43
    23
your own identifying information:
jlahoda@43
    24
"Portions Copyrighted [year] [name of copyright owner]"
jlahoda@43
    25
jlahoda@43
    26
Contributor(s):
jlahoda@43
    27
jlahoda@43
    28
The Original Software is NetBeans. The Initial Developer of the Original
jlahoda@43
    29
Software is Sun Microsystems, Inc. Portions Copyright 1997-2009 Sun
jlahoda@43
    30
Microsystems, Inc. All Rights Reserved.
jlahoda@43
    31
jlahoda@43
    32
If you wish your version of this file to be governed by only the CDDL
jlahoda@43
    33
or only the GPL Version 2, indicate your decision by adding
jlahoda@43
    34
"[Contributor] elects to include this software in this distribution
jlahoda@43
    35
under the [CDDL or GPL Version 2] license." If you do not indicate a
jlahoda@43
    36
single choice of license, a recipient has the option to distribute
jlahoda@43
    37
your version of this file under either the CDDL, the GPL Version 2 or
jlahoda@43
    38
to extend the choice of license to its licensees as provided above.
jlahoda@43
    39
However, if you add GPL Version 2 code and therefore, elected the GPL
jlahoda@43
    40
Version 2 license, then the option applies only if the new code is
jlahoda@43
    41
made subject to such option by the copyright holder.
jlahoda@43
    42
-->
jlahoda@43
    43
<project name="findbugs" basedir=".">
jlahoda@43
    44
jlahoda@772
    45
    <property name="bootclasspath.prepend" value="${nbplatform.active.dir}/java/modules/ext/nb-javac-api.jar" />
jlahoda@448
    46
jlahoda@43
    47
    <target name="findbugs-init" depends="build-init">       
jlahoda@43
    48
        <property name="findbugs.home" location="${suite.dir}/external/findbugs"/>
jlahoda@43
    49
        <ant dir="${findbugs.home}" inheritall="false"/>
jlahoda@43
    50
    </target>
jlahoda@43
    51
    
jlahoda@43
    52
    <target name="findbugs" depends="build-init,jar,findbugs-init">
jlahoda@43
    53
        <property name="report.dir" location="${suite.dir}/build/findbugs"/>
jlahoda@43
    54
        <mkdir dir="${report.dir}"/>
jlahoda@43
    55
        <property name="report.file" location="${report.dir}/${code.name.base.dashes}.xml"/>
jlahoda@43
    56
        <taskdef name="findbugs" classname="edu.umd.cs.findbugs.anttask.FindBugsTask" classpath="${findbugs.home}/lib/findbugs-ant.jar"/>
jlahoda@43
    57
jlahoda@43
    58
        <path id="findbugs.class.path.ref">
jlahoda@43
    59
            <path path="${module.run.classpath}"/>
jlahoda@43
    60
            <path path="${cp.extra}"/>
jlahoda@43
    61
            <path path="${cluster}/${module.jar}"/>
jlahoda@43
    62
        </path>
jlahoda@43
    63
        <pathconvert refid="findbugs.class.path.ref" property="findbugs.class.path"/>
jlahoda@43
    64
jlahoda@43
    65
        <echo>Findbugs module: ${code.name.base.dashes}</echo>
jlahoda@43
    66
        <findbugs home="${findbugs.home}"
jlahoda@43
    67
              output="xml"
jlahoda@43
    68
              outputFile="${report.file}"
jlahoda@43
    69
              failOnError="true"
jlahoda@43
    70
              jvmargs="-Xmx256m">
jlahoda@43
    71
            <auxClasspath path="${findbugs.class.path}" />
jlahoda@43
    72
            <sourcePath path="${src.dir}" />
jlahoda@43
    73
            <class location="${build.classes.dir}" />
jlahoda@43
    74
        </findbugs>
jlahoda@43
    75
        <condition property="findbugs.error" value="true">
jlahoda@43
    76
            <isfileselected file="${report.file}">
jlahoda@43
    77
                <size value="0"/>
jlahoda@43
    78
            </isfileselected>
jlahoda@43
    79
        </condition>
jlahoda@43
    80
        <antcall target="findbugs.delete"/>
jlahoda@43
    81
    </target>
jlahoda@43
    82
    
jlahoda@43
    83
    <target name="findbugs.delete" if="findbugs.error">
jlahoda@43
    84
        <delete file="${report.file}" failonerror="false"/>
jlahoda@43
    85
    </target>
jlahoda@43
    86
jlahoda@483
    87
    <target name="-prepare-scripted-tests" depends="-check-scripted-tests" if="has.scripted.tests">
jlahoda@483
    88
        <mkdir dir="build/test/scripted" />
jlahoda@483
    89
        <copy todir="build/test/scripted">
jlahoda@483
    90
            <fileset dir="test/scripted"/>
jlahoda@483
    91
        </copy>
jlahoda@483
    92
        <copy todir="build/test/scripted">
jlahoda@483
    93
            <fileset dir="../test/scripted"/>
jlahoda@483
    94
        </copy>
jlahoda@483
    95
        <chmod dir="build/test/scripted" perm="u+x" includes="**/*" />
jlahoda@483
    96
    </target>
jlahoda@483
    97
    
jlahoda@483
    98
    <target name="-check-scripted-tests" depends="build-init">
jlahoda@483
    99
        <condition property="has.scripted.tests" value="true">
jlahoda@483
   100
            <available file="test/scripted/config" />
jlahoda@483
   101
        </condition>
jlahoda@483
   102
    </target>
jlahoda@790
   103
    
jlahoda@790
   104
    <target name="-jackpot-check-cp-exists" depends="init">
jlahoda@790
   105
        <condition property="jackpot.cp.defined">
jlahoda@790
   106
            <isreference refid="cp"/>
jlahoda@790
   107
        </condition>
jlahoda@790
   108
    </target>
jlahoda@790
   109
    
jlahoda@790
   110
    <target name="jackpot" depends="init,-jackpot-check-cp-exists" if="jackpot.cp.defined">
jlahoda@790
   111
	<fail unless="jackpot.home">${jackpot.home} must be specified</fail>
jlahoda@790
   112
        <taskdef name="jackpot" classname="org.netbeans.modules.jackpot30.cmdline.ant.JackpotTask" classpath="${jackpot.home}/jackpot-ant.jar"/>
jlahoda@790
   113
jlahoda@790
   114
        <echo>Running Jackpot on module: ${code.name.base.dashes}</echo>
jlahoda@790
   115
        <jackpot jackpotHome="${jackpot.home}" source="${javac.source}">
jlahoda@790
   116
            <src>
jlahoda@790
   117
                <pathelement path="${src.dir}" />
jlahoda@790
   118
            </src>
jlahoda@790
   119
            <classpath>
jlahoda@790
   120
                <path refid="cp"/>
jlahoda@790
   121
            </classpath>
jlahoda@790
   122
        </jackpot>
jlahoda@790
   123
    </target>
jlahoda@43
   124
</project>