| <!-- |
| 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#compile-java" |
| xmlns:ea="antlib:org.apache.easyant"> |
| |
| <ea:core-version requiredrevision="[0.9,+]" /> |
| |
| <ea:import mrid="org.apache.easyant.plugins#ivy-provisioning;0.2" /> |
| |
| <!-- We expect at this point to have every source available, even the ones which are generated --> |
| <extension-point name="compile-java:compile-ready" /> |
| |
| <target name="compile-java:init"> |
| <ea:parameter property="src.main.java" required="true" |
| description="directory where sources to be compiled are" /> |
| <ea:parameter property="target.main.classes" required="true" |
| description="destination directory for compiled test classes" /> |
| <ea:parameter property="javac.debug.mode" default="true" |
| description="javac debug mode, true or false" /> |
| |
| <ea:parameter property="compile.java.includes.pattern" default="**/*.java" |
| description="Pattern describing files included in compilation process" /> |
| <ea:parameter property="compile.java.excludes.pattern" default="" |
| description="Pattern describing files excluded in compilation process" /> |
| |
| <ea:parameter property="compile.java.target.version" default="${ant.java.version}" |
| description="Specify a VM version for Generated class files (e.g., 1.1 or 1.2)." /> |
| <ea:parameter property="compile.java.source.version" default="${ant.java.version}" |
| description="Specify a value of the -source command-line switch; will be ignored by all implementations prior to javac1.4 (or modern when Ant is not running in a 1.3 VM) and jikes" /> |
| |
| <available file="${src.main.java}" property="has.src.main.java" /> |
| |
| <ea:path pathid="compile.main.classpath" overwrite="false" /> |
| </target> |
| |
| <target name="compile-java:compile" depends="compile-java:init,ivy-provisioning:resolve-main-confs,compile-java:compile-ready" if="has.src.main.java"> |
| <mkdir dir="${target.main.classes}" /> |
| <javac srcdir="${src.main.java}" |
| destdir="${target.main.classes}" |
| debug="${javac.debug.mode}" |
| source="${compile.java.source.version}" |
| target="${compile.java.target.version}" |
| classpathref="compile.main.classpath" |
| includes="${compile.java.includes.pattern}" |
| excludes="${compile.java.excludes.pattern}" |
| includeantruntime="no"> |
| </javac> |
| </target> |
| |
| </project> |