| <?xml version="1.0" encoding="UTF-8"?> |
| <!-- |
| ****************************************************************************** |
| * Copyright (c) 2008, 2010 VMware Inc. |
| * All rights reserved. This program and the accompanying materials |
| * are made available under the terms of the Eclipse Public License v1.0 |
| * which accompanies this distribution, and is available at |
| * http://www.eclipse.org/legal/epl-v10.html |
| * |
| * Contributors: |
| * VMware Inc. - initial contribution |
| ****************************************************************************** |
| --> |
| <project name="quality-war" xmlns:ivy="antlib:org.apache.ivy.ant" xmlns:osgi="antlib:org.springframework.build.osgi"> |
| |
| <import file="common.xml"/> |
| <import file="../common/quality.xml"/> |
| |
| <!-- Other targets --> |
| <target name="test.do" depends="ivy.init, resolve.test, compile.init, test.init" if="test.exists"> |
| <path id="test.compile.classpath"> |
| <pathelement location="${war.classes.dir}"/> |
| <path refid="compile.classpath"/> |
| <path refid="test.classpath"/> |
| </path> |
| <test-compile classpath.id="test.compile.classpath" input.dir="${test.java.dir}" output.dir="${test.output.dir}" |
| resources.dir="${test.resources.dir}"/> |
| |
| <path id="test.run.classpath"> |
| <pathelement location="${war.classes.dir}"/> |
| <pathelement location="${test.output.dir}"/> |
| <path refid="compile.classpath"/> |
| <path refid="test.classpath"/> |
| <path refid="runtime.classpath"/> |
| </path> |
| <test-run classpath.id="test.run.classpath"/> |
| </target> |
| |
| <target name="findbugs.do" depends="ivy.init, resolve.compile, compile.init, findbugs.init, src.init" if="src.exists"> |
| <findbugs home="${findbugs.dir}" output="xml" outputFile="${findbugs.output.file}" |
| excludeFilter="${findbugs.exclude.file}" jvmargs="-Xmx1024M" errorProperty="findbugs.errors" warningsProperty="findbugs.warnings"> |
| <class location="${war.classes.dir}"/> |
| <auxClasspath refid="compile.classpath"/> |
| <sourcepath location="${main.java.dir}"/> |
| </findbugs> |
| <antcall target="findbugs.post"/> |
| </target> |
| |
| <target name="findbugs.post" if="findbugs.enforce"> |
| <fail if="findbugs.errors" message="FindBugs errors found"/> |
| <fail if="findbugs.warnings" message="FindBugs warnings found"/> |
| </target> |
| |
| </project> |