| <?xml version="1.0" encoding="UTF-8"?> | |
| <!-- | |
| ! | |
| ! Copyright 2006 The Apache Software Foundation. | |
| ! | |
| ! Licensed 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. | |
| !--> | |
| <!-- $Revision: 1.21 $ $Date: 2004-10-27 20:54:09 +0600 (Wed, 27 Oct 2004) $ --> | |
| <project default="jar" | |
| xmlns:j="jelly:core" | |
| xmlns:u="jelly:util" | |
| xmlns:maven="jelly:maven" | |
| xmlns:util="jelly:util" | |
| xmlns:deploy="deploy" | |
| xmlns:ant="jelly:ant"> | |
| <preGoal name="itest:compile"> | |
| <u:file var="file" name="${maven.itest.src}"/> | |
| <j:if test="${!file.exists()}"> | |
| <j:expr value="${context.setVariable('maven.itest.skip', 'true')}"/> | |
| </j:if> | |
| </preGoal> | |
| <!-- run the schema compiler --> | |
| <preGoal name="test:compile"> | |
| <!--<j:if test="context.getVariable('maven.test.skip') != 'true'}">--> | |
| <j:set var="compiled.classes.dir" value="target/classes"/> | |
| <!-- Theres got to be a better way to do this --> | |
| <j:set var="schema.source.dir" value="test-resources/xsd"/> | |
| <j:set var="testsuite.source.dir" value="test-resources/testsuite"/> | |
| <j:set var="schema.output.base.dir" value="target/schema"/> | |
| <j:set var="schema.generated.src.dir" value="${schema.output.base.dir}/src"/> | |
| <j:set var="schema.generated.classes.dir" value="${schema.output.base.dir}/classes"/> | |
| <!-- make the dirs --> | |
| <mkdir dir="${schema.output.base.dir}"/> | |
| <mkdir dir="${schema.generated.src.dir}"/> | |
| <mkdir dir="${schema.generated.classes.dir}"/> | |
| <!-- Run schema compiler with designated schemas --> | |
| <ant:echo>Compiling simple_maxOccurs2.xsd</ant:echo> | |
| <!-- simple max occurs 2 xsd --> | |
| <java classname="org.apache.axis2.schema.XSD2Java" fork="true"> | |
| <jvmarg line="${maven.junit.jvmargs}"/> | |
| <classpath refid="maven.dependency.classpath"/> | |
| <classpath location="${compiled.classes.dir}"/> | |
| <arg file="${schema.source.dir}/simple_maxOccurs2.xsd"/> | |
| <arg file="${schema.generated.src.dir}"/> | |
| </java> | |
| <ant:echo>Compiling anonymous_complexType.xsd</ant:echo> | |
| <!-- anon complex type xsd --> | |
| <java classname="org.apache.axis2.schema.XSD2Java" fork="true"> | |
| <jvmarg line="${maven.junit.jvmargs}"/> | |
| <classpath refid="maven.dependency.classpath"/> | |
| <classpath location="${compiled.classes.dir}"/> | |
| <arg file="${schema.source.dir}/anonymous_complexType.xsd"/> | |
| <arg file="${schema.generated.src.dir}"/> | |
| </java> | |
| <!-- anon choice xsd --> | |
| <ant:echo>Compiling simple_choice.xsd</ant:echo> | |
| <java classname="org.apache.axis2.schema.XSD2Java" fork="true"> | |
| <jvmarg line="${maven.junit.jvmargs}"/> | |
| <classpath refid="maven.dependency.classpath"/> | |
| <classpath location="${compiled.classes.dir}"/> | |
| <arg file="${schema.source.dir}/simple_choice.xsd"/> | |
| <arg file="${schema.generated.src.dir}"/> | |
| </java> | |
| <!-- anon particle all xsd --> | |
| <ant:echo>Compiling simple_particle_all.xsd</ant:echo> | |
| <java classname="org.apache.axis2.schema.XSD2Java" fork="true"> | |
| <jvmarg line="${maven.junit.jvmargs}"/> | |
| <classpath refid="maven.dependency.classpath"/> | |
| <classpath location="${compiled.classes.dir}"/> | |
| <arg file="${schema.source.dir}/simple_particle_all.xsd"/> | |
| <arg file="${schema.generated.src.dir}"/> | |
| </java> | |
| <!-- simple max occurs xsd --> | |
| <ant:echo>Compiling simple_maxOccurs.xsd</ant:echo> | |
| <java classname="org.apache.axis2.schema.XSD2Java" fork="true"> | |
| <jvmarg line="${maven.junit.jvmargs}"/> | |
| <classpath refid="maven.dependency.classpath"/> | |
| <classpath location="${compiled.classes.dir}"/> | |
| <arg file="${schema.source.dir}/simple_maxOccurs.xsd"/> | |
| <arg file="${schema.generated.src.dir}"/> | |
| </java> | |
| <!-- simple any type xsd --> | |
| <ant:echo>Compiling simple_anytype.xsd</ant:echo> | |
| <java classname="org.apache.axis2.schema.XSD2Java" fork="true"> | |
| <jvmarg line="${maven.junit.jvmargs}"/> | |
| <classpath refid="maven.dependency.classpath"/> | |
| <classpath location="${compiled.classes.dir}"/> | |
| <arg file="${schema.source.dir}/simple_anytype.xsd"/> | |
| <arg file="${schema.generated.src.dir}"/> | |
| </java> | |
| <!-- min occurs 0 xsd --> | |
| <ant:echo>Compiling simple-minoccurs0.xsd</ant:echo> | |
| <java classname="org.apache.axis2.schema.XSD2Java" fork="true"> | |
| <jvmarg line="${maven.junit.jvmargs}"/> | |
| <classpath refid="maven.dependency.classpath"/> | |
| <classpath location="${compiled.classes.dir}"/> | |
| <arg file="${schema.source.dir}/simple-minoccurs0.xsd"/> | |
| <arg file="${schema.generated.src.dir}"/> | |
| </java> | |
| <!-- complex min occurs 0 xsd --> | |
| <ant:echo>Compiling complex-minoccurs0.xsd</ant:echo> | |
| <java classname="org.apache.axis2.schema.XSD2Java" fork="true"> | |
| <jvmarg line="${maven.junit.jvmargs}"/> | |
| <classpath refid="maven.dependency.classpath"/> | |
| <classpath location="${compiled.classes.dir}"/> | |
| <arg file="${schema.source.dir}/complex-minoccurs0.xsd"/> | |
| <arg file="${schema.generated.src.dir}"/> | |
| </java> | |
| <ant:echo>Compiling simple-recursive-datatypes.xsd</ant:echo> | |
| <java classname="org.apache.axis2.schema.XSD2Java" fork="true"> | |
| <jvmarg line="${maven.junit.jvmargs}"/> | |
| <classpath refid="maven.dependency.classpath"/> | |
| <classpath location="${compiled.classes.dir}"/> | |
| <arg file="${schema.source.dir}/simple-recursive-datatypes.xsd"/> | |
| <arg file="${schema.generated.src.dir}"/> | |
| </java> | |
| <ant:echo>Compiling mixed_minoccus0.xsd</ant:echo> | |
| <java classname="org.apache.axis2.schema.XSD2Java" fork="true"> | |
| <jvmarg line="${maven.junit.jvmargs}"/> | |
| <classpath refid="maven.dependency.classpath"/> | |
| <classpath location="${compiled.classes.dir}"/> | |
| <arg file="${schema.source.dir}/mixed_minoccus0.xsd"/> | |
| <arg file="${schema.generated.src.dir}"/> | |
| </java> | |
| <!-- ################################################################### --> | |
| <!-- All simple primitive types xsd --> | |
| <java classname="org.apache.axis2.schema.XSD2Java" fork="true"> | |
| <jvmarg line="${maven.junit.jvmargs}"/> | |
| <classpath refid="maven.dependency.classpath"/> | |
| <classpath location="${compiled.classes.dir}"/> | |
| <arg file="${schema.source.dir}/simple/simpleType-All.xsd"/> | |
| <arg file="${schema.generated.src.dir}"/> | |
| </java> | |
| <!-- All simple derived types xsd --> | |
| <java classname="org.apache.axis2.schema.XSD2Java" fork="true"> | |
| <jvmarg line="${maven.junit.jvmargs}"/> | |
| <classpath refid="maven.dependency.classpath"/> | |
| <classpath location="${compiled.classes.dir}"/> | |
| <arg file="${schema.source.dir}/derived/derivedType-All.xsd"/> | |
| <arg file="${schema.generated.src.dir}"/> | |
| </java> | |
| <!-- ################################################################### --> | |
| <!-- All simple derived types xsd --> | |
| <ant:echo>Compiling complete.xsd</ant:echo> | |
| <java classname="org.apache.axis2.schema.XSD2Java" fork="true"> | |
| <jvmarg line="${maven.junit.jvmargs}"/> | |
| <classpath refid="maven.dependency.classpath"/> | |
| <classpath location="${compiled.classes.dir}"/> | |
| <arg file="${testsuite.source.dir}/complete.xsd"/> | |
| <arg file="${schema.generated.src.dir}"/> | |
| </java> | |
| <!-- ################################################################### --> | |
| <!-- Compile the generated classes --> | |
| <javac destdir="${schema.generated.classes.dir}" srcdir="${schema.generated.src.dir}"> | |
| <classpath refid="maven.dependency.classpath"></classpath> | |
| <classpath location="${compiled.classes.dir}"></classpath> | |
| </javac> | |
| <ant:path id="schema.generated.classes.dir" location="${schema.generated.classes.dir}"/> | |
| <maven:addPath id="maven.dependency.classpath" refid="schema.generated.classes.dir"/> | |
| <!--</j:if>--> | |
| </preGoal> | |
| </project> |