Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
74 lines (62 sloc) 2.51 KB
<?xml version="1.0" encoding="UTF-8"?>
<!-- ======================================================================
VRaptor 3 scala plugin build
====================================================================== -->
<project name="VRaptor 3 Scala Plugin" default="artifacts" basedir=".">
<description>VRaptor 3 core module build</description>
<property name="vraptor.core" value="../vraptor/vraptor-core" />
<property name="vraptor.jar" value="${vraptor.core}/target/" />
<property name="core.lib.dir" value="${vraptor.core}/lib/mandatory" />
<property name="scala.lib.dir" value="${vraptor.core}/lib/scala" />
<property name="compile.dir" value="build.tmp" />
<property name="target.dir" value="target" />
<property name="target.file" value="${target.dir}/vraptor-scala.jar" />
<property name="scala-compiler.jar" value="${scala.lib.dir}/scala-compiler.jar" />
<property name="scala-library.jar" value="${scala.lib.dir}/scala-library.jar" />
<path id="scala.classpath">
<pathelement location="${scala-compiler.jar}" />
<pathelement location="${scala-library.jar}" />
</path>
<path id="libs.classpath" path=".">
<fileset dir="../vraptor/common">
<include name="*.jar" />
</fileset>
<fileset dir="${vraptor.jar}">
<include name="*.jar" />
</fileset>
<fileset dir="${vraptor.core}/lib/containers/guice/">
<include name="guice*.jar" />
</fileset>
<fileset dir="${core.lib.dir}">
<include name="**/*.jar" />
</fileset>
<fileset dir="${scala.lib.dir}">
<include name="**/*.jar" />
</fileset>
</path>
<path id="compile.classpath">
<path refid="scala.classpath" />
<path refid="libs.classpath" />
</path>
<taskdef resource="scala/tools/ant/antlib.xml">
<classpath refid="compile.classpath"/>
</taskdef>
<target name="compile" depends="clean" description="--> compiles classes">
<mkdir dir="${compile.dir}" />
<scalac destdir="${compile.dir}" srcdir="src/main/scala" classpathref="compile.classpath" />
<!--<javac destdir="${compile.dir}" srcdir="src/" classpathref="compile.classpath" />-->
<copy todir="${compile.dir}">
<fileset dir="src/" includes="META-INF/**" />
</copy>
</target>
<target name="artifacts" depends="compile" description="--> generate project's artifacts">
<mkdir dir="${target.dir}" />
<jar destfile="${target.file}" compress="true">
<fileset dir="${compile.dir}" includes="**" />
</jar>
</target>
<target name="clean" description="--> delete build artifacts">
<delete dir="${compile.dir}" />
<delete dir="${target.dir}" />
</target>
</project>