| <?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 |
| |
| https://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="commons-weaver-normalizer-sample-it-with-cw-antlib" |
| default="it" xmlns:cw="antlib:org.apache.commons.weaver.ant"> |
| |
| <property name="src.dir" location="${basedir}/src/main/java" /> |
| <property name="target.dir" location="${basedir}/target" /> |
| <property name="classes.dir" location="${target.dir}/classes" /> |
| <property name="lib.dir" location="${basedir}/lib" /> |
| |
| <path id="compile.classpath"> |
| <fileset dir="${lib.dir}" /> |
| </path> |
| |
| <target name="compile"> |
| <mkdir dir="${classes.dir}" /> |
| <javac srcdir="${src.dir}" destdir="${classes.dir}" |
| classpathref="compile.classpath" includeantruntime="false" /> |
| </target> |
| |
| <target name="weave" depends="compile"> |
| <cw:weave> |
| <cw:settings target="${classes.dir}" classpathref="compile.classpath"> |
| <properties> |
| <normalizer.superTypes> |
| org.apache.commons.lang3.reflect.TypeLiteral, |
| org.apache.commons.weaver.normalizer.example.ContrivedWrapper |
| </normalizer.superTypes> |
| <normalizer.targetPackage>org.apache.commons.weaver.normalizer.example.normalized</normalizer.targetPackage> |
| </properties> |
| </cw:settings> |
| </cw:weave> |
| </target> |
| |
| <target name="assertions" depends="weave"> |
| <java classname="org.apache.commons.weaver.normalizer.example.Assertions" |
| failonerror="true"> |
| <classpath> |
| <path refid="compile.classpath" /> |
| <pathelement location="${classes.dir}" /> |
| </classpath> |
| </java> |
| </target> |
| |
| <target name="clean"> |
| <delete dir="${target.dir}" /> |
| </target> |
| |
| <target name="it" depends="clean,assertions" /> |
| |
| </project> |