| <!-- |
| 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 name="org.apache.easyant.plugins;build-std-java-test" |
| xmlns:au="antlib:org.apache.ant.antunit" |
| xmlns:ivy="antlib:org.apache.ivy.ant" |
| xmlns:ea="antlib:org.apache.easyant"> |
| |
| <!-- Import your plugin --> |
| <property name="target" value="target/test-antunit"/> |
| <!-- configure easyant in current project --> |
| <ea:configure-easyant-ivy-instance /> |
| <!-- import our local plugin --> |
| <property name="easyant.file" value="${basedir}/module.ivy"/> |
| <ea:import-test-module moduleIvy="../../../module.ivy" sourceDirectory="../../main/resources"/> |
| |
| <!-- Defines a setUp / tearDown (before each test) that cleans the environnement --> |
| <target name="clean-test" description="remove stale build artifacts before / after each test"> |
| <delete dir="${basedir}" includeemptydirs="true"> |
| <include name="**/target/**"/> |
| <include name="**/lib/**"/> |
| </delete> |
| </target> |
| |
| <target name="setUp" depends="clean-test"> |
| <ivy:settings id="project.ivy.instance"/> |
| </target> |
| <target name="tearDown" depends="clean-test"/> |
| |
| <target name="test-build-std-java:clean" depends="clean"> |
| <au:assertLogContains text="Cleaning ${target}..."/> |
| <au:assertLogContains text="Build sequence for target(s) `setUp', `test-build-std-java:clean' is [clean-test, setUp, clean-std:clean, clean, test-build-std-java:clean]" level="debug"/> |
| </target> |
| |
| <target name="test-build-std-java:compile" depends="compile"> |
| <au:assertLogContains text="Build sequence for target(s) `setUp', `test-build-std-java:compile' is [clean-test, setUp, -ivy-provisioning:init, abstract-provisioning:provisioning-ready, -ivy-provisioning:resolve, -ivy-provisioning:resolve-main-confs, -ivy-provisioning:resolve-test-confs, -ivy-provisioning:resolve-provided-confs, ivy-provisioning:resolve, abstract-provisioning:provisioning-finished, abstract-compile:compile-ready, compile-java:init, compile-java:compile, compile-test-java:compile, compile-test-java:compile-integration, abstract-compile:compile-finished, compile, test-build-std-java:compile]" level="debug"/> |
| </target> |
| <target name="test-build-std-java:test" depends="test"> |
| <au:assertLogContains text="Running org.apache.easyant.example.ExampleTest"/> |
| <au:assertLogContains text="Tests run: 2, Failures: 0, Errors: 0"/> |
| <au:assertLogContains text="Build sequence for target(s) `setUp', `test-build-std-java:test' is [clean-test, setUp, -ivy-provisioning:init, abstract-provisioning:provisioning-ready, -ivy-provisioning:resolve, -ivy-provisioning:resolve-main-confs, -ivy-provisioning:resolve-test-confs, -ivy-provisioning:resolve-provided-confs, ivy-provisioning:resolve, abstract-provisioning:provisioning-finished, abstract-compile:compile-ready, compile-java:init, compile-java:compile, compile-test-java:compile, compile-test-java:compile-integration, abstract-compile:compile-finished, compile, resources-std:init, -resources-std:check-resources, resources-std:copy-resources, resources-std:copy-test-resources, abstract-test:test-ready, abstract-test:init, test-junit:init, abstract-test:compute-test-sets, -test-junit:test, test-junit:run, abstract-test:test-run, test, test-build-std-java:test]" level="debug"/> |
| </target> |
| |
| <target name="test-build-std-java:package" depends="package"> |
| <au:assertLogContains text="Build sequence for target(s) `setUp', `test-build-std-java:package' is [clean-test, setUp, -ivy-provisioning:init, abstract-provisioning:provisioning-ready, -ivy-provisioning:resolve, -ivy-provisioning:resolve-main-confs, -ivy-provisioning:resolve-test-confs, -ivy-provisioning:resolve-provided-confs, ivy-provisioning:resolve, abstract-provisioning:provisioning-finished, abstract-compile:compile-ready, compile-java:init, compile-java:compile, compile-test-java:compile, compile-test-java:compile-integration, abstract-compile:compile-finished, compile, manifest:init, -manifest:generate-version-number, manifest:manifest, manifest:manifest-runnable, resources-std:init, -resources-std:check-resources, resources-std:copy-resources, abstract-package:package-ready, abstract-package:init, abstract-package:compute-metainf, package-jar:init, package-jar:jar, abstract-package:register-main-artifact, abstract-package:package-finished, package, test-build-std-java:package]" level="debug"/> |
| </target> |
| |
| </project> |