2010-02-21 18:45:18 +00:00
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
2010-01-29 22:13:57 +00:00
|
|
|
|
|
|
|
<!-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
|
|
|
|
|
2010-02-21 18:45:18 +00:00
|
|
|
<!-- ======================================================================
|
|
|
|
Build script for the Vitro core webapp.
|
|
|
|
|
2010-08-03 18:53:55 +00:00
|
|
|
This can be used on its own, or invoked from a Product build script.
|
2010-02-21 18:45:18 +00:00
|
|
|
====================================================================== -->
|
|
|
|
|
|
|
|
<project name="vitroCore" default="describe">
|
|
|
|
|
|
|
|
<!-- - - - - - - - - - - - - - - - - -
|
|
|
|
properties
|
|
|
|
- - - - - - - - - - - - - - - - - -->
|
|
|
|
<property name="build.dir" location=".build" />
|
2010-08-03 18:53:55 +00:00
|
|
|
<property name="webapp.dir" location="." />
|
2010-02-21 18:45:18 +00:00
|
|
|
|
2010-08-03 18:53:55 +00:00
|
|
|
<property name="war.dir" location="${build.dir}/war" />
|
|
|
|
<property name="war-webinf.dir" location="${war.dir}/WEB-INF" />
|
|
|
|
<property name="war-classes.dir" location="${war-webinf.dir}/classes" />
|
2010-10-25 21:29:25 +00:00
|
|
|
<property name="war-resources.dir" location="${war-webinf.dir}/resources" />
|
2010-08-03 18:53:55 +00:00
|
|
|
<property name="war-lib.dir" location="${war-webinf.dir}/lib" />
|
2010-02-22 13:32:29 +00:00
|
|
|
|
2010-08-03 18:53:55 +00:00
|
|
|
<property name="test-classes.dir" location="${build.dir}/testclasses" />
|
2010-02-21 18:45:18 +00:00
|
|
|
|
2010-08-03 18:53:55 +00:00
|
|
|
<property name="servletjars.dir" location="${build.dir}/servletjars" />
|
2011-07-11 18:32:46 +00:00
|
|
|
|
2011-04-22 16:40:49 +00:00
|
|
|
<property name="javac.deprecation" value="true" />
|
2010-02-21 18:45:18 +00:00
|
|
|
|
|
|
|
<!-- - - - - - - - - - - - - - - - - -
|
|
|
|
paths: for compiling and running
|
|
|
|
- - - - - - - - - - - - - - - - - -->
|
|
|
|
<path id="compile.classpath">
|
2010-08-03 18:53:55 +00:00
|
|
|
<fileset dir="${war-lib.dir}">
|
|
|
|
<include name="**/*.jar" />
|
|
|
|
</fileset>
|
|
|
|
<fileset dir="${servletjars.dir}">
|
2010-02-21 18:45:18 +00:00
|
|
|
<include name="**/*.jar" />
|
|
|
|
</fileset>
|
|
|
|
</path>
|
2010-01-29 22:13:57 +00:00
|
|
|
|
2010-02-21 18:45:18 +00:00
|
|
|
<path id="test.compile.classpath">
|
2010-08-03 18:53:55 +00:00
|
|
|
<pathelement location="${war-classes.dir}" />
|
2010-02-21 18:45:18 +00:00
|
|
|
<path refid="compile.classpath" />
|
|
|
|
</path>
|
2010-01-29 22:13:57 +00:00
|
|
|
|
2010-02-21 18:45:18 +00:00
|
|
|
<path id="test.run.classpath">
|
2010-08-03 18:53:55 +00:00
|
|
|
<!-- This holds data files and a special log4j.properties -->
|
2010-02-21 18:45:18 +00:00
|
|
|
<pathelement location="${webapp.dir}/test" />
|
2010-01-29 22:13:57 +00:00
|
|
|
|
2010-08-03 18:53:55 +00:00
|
|
|
<pathelement location="${test-classes.dir}" />
|
2010-02-21 18:45:18 +00:00
|
|
|
<path refid="test.compile.classpath" />
|
2010-01-29 22:13:57 +00:00
|
|
|
</path>
|
|
|
|
|
2010-02-21 18:45:18 +00:00
|
|
|
|
|
|
|
<!-- =================================
|
|
|
|
target: describe
|
|
|
|
================================= -->
|
2010-02-22 13:32:29 +00:00
|
|
|
<target name="describe" description="--> Describe the targets (this is the default).">
|
2010-02-21 18:45:18 +00:00
|
|
|
<echo>
|
|
|
|
all - Runs "clean", then "deploy".
|
|
|
|
clean - Delete all artifacts so the next build will be from scratch.
|
|
|
|
compile - Compile the Java source files.
|
|
|
|
test - Compile and run the JUnit tests.
|
2011-03-03 15:53:41 +00:00
|
|
|
war - Create a WAR file to be deployed in a servlet container.
|
2010-02-21 18:45:18 +00:00
|
|
|
deploy - Deploy the application directly into the Tomcat webapps directory.
|
|
|
|
</echo>
|
2010-01-29 22:13:57 +00:00
|
|
|
</target>
|
2010-02-21 18:45:18 +00:00
|
|
|
|
|
|
|
<!-- =================================
|
|
|
|
target: all
|
|
|
|
================================= -->
|
2010-02-22 13:32:29 +00:00
|
|
|
<target name="all" depends="clean, deploy" description="--> Run 'clean', then 'deploy'" />
|
2010-02-21 18:45:18 +00:00
|
|
|
|
|
|
|
<!-- - - - - - - - - - - - - - - - - -
|
|
|
|
target: properties
|
|
|
|
- - - - - - - - - - - - - - - - - -->
|
|
|
|
<target name="properties">
|
|
|
|
<!--
|
|
|
|
If calling from a Product build script, then this property
|
|
|
|
already points to the deploy.properties file of the Product.
|
|
|
|
-->
|
|
|
|
<property name="deploy.properties.file" location="config/deploy.properties" />
|
|
|
|
|
|
|
|
<fail message="You must create a "${deploy.properties.file}" file.">
|
|
|
|
<condition>
|
|
|
|
<not>
|
|
|
|
<available file="${deploy.properties.file}" />
|
|
|
|
</not>
|
|
|
|
</condition>
|
|
|
|
</fail>
|
|
|
|
|
|
|
|
<property file="${deploy.properties.file}" />
|
|
|
|
|
|
|
|
<fail unless="tomcat.home"
|
|
|
|
message="${deploy.properties.file} must contain a value for tomcat.home" />
|
|
|
|
<fail unless="webapp.name"
|
|
|
|
message="${deploy.properties.file} must contain a value for webapp.name" />
|
2011-04-04 16:35:22 +00:00
|
|
|
<fail unless="vitro.home.directory"
|
|
|
|
message="${deploy.properties.file} must contain a value for vitro.home.directory" />
|
2010-02-21 18:45:18 +00:00
|
|
|
<fail unless="Vitro.defaultNamespace"
|
|
|
|
message="${deploy.properties.file} must contain a value for Vitro.defaultNamespace" />
|
|
|
|
<fail unless="VitroConnection.DataSource.url"
|
|
|
|
message="${deploy.properties.file} must contain a value for VitroConnection.DataSource.url" />
|
|
|
|
<fail unless="VitroConnection.DataSource.username"
|
|
|
|
message="${deploy.properties.file} must contain a value for VitroConnection.DataSource.username" />
|
|
|
|
<fail unless="VitroConnection.DataSource.password"
|
|
|
|
message="${deploy.properties.file} must contain a value for VitroConnection.DataSource.password" />
|
2011-06-08 21:21:59 +00:00
|
|
|
<fail unless="rootUser.emailAddress"
|
|
|
|
message="${deploy.properties.file} must contain a value for rootUser.emailAddress" />
|
2010-02-21 18:45:18 +00:00
|
|
|
|
2011-07-11 18:32:46 +00:00
|
|
|
<fail message="The vitro.home.directory "${vitro.home.directory}" does not exist.">
|
|
|
|
<condition>
|
|
|
|
<not>
|
|
|
|
<available file="${vitro.home.directory}" />
|
|
|
|
</not>
|
|
|
|
</condition>
|
|
|
|
</fail>
|
|
|
|
|
|
|
|
<property name="solr.home" location="${vitro.home.directory}/solr" />
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<!-- =================================
|
|
|
|
target: clean
|
|
|
|
================================= -->
|
|
|
|
<target name="clean" depends="properties" description="--> Delete all artifacts.">
|
|
|
|
<delete dir="${build.dir}" />
|
|
|
|
<delete dir="${solr.home}" excludes="data/**/*" includeemptydirs="true" />
|
2010-02-21 18:45:18 +00:00
|
|
|
</target>
|
|
|
|
|
|
|
|
<!-- - - - - - - - - - - - - - - - - -
|
|
|
|
target: prepare
|
|
|
|
- - - - - - - - - - - - - - - - - -->
|
|
|
|
<target name="prepare" depends="properties">
|
|
|
|
<mkdir dir="${build.dir}" />
|
2010-08-03 18:53:55 +00:00
|
|
|
<mkdir dir="${war-classes.dir}" />
|
2010-10-25 21:29:25 +00:00
|
|
|
<mkdir dir="${war-resources.dir}" />
|
2010-08-03 18:53:55 +00:00
|
|
|
<mkdir dir="${test-classes.dir}" />
|
2010-02-21 18:45:18 +00:00
|
|
|
|
2010-08-03 18:53:55 +00:00
|
|
|
<!-- copy the themes into the war directory. -->
|
|
|
|
<copy todir="${war.dir}">
|
2010-02-21 18:45:18 +00:00
|
|
|
<fileset dir="${webapp.dir}/web">
|
|
|
|
<!--
|
|
|
|
If a product doesn't want the core themes, it can
|
|
|
|
set this property and they will be skipped.
|
|
|
|
-->
|
|
|
|
<exclude name="themes/**/*" if="skip.core.themes" />
|
|
|
|
</fileset>
|
|
|
|
</copy>
|
2010-01-29 22:13:57 +00:00
|
|
|
|
2010-08-03 18:53:55 +00:00
|
|
|
<!-- copy the config files into the war directory. -->
|
|
|
|
<copy todir="${war-webinf.dir}">
|
2010-02-21 18:45:18 +00:00
|
|
|
<fileset file="${webapp.dir}/config/web.xml" />
|
|
|
|
<fileset file="${webapp.dir}/config/dwr.xml" />
|
|
|
|
</copy>
|
2010-01-29 22:13:57 +00:00
|
|
|
|
2011-07-18 13:51:18 +00:00
|
|
|
<!-- copy the ontologies and the filegraphs into the war directory. -->
|
2010-08-03 18:53:55 +00:00
|
|
|
<copy todir="${war-webinf.dir}">
|
2010-04-30 14:02:49 +00:00
|
|
|
<fileset dir="${webapp.dir}" includes="ontologies" />
|
2010-03-29 16:23:00 +00:00
|
|
|
<fileset dir="${webapp.dir}" includes="ontologies/**/*" />
|
2011-07-18 13:51:18 +00:00
|
|
|
<fileset dir="${webapp.dir}" includes="filegraph" />
|
|
|
|
<fileset dir="${webapp.dir}" includes="filegraph/**/*" />
|
2010-03-29 16:23:00 +00:00
|
|
|
</copy>
|
|
|
|
|
2010-06-07 15:47:43 +00:00
|
|
|
<!-- use the production Log4J properties, unless a debug version exists. -->
|
|
|
|
<available file="${webapp.dir}/config/debug.log4j.properties"
|
|
|
|
property="debug.log4j.exists" />
|
2010-08-03 18:53:55 +00:00
|
|
|
<copy tofile="${war-classes.dir}/log4j.properties" filtering="true" overwrite="true">
|
2010-06-07 15:47:43 +00:00
|
|
|
<fileset dir="${webapp.dir}/config">
|
|
|
|
<include name="default.log4j.properties" unless="debug.log4j.exists" />
|
|
|
|
<include name="debug.log4j.properties" if="debug.log4j.exists" />
|
|
|
|
</fileset>
|
2010-02-21 18:45:18 +00:00
|
|
|
<filterchain>
|
|
|
|
<expandproperties />
|
|
|
|
</filterchain>
|
|
|
|
</copy>
|
|
|
|
|
2010-08-03 18:53:55 +00:00
|
|
|
<!-- copy the deploy.properties into the war directory -->
|
|
|
|
<copy todir="${war-classes.dir}">
|
2010-02-21 18:45:18 +00:00
|
|
|
<fileset file="${deploy.properties.file}" />
|
|
|
|
</copy>
|
|
|
|
|
2010-08-03 18:53:55 +00:00
|
|
|
<!-- copy the custom tag libraries into the war directory -->
|
|
|
|
<copy todir="${war-webinf.dir}/tlds">
|
2010-02-21 18:45:18 +00:00
|
|
|
<fileset dir="${webapp.dir}/config/tlds" includes="**/*" excludes="*.LCK" />
|
|
|
|
</copy>
|
|
|
|
|
2010-08-03 18:53:55 +00:00
|
|
|
<!-- copy any xml files from source tree to the war directory -->
|
2010-02-21 18:45:18 +00:00
|
|
|
<copy todir="${build.dir}/war/WEB-INF/classes">
|
|
|
|
<fileset dir="${webapp.dir}/src" includes="**/*.xml" />
|
|
|
|
</copy>
|
|
|
|
|
2010-08-03 18:53:55 +00:00
|
|
|
<!-- copy the JARs into the war directory -->
|
|
|
|
<copy todir="${war-lib.dir}">
|
2010-02-21 18:45:18 +00:00
|
|
|
<fileset dir="${webapp.dir}/lib">
|
2010-08-03 18:53:55 +00:00
|
|
|
<!-- these are already in Tomcat: we mustn't conflict. -->
|
2010-02-21 18:45:18 +00:00
|
|
|
<exclude name="jsp-api.jar" />
|
|
|
|
<exclude name="servlet-api.jar" />
|
|
|
|
</fileset>
|
|
|
|
</copy>
|
|
|
|
|
2010-08-03 18:53:55 +00:00
|
|
|
<!-- copy the servlet JARs into their own directory, to compile against. -->
|
|
|
|
<copy todir="${servletjars.dir}">
|
|
|
|
<fileset dir="${webapp.dir}/lib">
|
|
|
|
<include name="jsp-api.jar" />
|
|
|
|
<include name="servlet-api.jar" />
|
|
|
|
</fileset>
|
|
|
|
</copy>
|
|
|
|
|
|
|
|
<!-- copy the context file into the war directory -->
|
|
|
|
<copy file="${webapp.dir}/context.xml" tofile="${war.dir}/META-INF/context.xml" />
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<!-- =================================
|
|
|
|
target: compile
|
|
|
|
================================= -->
|
|
|
|
<target name="compile" depends="prepare" description="--> Compile Java sources">
|
|
|
|
<!-- deletes all files that depend on changed .java files -->
|
|
|
|
<depend srcdir="${webapp.dir}/src"
|
|
|
|
destdir="${war-classes.dir}"
|
|
|
|
closure="false"
|
|
|
|
cache="${build.dir}/.depcache">
|
|
|
|
<classpath refid="compile.classpath" />
|
|
|
|
</depend>
|
|
|
|
|
|
|
|
<javac srcdir="${webapp.dir}/src"
|
|
|
|
destdir="${war-classes.dir}"
|
|
|
|
debug="true"
|
2011-04-22 16:40:49 +00:00
|
|
|
deprecation="${javac.deprecation}"
|
2010-12-15 17:07:49 +00:00
|
|
|
encoding="UTF8"
|
2011-07-11 18:32:46 +00:00
|
|
|
includeantruntime="false"
|
2010-08-03 18:53:55 +00:00
|
|
|
optimize="true"
|
|
|
|
source="1.6">
|
|
|
|
<classpath refid="compile.classpath" />
|
|
|
|
</javac>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<!-- =================================
|
|
|
|
target: test
|
|
|
|
================================= -->
|
|
|
|
<target name="test" depends="compile" unless="skiptests" description="--> Run JUnit tests">
|
|
|
|
<javac srcdir="${webapp.dir}/test"
|
|
|
|
destdir="${test-classes.dir}"
|
|
|
|
debug="true"
|
2011-04-22 16:40:49 +00:00
|
|
|
deprecation="${javac.deprecation}"
|
2010-12-15 17:07:49 +00:00
|
|
|
encoding="UTF8"
|
2011-07-11 18:32:46 +00:00
|
|
|
includeantruntime="false"
|
2010-08-03 18:53:55 +00:00
|
|
|
optimize="false"
|
|
|
|
source="1.6">
|
|
|
|
<classpath refid="test.compile.classpath" />
|
|
|
|
</javac>
|
|
|
|
|
|
|
|
<java classname="edu.cornell.mannlib.vitro.testing.VitroTestRunner"
|
|
|
|
fork="yes"
|
|
|
|
failonerror="true">
|
|
|
|
<classpath refid="test.run.classpath" />
|
|
|
|
<arg file="${webapp.dir}/test" />
|
|
|
|
<arg value="${testlevel}" />
|
|
|
|
</java>
|
2010-01-29 22:13:57 +00:00
|
|
|
</target>
|
|
|
|
|
2010-10-22 15:13:06 +00:00
|
|
|
<!-- =================================
|
|
|
|
target: revisionInfo
|
|
|
|
================================= -->
|
2011-07-11 18:32:46 +00:00
|
|
|
<target name="revisionInfo"
|
|
|
|
depends="test"
|
|
|
|
unless="skipinfo"
|
|
|
|
description="--> Store revision info in build">
|
2010-10-22 15:13:06 +00:00
|
|
|
<property name="revisionInfo.product.dir" location="${ant.file.vitroCore}/.." />
|
2010-10-25 21:29:25 +00:00
|
|
|
<property name="revisionInfo.build.file" location="${war-resources.dir}/revisionInfo.txt" />
|
2010-10-22 15:13:06 +00:00
|
|
|
|
|
|
|
<delete file="${revisionInfo.build.file}" />
|
|
|
|
|
|
|
|
<tstamp>
|
|
|
|
<format property="revisionInfo.timestamp" pattern="yyyy-MM-dd HH:mm:ss" />
|
|
|
|
</tstamp>
|
|
|
|
<echo file="${revisionInfo.build.file}">${revisionInfo.timestamp}
|
|
|
|
</echo>
|
|
|
|
|
|
|
|
<javac srcdir="${webapp.dir}/../utilities/buildutils/revisioninfo"
|
|
|
|
destdir="${test-classes.dir}"
|
|
|
|
debug="true"
|
2011-04-22 16:40:49 +00:00
|
|
|
deprecation="${javac.deprecation}"
|
2010-12-15 17:07:49 +00:00
|
|
|
encoding="UTF8"
|
2011-07-11 18:32:46 +00:00
|
|
|
includeantruntime="false"
|
2010-10-22 15:13:06 +00:00
|
|
|
optimize="false"
|
|
|
|
source="1.6">
|
|
|
|
</javac>
|
|
|
|
|
|
|
|
<java classname="edu.cornell.mannlib.vitro.utilities.revisioninfo.RevisionInfoBuilder"
|
|
|
|
fork="no"
|
2011-02-11 21:55:15 +00:00
|
|
|
failonerror="true">
|
2010-10-22 15:13:06 +00:00
|
|
|
<classpath refid="test.run.classpath" />
|
|
|
|
<arg value="${ant.project.name}" />
|
|
|
|
<arg file="${revisionInfo.product.dir}" />
|
2011-02-11 21:55:15 +00:00
|
|
|
<arg file="${revisionInfo.build.file}" />
|
2010-10-22 15:13:06 +00:00
|
|
|
</java>
|
|
|
|
</target>
|
|
|
|
|
2011-07-11 18:32:46 +00:00
|
|
|
<!-- - - - - - - - - - - - - - - - - -
|
|
|
|
target: prepareSolr
|
|
|
|
- - - - - - - - - - - - - - - - - -->
|
|
|
|
<target name="prepareSolr" depends="properties">
|
|
|
|
<property name="solr.distrib.dir" location="${webapp.dir}/../solr" />
|
|
|
|
<property name="solr.example.dir" location="${solr.distrib.dir}/exampleSolr" />
|
|
|
|
<property name="solr.context.config.example"
|
|
|
|
location="${solr.distrib.dir}/exampleSolrContext.xml" />
|
|
|
|
<property name="solr.war" location="${solr.distrib.dir}/apache-solr-3.1.0.war" />
|
|
|
|
|
|
|
|
<property name="solr.docbase" location="${solr.home}/solr.war" />
|
|
|
|
<property name="solr.context.name" value="${webapp.name}solr" />
|
|
|
|
<property name="solr.context.config" location="${solr.home}/${solr.context.name}.xml" />
|
|
|
|
|
|
|
|
<!-- Create and copy the example directory to the solr.home directory. -->
|
|
|
|
<mkdir dir="${solr.home}" />
|
|
|
|
<copy todir="${solr.home}">
|
|
|
|
<fileset dir="${solr.example.dir}" includes="**/*" />
|
|
|
|
</copy>
|
|
|
|
|
|
|
|
<!-- Add the war file. -->
|
|
|
|
<copy tofile="${solr.docbase}">
|
|
|
|
<fileset file="${solr.war}" />
|
|
|
|
</copy>
|
2011-07-13 17:18:49 +00:00
|
|
|
<war destfile="${solr.docbase}" update="true">
|
|
|
|
<classes dir="${webapp.dir}/config/solr/" />
|
|
|
|
</war>
|
2011-07-11 18:32:46 +00:00
|
|
|
|
2011-07-13 21:32:50 +00:00
|
|
|
<!-- if no mask is define, go with an unsecured installation. -->
|
|
|
|
<property name="vitro.local.solr.ipaddress.mask" value=".*" />
|
|
|
|
|
2011-07-11 18:32:46 +00:00
|
|
|
<!-- Create the context configuration XML with expanded properties. -->
|
|
|
|
<copy tofile="${solr.context.config}" filtering="true">
|
|
|
|
<fileset file="${solr.context.config.example}" />
|
|
|
|
<filterchain>
|
|
|
|
<expandproperties />
|
|
|
|
</filterchain>
|
|
|
|
</copy>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<!-- - - - - - - - - - - - - - - - - -
|
|
|
|
target: deploySolr
|
|
|
|
- - - - - - - - - - - - - - - - - -->
|
|
|
|
<target name="deploySolr" depends="prepareSolr" unless="noSolrDeploy">
|
2011-07-14 15:14:41 +00:00
|
|
|
<unwar src="${solr.docbase}" dest="${tomcat.home}/webapps/${solr.context.name}" />
|
2011-07-13 17:18:49 +00:00
|
|
|
<copy todir="${tomcat.home}/conf/Catalina/localhost" overwrite="true" >
|
2011-07-11 18:32:46 +00:00
|
|
|
<fileset file="${solr.context.config}" />
|
|
|
|
</copy>
|
|
|
|
</target>
|
|
|
|
|
2010-02-21 18:45:18 +00:00
|
|
|
<!-- =================================
|
|
|
|
target: deploy
|
|
|
|
================================= -->
|
2010-10-22 15:13:06 +00:00
|
|
|
<target name="deploy"
|
2011-07-11 18:32:46 +00:00
|
|
|
depends="revisionInfo, deploySolr"
|
2010-10-22 15:13:06 +00:00
|
|
|
description="--> Build the app and install in Tomcat">
|
2010-02-21 18:45:18 +00:00
|
|
|
<property name="webapp.deploy.home" value="${tomcat.home}/webapps/${webapp.name}" />
|
|
|
|
|
|
|
|
<mkdir dir="${webapp.deploy.home}" />
|
|
|
|
|
2010-08-03 18:53:55 +00:00
|
|
|
<sync todir="${webapp.deploy.home}" includeemptydirs="true">
|
2010-02-21 18:45:18 +00:00
|
|
|
<fileset dir="${build.dir}/war" />
|
2010-06-01 19:58:17 +00:00
|
|
|
</sync>
|
2010-02-21 18:45:18 +00:00
|
|
|
</target>
|
2011-07-11 18:32:46 +00:00
|
|
|
|
2011-03-03 15:53:41 +00:00
|
|
|
<!-- =================================
|
|
|
|
target: war
|
|
|
|
================================= -->
|
2011-07-11 18:32:46 +00:00
|
|
|
<target name="war" depends="revisionInfo" description="--> Build the app and create a WAR file">
|
|
|
|
<jar basedir="${build.dir}/war" destfile="${build.dir}/${webapp.name}.war" />
|
2011-03-03 15:53:41 +00:00
|
|
|
</target>
|
2010-01-29 22:13:57 +00:00
|
|
|
|
2010-04-15 20:20:14 +00:00
|
|
|
<!-- =================================
|
|
|
|
target: licenser
|
|
|
|
|
|
|
|
In regular use, checks that all appropriate source files have license tags.
|
|
|
|
At release time, applies license text to source files.
|
|
|
|
================================= -->
|
|
|
|
<target name="licenser" description="--> Check source files for licensing tags">
|
|
|
|
<property name="licenser.properties.file"
|
|
|
|
location="${webapp.dir}/config/licenser/licenser.properties" />
|
|
|
|
<property name="licenser.label" value="Vitro core" />
|
|
|
|
|
|
|
|
<echo message="Checking license tags on ${licenser.label}" />
|
|
|
|
|
|
|
|
<exec executable="ruby" dir="${webapp.dir}/../utilities/licenser" failonerror="true">
|
|
|
|
<arg value="licenser.rb" />
|
|
|
|
<arg value="${licenser.properties.file}" />
|
|
|
|
<redirector outputproperty="licenser.test.output" alwayslog="true" />
|
|
|
|
</exec>
|
|
|
|
</target>
|
2010-06-02 20:30:17 +00:00
|
|
|
|
2010-01-29 22:13:57 +00:00
|
|
|
</project>
|