| <?xml version="1.0" encoding="UTF-8"?> |
| <!-- |
| DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. |
| |
| Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved. |
| |
| |
| The contents of this file are subject to the terms of either the GNU |
| General Public License Version 2 only ("GPL") or the Common |
| Development and Distribution License("CDDL") (collectively, the |
| "License"). You may not use this file except in compliance with the |
| License. You can obtain a copy of the License at |
| http://www.netbeans.org/cddl-gplv2.html |
| or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the |
| specific language governing permissions and limitations under the |
| License. When distributing the software, include this License Header |
| Notice in each file and include the License file at |
| nbbuild/licenses/CDDL-GPL-2-CP. Sun designates this |
| particular file as subject to the "Classpath" exception as provided |
| by Sun in the GPL Version 2 section of the License file that |
| accompanied this code. If applicable, add the following below the |
| License Header, with the fields enclosed by brackets [] replaced by |
| your own identifying information: |
| "Portions Copyrighted [year] [name of copyright owner]" |
| |
| Contributor(s): |
| |
| The Original Software is NetBeans. The Initial Developer of the Original |
| Software is Sun Microsystems, Inc. Portions Copyright 1997-2009 Sun |
| Microsystems, Inc. All Rights Reserved. |
| |
| If you wish your version of this file to be governed by only the CDDL |
| or only the GPL Version 2, indicate your decision by adding |
| "[Contributor] elects to include this software in this distribution |
| under the [CDDL or GPL Version 2] license." If you do not indicate a |
| single choice of license, a recipient has the option to distribute |
| your version of this file under either the CDDL, the GPL Version 2 or |
| to extend the choice of license to its licensees as provided above. |
| However, if you add GPL Version 2 code and therefore, elected the GPL |
| Version 2 license, then the option applies only if the new code is |
| made subject to such option by the copyright holder. |
| --> |
| <project name="findbugs" basedir="."> |
| |
| <property name="bootclasspath.prepend" value="${nbplatform.active.dir}/java/modules/ext/nb-javac-api.jar" /> |
| |
| <target name="findbugs-init" depends="build-init"> |
| <property name="findbugs.home" location="${suite.dir}/external/findbugs"/> |
| <ant dir="${findbugs.home}" inheritall="false"/> |
| </target> |
| |
| <target name="findbugs" depends="build-init,jar,findbugs-init"> |
| <property name="report.dir" location="${suite.dir}/build/findbugs"/> |
| <mkdir dir="${report.dir}"/> |
| <property name="report.file" location="${report.dir}/${code.name.base.dashes}.xml"/> |
| <taskdef name="findbugs" classname="edu.umd.cs.findbugs.anttask.FindBugsTask" classpath="${findbugs.home}/lib/findbugs-ant.jar"/> |
| |
| <path id="findbugs.class.path.ref"> |
| <path path="${module.run.classpath}"/> |
| <path path="${cp.extra}"/> |
| <path path="${cluster}/${module.jar}"/> |
| </path> |
| <pathconvert refid="findbugs.class.path.ref" property="findbugs.class.path"/> |
| |
| <echo>Findbugs module: ${code.name.base.dashes}</echo> |
| <findbugs home="${findbugs.home}" |
| output="xml" |
| outputFile="${report.file}" |
| failOnError="true" |
| jvmargs="-Xmx256m"> |
| <auxClasspath path="${findbugs.class.path}" /> |
| <sourcePath path="${src.dir}" /> |
| <class location="${build.classes.dir}" /> |
| </findbugs> |
| <condition property="findbugs.error" value="true"> |
| <isfileselected file="${report.file}"> |
| <size value="0"/> |
| </isfileselected> |
| </condition> |
| <antcall target="findbugs.delete"/> |
| </target> |
| |
| <target name="findbugs.delete" if="findbugs.error"> |
| <delete file="${report.file}" failonerror="false"/> |
| </target> |
| |
| <target name="-prepare-scripted-tests" depends="-check-scripted-tests" if="has.scripted.tests"> |
| <mkdir dir="build/test/scripted" /> |
| <copy todir="build/test/scripted"> |
| <fileset dir="test/scripted"/> |
| </copy> |
| <copy todir="build/test/scripted"> |
| <fileset dir="../test/scripted"/> |
| </copy> |
| <chmod dir="build/test/scripted" perm="u+x" includes="**/*" /> |
| </target> |
| |
| <target name="-check-scripted-tests" depends="build-init"> |
| <condition property="has.scripted.tests" value="true"> |
| <available file="test/scripted/config" /> |
| </condition> |
| </target> |
| |
| <target name="-jackpot-check-cp-exists" depends="init"> |
| <condition property="jackpot.cp.defined"> |
| <isreference refid="cp"/> |
| </condition> |
| </target> |
| |
| <target name="jackpot" depends="init,-jackpot-check-cp-exists" if="jackpot.cp.defined"> |
| <fail unless="jackpot.home">${jackpot.home} must be specified</fail> |
| <taskdef name="jackpot" classname="org.netbeans.modules.jackpot30.cmdline.ant.JackpotTask" classpath="${jackpot.home}/jackpot-ant.jar"/> |
| |
| <echo>Running Jackpot on module: ${code.name.base.dashes}</echo> |
| <jackpot jackpotHome="${jackpot.home}" source="${javac.source}"> |
| <src> |
| <pathelement path="${src.dir}" /> |
| </src> |
| <classpath> |
| <path refid="cp"/> |
| </classpath> |
| </jackpot> |
| </target> |
| </project> |