| <!-- |
| Licensed to the Apache Software Foundation (ASF) under one or more |
| contributor license agreements. 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. For additional information regarding |
| copyright in this work, please see the NOTICE file in the top level |
| directory of this distribution. |
| --> |
| |
| <project name="roller-scripting" default="build" basedir="."> |
| <description>Build Roller-Groovy integration classes</description> |
| |
| <property file="./ant.properties" /> |
| |
| <path id="scripting.path"> |
| <fileset dir="${rollersrc.dir}/build/webapp/WEB-INF/lib"> |
| <include name="roller-core.jar"/> |
| <include name="roller-web.jar"/> |
| <include name="roller-business.jar"/> |
| <include name="commons-logging.jar"/> |
| </fileset> |
| <fileset dir="${bsf.home}/lib"> |
| <include name="bsf.jar"/> |
| </fileset> |
| </path> |
| |
| <target name="build"> |
| <mkdir dir="./build/classes" /> |
| <javac debug="on" destdir="./build/classes"> |
| <src path="./src" /> |
| <classpath> |
| <path refid="scripting.path"/> |
| </classpath> |
| </javac> |
| <mkdir dir="./dist" /> |
| <jar basedir="build/classes" jarfile="./dist/roller-scripting.jar" /> |
| </target> |
| |
| <!-- |
| Copy BSF, JRuby, Groovy and Rhino jars. |
| Versions tested: |
| - Groovy 1.0 |
| - BSF 2.4.0 |
| - JRuby 0.9.8 |
| - Rhino 1.6 R5 |
| --> |
| <target name="copy-to-roller" > |
| <copy todir="../../../build/webapp/WEB-INF/lib"> |
| <fileset dir="./dist"> |
| <include name="roller-scripting.jar" /> |
| </fileset> |
| <fileset dir="./lib"> |
| <include name="bsf.jar" /> |
| </fileset> |
| <fileset dir="${groovy.home}/embeddable"> |
| <include name="groovy-all-1.0.jar" /> |
| </fileset> |
| <fileset dir="${jruby.home}/lib"> |
| <include name="jruby.jar" /> |
| </fileset> |
| <fileset dir="${rhino.home}"> |
| <include name="js.jar" /> |
| </fileset> |
| </copy> |
| </target> |
| |
| <target name="clean"> |
| <delete dir="./build" /> |
| </target> |
| |
| </project> |