Moved Spring Web Flow to a top level project
This commit is contained in:
11
common-build/.cvsignore
Normal file
11
common-build/.cvsignore
Normal file
@@ -0,0 +1,11 @@
|
||||
build.properties
|
||||
*.jpx.local*
|
||||
*.log
|
||||
*.iws
|
||||
*.tws
|
||||
target
|
||||
dist
|
||||
gen-src
|
||||
bak
|
||||
mimedata
|
||||
ivy-cache
|
||||
11
common-build/.project
Normal file
11
common-build/.project
Normal file
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>common-build</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
</natures>
|
||||
</projectDescription>
|
||||
82
common-build/clover-targets.xml
Normal file
82
common-build/clover-targets.xml
Normal file
@@ -0,0 +1,82 @@
|
||||
<?xml version="1.0"?>
|
||||
|
||||
<!--
|
||||
Copyright 2002-2005 the original author or authors.
|
||||
|
||||
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.
|
||||
|
||||
- - -
|
||||
Author: Colin Sampaleanu
|
||||
Author: Keith Donald
|
||||
|
||||
Ant XML fragment that contains useful targets for working with clover. These
|
||||
include targets to instrument (cloverize) project code, execute tests with clover,
|
||||
and produce test coverage reports.
|
||||
|
||||
This ant XML fragment is meant to be imported into a project build file, along with
|
||||
common-targets.xml. This is an optional module, and due to the way the ant import works,
|
||||
there is no way to automatically hook this up into the build. The importing project
|
||||
must override appropropriate 'hook' targets from common-targets.xml, and then have
|
||||
the override targets depend on both the targets from common-targets and those from here.
|
||||
|
||||
Note, for clover to work:
|
||||
- Make sure clover.jar and cenquatasks.jar is in your ant lib directory.
|
||||
- Make sure clover.jar is expressed as a test dependency for your project.
|
||||
-->
|
||||
|
||||
<project name="clover-targets" xmlns:ivy="antlib:fr.jayasoft.ivy.ant">
|
||||
|
||||
<import file="common-targets.xml" />
|
||||
|
||||
<target name="clover.tasks" depends="retrieve">
|
||||
<taskdef resource="com/cenqua/ant/antlib.xml" classpath="${test.classpath}" />
|
||||
<taskdef resource="clovertasks" classpath="${test.classpath}" />
|
||||
</target>
|
||||
|
||||
<target name="-check.clover" depends="clover.tasks">
|
||||
<available property="clover.installed" classname="com.cenqua.clover.CloverInstr" />
|
||||
</target>
|
||||
|
||||
<target name="guard.noclover" depends="-check.clover" unless="clover.installed">
|
||||
<fail message="The target you are attempting to run requires Clover, which doesn't appear" />
|
||||
</target>
|
||||
|
||||
<target name="clover.init" depends="guard.noclover">
|
||||
<property name="target.clover.dir" value="${target.dir}/clover" />
|
||||
<mkdir dir="${target.clover.dir}" />
|
||||
<clover-setup initstring="${target.clover.dir}/coverage.db" tmpdir="${target.clover.dir}" preserve="true">
|
||||
<fileset dir="${src.java.main.dir}">
|
||||
<include name="**/*.java" />
|
||||
</fileset>
|
||||
</clover-setup>
|
||||
</target>
|
||||
|
||||
<target name="clover.instrument" depends="clover.init, compile" />
|
||||
|
||||
<target name="clover-report" depends="clover.instrument, tests-local" description="Produce a test coverage report">
|
||||
<clover-report>
|
||||
<current outfile="${target.clover.dir}/html">
|
||||
<format type="html" />
|
||||
</current>
|
||||
</clover-report>
|
||||
</target>
|
||||
|
||||
<target name="clover-summary" depends="clover.instrument, tests-local" description="Produce a test coverage summary">
|
||||
<clover-report>
|
||||
<current summary="yes" outfile="${target.clover.dir}/coverage.pdf">
|
||||
<format type="pdf" />
|
||||
</current>
|
||||
</clover-report>
|
||||
</target>
|
||||
|
||||
</project>
|
||||
928
common-build/common-targets.xml
Normal file
928
common-build/common-targets.xml
Normal file
@@ -0,0 +1,928 @@
|
||||
<?xml version="1.0"?>
|
||||
|
||||
<!--
|
||||
|
||||
Copyright 2003-2005 the original author or authors.
|
||||
|
||||
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.
|
||||
|
||||
- - -
|
||||
Author: Colin Sampaleanu
|
||||
- - -
|
||||
-->
|
||||
|
||||
<project name="common-targets" xmlns:ivy="antlib:fr.jayasoft.ivy.ant">
|
||||
|
||||
<!-- try to load ivy here from local lib dir, in case the user has not already dropped
|
||||
it into ant's lib dir (note that the latter copy will always take precedence).
|
||||
We will not fail as long as local lib dir exists (it may be empty) and
|
||||
ivy is in at least one of ant's lib dir or the local lib dir. -->
|
||||
<path id="ivy.lib.path">
|
||||
<fileset dir="${common.build.dir}/lib" includes="*.jar"/>
|
||||
</path>
|
||||
<taskdef resource="fr/jayasoft/ivy/ant/antlib.xml"
|
||||
uri="antlib:fr.jayasoft.ivy.ant" classpathref="ivy.lib.path"/>
|
||||
|
||||
<!-- targets: displays all targets suitable for developer use -->
|
||||
<target name="targets" depends="init">
|
||||
<echo>
|
||||
ANT build for ${project.name} ${project.version}.
|
||||
|
||||
Please execute:
|
||||
ant -projecthelp
|
||||
or
|
||||
ant -p
|
||||
to see a list of publically executable targets.
|
||||
</echo>
|
||||
</target>
|
||||
|
||||
<!--
|
||||
init: initializes some common settings
|
||||
-->
|
||||
<target name="init" unless="init.done" depends="force.env.load,
|
||||
init.cl.external.props,
|
||||
init.env.external.props,
|
||||
init.pre,
|
||||
init.post,
|
||||
init.post2">
|
||||
|
||||
</target>
|
||||
|
||||
<target name="init.pre">
|
||||
|
||||
<!-- we default project.version to be ${project.base.version}-${build.timestamp}
|
||||
where project.base.version defaults to 1.0-dev.
|
||||
|
||||
An importing project or master build should override project.base.version.
|
||||
For a release build which doesn't need the build timestamp, should override
|
||||
project.version itself to just be equal to ${project.base.version} -->
|
||||
<tstamp>
|
||||
<format property="build.timestamp" pattern="yyyyMMddHHmmss" />
|
||||
</tstamp>
|
||||
<tstamp>
|
||||
<format property="TSTAMPCOL" pattern="hh:mm" />
|
||||
</tstamp>
|
||||
|
||||
<property name="ivy.conf.dir" value="${common.build.dir}" />
|
||||
|
||||
<property name="org.name" value="springframework.org" />
|
||||
<property name="org.package.prefix" value="org.springframework" />
|
||||
<property name="project.name" value="${ant.project.name}" />
|
||||
<property name="project.webapp.name" value="${ant.project.name}" />
|
||||
<property name="project.title" value="${project.name}" />
|
||||
<property name="project.base.version" value="1.0-dev" />
|
||||
<property name="project.version" value="${project.base.version}-${build.timestamp}" />
|
||||
<property name="project.copyright" value="Copyright © 2002-2006. All Rights Reserved."/>
|
||||
|
||||
<property environment="myenv" />
|
||||
|
||||
<!-- Compiler options -->
|
||||
<property name="optimize" value="false" />
|
||||
<property name="debug" value="true" />
|
||||
<property name="deprecation" value="false" />
|
||||
<property name="javac.source" value="1.3" />
|
||||
<property name="javac.target" value="1.3" />
|
||||
|
||||
<!-- vm to use for unit tests, will not override if already set -->
|
||||
<!-- set to a dummy default val which will be ignored if already set -->
|
||||
<property name="unitvm" value="-DzzzDummyVal" />
|
||||
|
||||
<echo message='org.name = "${org.name}"' />
|
||||
<echo message='org.package.prefix = "${org.package.prefix}"' />
|
||||
<echo message='project.name = "${project.name}"' />
|
||||
<echo message='project.webapp.name = "${project.webapp.name}"' />
|
||||
<echo message='project.title = "${project.title}"' />
|
||||
<echo message='project.base.version = "${project.base.version}"' />
|
||||
<echo message='project.version = "${project.version}"' />
|
||||
<echo message='ant.file = "${ant.file}"' />
|
||||
<echo message='basedir = "${basedir}"' />
|
||||
<echo message='user.dir = "${user.dir}"' />
|
||||
<echo message='ant.java.version = "${ant.java.version}"' />
|
||||
<echo message='debug = "${debug}"' />
|
||||
<echo message='optimize = "${optimize}"' />
|
||||
<echo message='javac.source = "${javac.source}"' />
|
||||
<echo message='javac.target = "${javac.target}"' />
|
||||
<echo message='target.appserver = "${target.appserver}"' />
|
||||
<echo message='unit test vm: vm arg="${unitvm}"' />
|
||||
</target>
|
||||
|
||||
<target name="init.post" depends="eclipse.configure">
|
||||
|
||||
<!-- set target appserver, default to UNDEFINED. A project should override this
|
||||
if it actually needs to use appserver specific properties -->
|
||||
<property name="target.appserver" value="UNDEFINED" />
|
||||
|
||||
<!-- by default we filter certain file types on copying -->
|
||||
<patternset id="std.files.to.filter">
|
||||
<include name="**/*.xml" />
|
||||
<include name="**/*.properties" />
|
||||
<include name="**/*.conf" />
|
||||
<include name="**/*.sql" />
|
||||
<include name="**/*.txt" />
|
||||
<include name="**/*.email" />
|
||||
<include name="**/*.html" />
|
||||
<include name="**/*.htm" />
|
||||
</patternset>
|
||||
|
||||
<patternset id="std.files.not.to.filter">
|
||||
<exclude name="**/*.xml" />
|
||||
<exclude name="**/*.properties" />
|
||||
<exclude name="**/*.conf" />
|
||||
<exclude name="**/*.sql" />
|
||||
<exclude name="**/*.txt" />
|
||||
<exclude name="**/*.email" />
|
||||
<exclude name="**/*.html" />
|
||||
<exclude name="**/*.htm" />
|
||||
</patternset>
|
||||
|
||||
<patternset id="web.public.content.files">
|
||||
<patternset refid="image.files" />
|
||||
<patternset refid="html.files" />
|
||||
<include name="index.jsp" />
|
||||
<include name="**/*.js" />
|
||||
<exclude name="WEB-INF/**" />
|
||||
</patternset>
|
||||
|
||||
<patternset id="image.files">
|
||||
<include name="**/*.png" />
|
||||
<include name="**/*.gif" />
|
||||
<include name="**/*.jpg" />
|
||||
</patternset>
|
||||
|
||||
<patternset id="html.files">
|
||||
<include name="**/*.html" />
|
||||
<include name="**/*.htm" />
|
||||
<include name="**/*.css" />
|
||||
</patternset>
|
||||
|
||||
<patternset id="web.protected.content.files">
|
||||
<patternset refid="scriptlet.files" />
|
||||
<patternset refid="web.config.files" />
|
||||
</patternset>
|
||||
|
||||
<patternset id="scriptlet.files">
|
||||
<include name="**/*.jsp" />
|
||||
<include name="**/*.vm" />
|
||||
</patternset>
|
||||
|
||||
<patternset id="web.config.files">
|
||||
<include name="WEB-INF/classes/**/*.xml" />
|
||||
<include name="WEB-INF/classes/**/*.properties" />
|
||||
<include name="WEB-INF/classes/**/*.txt" />
|
||||
<include name="WEB-INF/classes/**/*.conf" />
|
||||
</patternset>
|
||||
|
||||
<property name="target.lib.dir" value="${target.artifacts.dir}/lib" />
|
||||
<property name="project.war" value="${target.artifacts.war.dir}/${project.webapp.name}.war" />
|
||||
|
||||
<!-- convert appserver specific properties to final property names -->
|
||||
<echoproperties destfile="properties.tmp">
|
||||
<propertyset id="appserver.specific.properties">
|
||||
<propertyref prefix="${target.appserver}" />
|
||||
<mapper type="glob" from="${target.appserver}.*" to="*" />
|
||||
</propertyset>
|
||||
</echoproperties>
|
||||
<loadproperties srcFile="properties.tmp" />
|
||||
<delete file="properties.tmp" />
|
||||
|
||||
</target>
|
||||
|
||||
<target name="init.post2">
|
||||
|
||||
<path id="compile.classpath">
|
||||
<fileset dir="${lib.dir}/global">
|
||||
<include name="**/*.jar" />
|
||||
</fileset>
|
||||
<fileset dir="${lib.dir}/buildtime">
|
||||
<include name="**/*.jar" />
|
||||
</fileset>
|
||||
</path>
|
||||
|
||||
<path id="test.classpath">
|
||||
<path refid="compile.classpath" />
|
||||
<fileset dir="${lib.dir}/test">
|
||||
<include name="**/*.jar" />
|
||||
</fileset>
|
||||
</path>
|
||||
|
||||
<property name="init.done" value="true" />
|
||||
|
||||
</target>
|
||||
|
||||
<!-- used to assist loading of properties from environment -->
|
||||
<target name="force.env.load">
|
||||
<property environment="myenv" />
|
||||
</target>
|
||||
|
||||
<!-- targets which allow loading a command line or env specified external properties file -->
|
||||
<target name="init.cl.external.props" if="build.prop.file">
|
||||
<property environment="myenv" />
|
||||
<echo message='loading external prop file: ${build.prop.file}' />
|
||||
<property file="${build.prop.file}" />
|
||||
</target>
|
||||
|
||||
<target name="init.env.external.props" if="myenv.STUB.BUILD.PROP.FILE">
|
||||
<property environment="myenv" />
|
||||
<property file="${myenv.STUB.BUILD.PROP.FILE}" />
|
||||
<echo message='loading external prop file: ${myenv.STUB.BUILD.PROP.FILE}' />
|
||||
</target>
|
||||
|
||||
<!-- check.for.optional.packages: -->
|
||||
<!-- Check to see what optional dependencies are available -->
|
||||
<target name="check.for.optional.packages">
|
||||
<available property="jdk1.2+" classname="java.lang.ThreadLocal" />
|
||||
<available property="jdk1.3+" classname="java.lang.StrictMath" />
|
||||
<available property="xalan.present" classname="org.apache.xalan.xslt.XSLTProcessorFactory" />
|
||||
<available property="junit.present" classname="junit.framework.TestCase" />
|
||||
|
||||
<!-- compiler value may be 'modern', 'classic', or 'jikes' -->
|
||||
<!-- will do nothing if it has already been set for eclipse -->
|
||||
<property name="build.compiler" value="modern" />
|
||||
|
||||
</target>
|
||||
|
||||
<!-- needed so this build can be run properly from Eclipse -->
|
||||
<target name="eclipse.configure" if="eclipse.running">
|
||||
<property name="build.compiler" value="org.eclipse.jdt.core.JDTCompilerAdapter" />
|
||||
<echo message="Configuring compiler for Eclipse..." />
|
||||
</target>
|
||||
|
||||
<!-- clean: Cleans up generated stuff -->
|
||||
<target name="clean" depends="init" description="Scrub build, distribution, and test results directories">
|
||||
<delete dir="${target.dir}" />
|
||||
<!-- also clean up dist.dir, in case it is not under target.dir -->
|
||||
<delete dir="${dist.dir}" />
|
||||
</target>
|
||||
|
||||
<!-- clean-all: Also cleans lib dir stuff pulled down by ivy -->
|
||||
<target name="clean-all" depends="clean" description="Calls clean, but also cleans lib dir dependencies pulled down by Ivy">
|
||||
<delete dir="${lib.dir}" />
|
||||
</target>
|
||||
|
||||
<!-- build.prepare: Prepares the build directory -->
|
||||
<target name="build.prepare" unless="build.prepare.done" depends="init, check.for.optional.packages">
|
||||
<tstamp />
|
||||
|
||||
<!-- set up dirs that we need -->
|
||||
<antcall target="build.prepare.make.config.dirs" />
|
||||
|
||||
<mkdir dir="${target.dir}" />
|
||||
<mkdir dir="${target.gen.java.dir}" />
|
||||
<mkdir dir="${target.gen.java.test.dir}" />
|
||||
<mkdir dir="${target.testresults.dir}" />
|
||||
<mkdir dir="${target.classes.dir}" />
|
||||
<mkdir dir="${target.testclasses.dir}" />
|
||||
|
||||
<!-- now we want to create/update file used for filter properties. Other parts of the
|
||||
build can also write properties to this file. Note that we also do some work to put
|
||||
out test results dir in UNIX format since it will go in the log4j.properties file -->
|
||||
<copy file="${src.etc.dir}/filter.properties" overwrite="true" tofile="${target.filter.file}" failonerror="false" />
|
||||
<path id="target.testresults.dir.path" location="${target.testresults.dir}" />
|
||||
<pathconvert targetos="unix" property="target.testresults.dir.unix" refid="target.testresults.dir.path" />
|
||||
<propertyfile file="${target.filter.file}">
|
||||
<entry key="PROJECT_NAME" value="${project.name}" />
|
||||
<entry key="TEST_RESULTS_DIR" value="${target.testresults.dir.unix}" />
|
||||
<entry key="DATABASE_DRIVER" value="${database.driver}" />
|
||||
<entry key="DATABASE_URL" value="${database.url}" />
|
||||
<entry key="DATABASE_SCHEMA" value="${database.schema}" />
|
||||
<entry key="DATABASE_USERNAME" value="${database.username}" />
|
||||
<entry key="DATABASE_PASSWORD" value="${database.password}" />
|
||||
<entry key="DATA_DIR" value="${data.dir}" />
|
||||
</propertyfile>
|
||||
<property name="build.prepare.done" value="true" />
|
||||
</target>
|
||||
|
||||
<target name="build.prepare.make.config.dirs">
|
||||
<mkdir dir="${lib.dir}/global" />
|
||||
<mkdir dir="${lib.dir}/buildtime" />
|
||||
<mkdir dir="${lib.dir}/test" />
|
||||
</target>
|
||||
|
||||
<target name="ivy.configure" depends="init">
|
||||
<echo>reading ivy config</echo>
|
||||
<ivy:configure file="${ivy.conf.dir}/ivyconf.xml" />
|
||||
</target>
|
||||
|
||||
<presetdef name="resolve.conf">
|
||||
<ivy:resolve file="${basedir}/ivy.xml" conf="${conf}" />
|
||||
</presetdef>
|
||||
<presetdef name="resolve.all">
|
||||
<ivy:resolve file="${basedir}/ivy.xml" conf="*" />
|
||||
</presetdef>
|
||||
|
||||
<!-- presetdef to retrieve one or more confs, defaulting to "default" -->
|
||||
<presetdef name="retrieve.conf">
|
||||
<ivy:retrieve pattern="${ivy.retrieve.pattern}" conf="default" />
|
||||
</presetdef>
|
||||
<presetdef name="retrieve.all">
|
||||
<ivy:retrieve pattern="${${ivy.retrieve.pattern}}" conf="*" />
|
||||
</presetdef>
|
||||
|
||||
<target name="retrieve.all" depends="resolve.all">
|
||||
<retrieve.all />
|
||||
</target>
|
||||
|
||||
<target name="resolve.conf" depends="ivy.configure">
|
||||
<resolve.conf />
|
||||
</target>
|
||||
|
||||
<target name="resolve.all" depends="ivy.configure">
|
||||
<resolve.all />
|
||||
</target>
|
||||
|
||||
<!-- resolve: resolve dependencies -->
|
||||
<target name="resolve" depends="build.prepare, ivy.configure, resolve.pre, resolve.main, resolve.post" />
|
||||
<target name="resolve.pre" />
|
||||
<target name="resolve.main">
|
||||
<property name="main.build.configs" value="global,buildtime,test" />
|
||||
<resolve.conf conf="${main.build.configs}" />
|
||||
</target>
|
||||
<target name="resolve.post" />
|
||||
|
||||
<!-- retrieve: retrieve dependencies -->
|
||||
<target name="retrieve" depends="resolve, retrieve.pre, retrieve.main, retrieve.post"
|
||||
description="Retrieve all declared dependencies into the lib dir" />
|
||||
<target name="retrieve.pre" />
|
||||
<target name="retrieve.main">
|
||||
<!-- when we retrieve with revision numbers in jar names, we really have to kill the
|
||||
retrieve dir so we don't get multiple snapshot versions -->
|
||||
<antcall target="clear.lib.dir.before.retrieve" />
|
||||
<retrieve.conf conf="${main.build.configs}" />
|
||||
</target>
|
||||
<target name="retrieve.post" />
|
||||
|
||||
<target name="clear.lib.dir.before.retrieve" if="clear.libs.before.retrieve">
|
||||
<delete dir="${lib.dir}" />
|
||||
<antcall target="build.prepare.make.config.dirs" />
|
||||
</target>
|
||||
|
||||
<!-- retrieve target to pull down deps and ivys to some location, used for building repos -->
|
||||
<target name="retrieve-to-repo" depends="resolve">
|
||||
<property name="retrieve.to.repo.conf" value="*" />
|
||||
<property name="retrieve.to.repo.dir" value="${target.dir}/repo" />
|
||||
<property name="retrieve.to.repo.pattern"
|
||||
value="[organisation]/[module]/[type]s/[artifact]-[revision].[ext]" />
|
||||
<property name="retrieve.to.repo.pattern.ivy"
|
||||
value="[organisation]/[module]/ivy-[revision].xml" />
|
||||
<retrieve.conf conf="${retrieve.to.repo.conf}"
|
||||
pattern="${retrieve.to.repo.dir}/${retrieve.to.repo.pattern}"
|
||||
ivypattern="${retrieve.to.repo.dir}/${retrieve.to.repo.pattern.ivy}"/>
|
||||
</target>
|
||||
|
||||
<!-- statics: copies statics files before compiles -->
|
||||
<target name="statics" depends="retrieve, ivy.configure, statics.pre, statics.main, statics.test, statics.web, statics.post" description="Copy static files before compile, replacing tokens as needed">
|
||||
</target>
|
||||
|
||||
<!-- hook target -->
|
||||
<target name="statics.pre" />
|
||||
|
||||
<!-- copy main statics -->
|
||||
<target name="statics.main">
|
||||
<mkdir dir="${target.artifacts.dir}" />
|
||||
|
||||
<!-- copy everything from the source dir, except java and javadoc files. Do not filter. Files that need filtering should go in resources. -->
|
||||
<copy todir="${target.classes.dir}">
|
||||
<fileset dir="${src.java.main.dir}">
|
||||
<exclude name="**/*.java" />
|
||||
<exclude name="**/package.html"/>
|
||||
<exclude name="**/overview.html"/>
|
||||
</fileset>
|
||||
</copy>
|
||||
|
||||
<!-- copy resource files if neccessary, filtering for non-binary types -->
|
||||
<available file="${src.resources.dir}" property="resources.exists" />
|
||||
<antcall target="copy.resources" />
|
||||
</target>
|
||||
|
||||
<target name="copy.resources" if="resources.exists">
|
||||
<copy todir="${target.classes.dir}" filtering="on">
|
||||
<fileset dir="${src.resources.dir}">
|
||||
<patternset refid="std.files.to.filter" />
|
||||
</fileset>
|
||||
<filterset>
|
||||
<filtersfile file="${target.filter.file}" />
|
||||
</filterset>
|
||||
</copy>
|
||||
<copy todir="${target.classes.dir}">
|
||||
<fileset dir="${src.resources.dir}">
|
||||
<patternset refid="std.files.not.to.filter" />
|
||||
</fileset>
|
||||
</copy>
|
||||
</target>
|
||||
|
||||
<!-- copy test statics -->
|
||||
<target name="statics.test">
|
||||
|
||||
<!-- copy everything from the source dir, except java files. Do not filter. Files
|
||||
that need filtering should source from ${src.test.resources.dir} -->
|
||||
<copy todir="${target.testclasses.dir}">
|
||||
<fileset dir="${src.java.test.dir}">
|
||||
<exclude name="**/*.java" />
|
||||
</fileset>
|
||||
</copy>
|
||||
|
||||
<!-- copy test resource files if neccessary, filtering for non-binary types -->
|
||||
<available file="${src.test.resources.dir}" property="test.resources.exists" />
|
||||
<antcall target="copy.test.resources" />
|
||||
|
||||
<!-- write out a test.properties file with common properties -->
|
||||
<propertyfile file="${target.testclasses.dir}/test.properties" comment="Common unit/integration test properties">
|
||||
<entry key="lastupdate" type="date" value="now" />
|
||||
</propertyfile>
|
||||
|
||||
</target>
|
||||
|
||||
<target name="copy.test.resources" if="test.resources.exists">
|
||||
<copy todir="${target.testclasses.dir}" filtering="on">
|
||||
<fileset dir="${src.test.resources.dir}">
|
||||
<patternset refid="std.files.to.filter" />
|
||||
</fileset>
|
||||
<filterset>
|
||||
<filtersfile file="${target.filter.file}" />
|
||||
</filterset>
|
||||
</copy>
|
||||
|
||||
<copy todir="${target.testclasses.dir}">
|
||||
<fileset dir="${src.test.resources.dir}">
|
||||
<patternset refid="std.files.not.to.filter" />
|
||||
</fileset>
|
||||
</copy>
|
||||
</target>
|
||||
|
||||
<target name="resources" depends="build.prepare" description="Force update of filterable resources (property config files, etc) needed at runtime and test time">
|
||||
<copy todir="${target.classes.dir}" filtering="on" overwrite="true">
|
||||
<fileset dir="${src.resources.dir}">
|
||||
<patternset refid="std.files.to.filter" />
|
||||
</fileset>
|
||||
<filterset>
|
||||
<filtersfile file="${target.filter.file}" />
|
||||
</filterset>
|
||||
</copy>
|
||||
<copy todir="${target.classes.dir}" overwrite="true">
|
||||
<fileset dir="${src.resources.dir}">
|
||||
<patternset refid="std.files.not.to.filter" />
|
||||
</fileset>
|
||||
</copy>
|
||||
<antcall target="test-resources"/>
|
||||
</target>
|
||||
|
||||
<target name="test-resources" depends="build.prepare" description="Force update of filterable resources (logging config files, etc) needed at test time">
|
||||
<copy todir="${target.testclasses.dir}" filtering="on" overwrite="true">
|
||||
<fileset dir="${src.test.resources.dir}">
|
||||
<patternset refid="std.files.to.filter" />
|
||||
</fileset>
|
||||
<filterset>
|
||||
<filtersfile file="${target.filter.file}" />
|
||||
</filterset>
|
||||
</copy>
|
||||
|
||||
<copy todir="${target.testclasses.dir}" overwrite="true">
|
||||
<fileset dir="${src.test.resources.dir}">
|
||||
<patternset refid="std.files.not.to.filter" />
|
||||
</fileset>
|
||||
</copy>
|
||||
</target>
|
||||
|
||||
<!-- hook target -->
|
||||
<target name="statics.post" />
|
||||
|
||||
<!-- gen: hook targets for code generation -->
|
||||
<target name="gen" depends="statics, gen.pre, gen.main, gen.post" description="Generate code artifacts" />
|
||||
<target name="gen.pre" />
|
||||
<target name="gen.main" />
|
||||
<target name="gen.post" />
|
||||
|
||||
<!-- compile: Compiles the source code -->
|
||||
<target name="compile" depends="gen, compile.pre, compile.main, compile.source, compile.tests, compile.post" description="Compile all source code" />
|
||||
|
||||
<!-- hook target -->
|
||||
<target name="compile.pre" />
|
||||
|
||||
<!-- main compile target -->
|
||||
<target name="compile.main">
|
||||
|
||||
<!-- copy any non-java files from the generated java source dir -->
|
||||
<echo>copying generated resources</echo>
|
||||
<copy todir="${target.classes.dir}">
|
||||
<fileset dir="${target.gen.java.dir}">
|
||||
<exclude name="**/*.java" />
|
||||
</fileset>
|
||||
</copy>
|
||||
|
||||
<!-- copy any non-java files from the generated test java source dir -->
|
||||
<echo>copying generated test resources</echo>
|
||||
<copy todir="${target.testclasses.dir}" >
|
||||
<fileset dir="${target.gen.java.test.dir}">
|
||||
<exclude name="**/*.java" />
|
||||
</fileset>
|
||||
</copy>
|
||||
|
||||
<!-- we also redo this when we actually produce a distribution -->
|
||||
<filter token="VERSION" value="${project.version}" />
|
||||
<filter token="DATE" value="${DSTAMP}" />
|
||||
<filter token="TIME" value="${TSTAMPCOL}" />
|
||||
|
||||
<copy todir="${target.classes.dir}" overwrite="false" filtering="on">
|
||||
<fileset dir="${src.java.main.dir}">
|
||||
<include name="**/version.txt" />
|
||||
<include name="**/defaultManifest.mf" />
|
||||
</fileset>
|
||||
<filterset>
|
||||
<filtersfile file="${target.filter.file}" />
|
||||
</filterset>
|
||||
</copy>
|
||||
</target>
|
||||
|
||||
<target name="compile.source">
|
||||
<echo>compiling main sources</echo>
|
||||
<javac destdir="${target.classes.dir}" debug="${debug}" deprecation="${deprecation}" optimize="${optimize}" source="${javac.source}" target="${javac.target}">
|
||||
<src path="${src.java.main.dir}" />
|
||||
<src path="${target.gen.java.dir}" />
|
||||
<classpath refid="compile.classpath" />
|
||||
</javac>
|
||||
</target>
|
||||
|
||||
<target name="compile.tests">
|
||||
<echo>compiling test sources</echo>
|
||||
<javac destdir="${target.testclasses.dir}" debug="${debug}" deprecation="${deprecation}" optimize="${optimize}" source="${javac.source}" target="${javac.target}">
|
||||
<src path="${src.java.test.dir}" />
|
||||
<src path="${target.gen.java.test.dir}" />
|
||||
<classpath>
|
||||
<pathelement location="${target.classes.dir}" />
|
||||
<path refid="test.classpath" />
|
||||
</classpath>
|
||||
</javac>
|
||||
</target>
|
||||
|
||||
<!-- hook target -->
|
||||
<target name="compile.post" />
|
||||
|
||||
<!-- jar: Creates main jar containing utility and other classes -->
|
||||
<target name="jar" depends="compile, jar.pre, jar.main, jar.post" description="Create project jar containing code artifacts and other resources" />
|
||||
|
||||
<!-- hook target -->
|
||||
<target name="jar.pre" depends="compile">
|
||||
<mkdir dir="${target.lib.dir}" />
|
||||
</target>
|
||||
|
||||
<!-- main jar target -->
|
||||
<target name="jar.main">
|
||||
<jar jarfile="${target.lib.dir}/${project.name}.jar">
|
||||
<manifest>
|
||||
<attribute name="Implementation-Vendor" value="${org.name}" />
|
||||
<attribute name="Implementation-Title" value="${project.title}" />
|
||||
<attribute name="Implementation-Version" value="${project.version}" />
|
||||
</manifest>
|
||||
<fileset dir="${target.classes.dir}">
|
||||
<!-- todo, make this more selective, we don't neccessarily want to include everything here -->
|
||||
</fileset>
|
||||
</jar>
|
||||
</target>
|
||||
|
||||
<target name="jar.post" />
|
||||
|
||||
<target name="source-zip" depends="jar">
|
||||
<zip zipfile="${target.lib.dir}/${project.name}-src.zip">
|
||||
<fileset dir="${src.java.main.dir}" />
|
||||
<fileset dir="${target.gen.java.dir}" />
|
||||
</zip>
|
||||
</target>
|
||||
|
||||
<!-- web: Creates primary webapp in exploded format -->
|
||||
<target name="web" depends="source-zip, web.pre, web.main, web.post" if="build.web" description="Create this webapp in exploded format" />
|
||||
|
||||
<!-- copy web statics -->
|
||||
<target name="statics.web" if="build.web">
|
||||
|
||||
<propertyfile file="${target.filter.file}">
|
||||
<entry key="PROJECT_WEBAPP_NAME" value="${project.webapp.name}" />
|
||||
</propertyfile>
|
||||
|
||||
<!-- copy statics files for exploded webapps. This is useful for quick updating of a deployed webapp when
|
||||
only statics files like images, jsps, html (no java code) change. -->
|
||||
<mkdir dir="${target.war.expanded.dir}" />
|
||||
<copy todir="${target.war.expanded.dir}" filtering="on">
|
||||
<fileset dir="${src.web.dir}">
|
||||
<patternset refid="std.files.to.filter" />
|
||||
</fileset>
|
||||
<filterset>
|
||||
<filtersfile file="${target.filter.file}" />
|
||||
</filterset>
|
||||
</copy>
|
||||
|
||||
<!-- Disable filtering on image and pdf files -->
|
||||
<copy todir="${target.war.expanded.dir}">
|
||||
<fileset dir="${src.web.dir}">
|
||||
<patternset refid="std.files.not.to.filter" />
|
||||
</fileset>
|
||||
</copy>
|
||||
</target>
|
||||
|
||||
<!-- hook target -->
|
||||
<target name="web.pre" if="build.web" />
|
||||
|
||||
<!-- note that we don't copy buildtime or test dependencies to WEB-INF/lib -->
|
||||
<target name="web.main" if="build.web">
|
||||
<antcall target="web.copy.classes" />
|
||||
<antcall target="web.copy.libs" />
|
||||
</target>
|
||||
|
||||
<!-- broken out so derived build can override which classes and libs get copied -->
|
||||
<target name="web.copy.classes">
|
||||
<!-- by default copy all classes -->
|
||||
<copy todir="${target.war.expanded.dir}/WEB-INF/classes">
|
||||
<fileset dir="${target.classes.dir}">
|
||||
<include name="**/*" />
|
||||
</fileset>
|
||||
</copy>
|
||||
</target>
|
||||
<target name="web.copy.libs">
|
||||
<!-- by default copy all classes -->
|
||||
<copy todir="${target.war.expanded.dir}/WEB-INF/lib" flatten="true">
|
||||
<fileset dir="${lib.dir}/global">
|
||||
<include name="**/*.jar" />
|
||||
</fileset>
|
||||
</copy>
|
||||
</target>
|
||||
|
||||
<!-- hook target -->
|
||||
<target name="web.post" if="build.web" />
|
||||
|
||||
<!-- war: Creates primary web-app in war format -->
|
||||
<target name="war" depends="web, war.pre, war.main, war.post" if="build.web" description="Create the webapp in .war format" />
|
||||
|
||||
<!-- hook target -->
|
||||
<target name="war.pre" if="build.web" />
|
||||
|
||||
<!-- main war target -->
|
||||
<target name="war.main" if="build.web">
|
||||
<mkdir dir="${target.artifacts.war.dir}" />
|
||||
<jar jarfile="${project.war}">
|
||||
<fileset dir="${target.war.expanded.dir}">
|
||||
<exclude name="**/*.dependency" />
|
||||
</fileset>
|
||||
</jar>
|
||||
</target>
|
||||
|
||||
<!-- hook target -->
|
||||
<target name="war.post" if="build.web" />
|
||||
|
||||
<!-- TODO: all the EJB stuff still needs to get updated for Ivy -->
|
||||
|
||||
<!-- exp-ear: Creates an enterprise application (EAR) in exploded format -->
|
||||
<target name="ear-stage" depends="war, ear.stage.pre, ear.stage.main, ear.stage.post" if="build.j2eeapp" description="Create this enterprise application (.ear) in exploded format" />
|
||||
|
||||
<!-- hook target -->
|
||||
<target name="ear.stage.pre" if="build.j2eeapp">
|
||||
<mkdir dir="${target.ear.dir}" />
|
||||
</target>
|
||||
|
||||
<!-- main exp-ear target -->
|
||||
<target name="ear.stage.main" if="build.j2eeapp">
|
||||
|
||||
<!-- copy ear application.xml, replacing tokens as needed -->
|
||||
<copy file="${src.dir}/application/META-INF/application.xml" tofile="${target.ear.dir}/META-INF/application.xml" filtering="on" />
|
||||
|
||||
<!-- copy web-apps -->
|
||||
<mkdir dir="${target.artifacts.dir}/war" />
|
||||
<copy todir="${target.ear.dir}">
|
||||
<fileset dir="${target.artifacts.dir}/war">
|
||||
<include name="${project.name}.war" />
|
||||
</fileset>
|
||||
</copy>
|
||||
|
||||
<!-- note: any EJB 2.1 ejbs are handled by ejb21-targets.xml -->
|
||||
|
||||
<!-- copy special log4j properties jar -->
|
||||
<copy todir="${target.ear.dir}">
|
||||
<fileset dir="${target.lib.dir}">
|
||||
<include name="log4j-properties.jar" />
|
||||
</fileset>
|
||||
</copy>
|
||||
|
||||
<!-- copy support libs -->
|
||||
<pathtofileset2 name="deps.ear.modules.fileset" pathrefid="deps.ear.modules" ignoreNonExistent="false" />
|
||||
<copy todir="${target.ear.dir}" flatten="yes">
|
||||
<fileset dir="${target.lib.dir}">
|
||||
<include name="${project.name}.jar" />
|
||||
</fileset>
|
||||
<fileset refid="deps.ear.modules.fileset" />
|
||||
</copy>
|
||||
|
||||
</target>
|
||||
|
||||
<!-- hook target -->
|
||||
<target name="ear.stage.post" if="build.j2eeapp" />
|
||||
|
||||
<target name="ear" depends="ear-stage, ear.pre, ear.main, ear.post" if="build.j2eeapp" description="Create the enterprise application archive (.ear)" />
|
||||
|
||||
<!-- hook target -->
|
||||
<target name="ear.pre" if="build.j2eeapp" />
|
||||
|
||||
<!-- main ear target -->
|
||||
<target name="ear.main" if="build.j2eeapp">
|
||||
<mkdir dir="${target.artifacts.ear.dir}" />
|
||||
<ear earfile="${target.artifacts.ear.dir}/${project.name}.ear" appxml="${target.ear.dir}/META-INF/application.xml">
|
||||
<fileset dir="${target.ear.dir}">
|
||||
<exclude name="**/application.xml" />
|
||||
</fileset>
|
||||
</ear>
|
||||
</target>
|
||||
|
||||
<!-- hook target -->
|
||||
<target name="ear.post" if="build.j2eeapp" />
|
||||
|
||||
<!-- publish: Construct and publish the project distributables -->
|
||||
<target name="publish" depends="ear, publish.setup, publish.do.publish"
|
||||
description="Publish this project in the ivy repository"/>
|
||||
|
||||
<target name="publish.setup">
|
||||
|
||||
<!-- we do physical publish by default, unless do.publish property set to "false" -->
|
||||
<condition property="publish.needed">
|
||||
<or>
|
||||
<not><isset property="do.publish"/></not>
|
||||
<istrue value="${do.publish}"/>
|
||||
</or>
|
||||
</condition>
|
||||
|
||||
<!-- we clean out the deliver dir, since we don't want multiple integration versions
|
||||
to end up in there -->
|
||||
<delete dir="${ivy.distrib.dir}/jars" />
|
||||
<delete dir="${ivy.distrib.dir}/ivys" />
|
||||
|
||||
<tstamp>
|
||||
<format property="pubdate" pattern="yyyyMMddHHmmss" />
|
||||
<!-- default value -->
|
||||
</tstamp>
|
||||
|
||||
<mkdir dir="${ivy.distrib.dir}/jars" />
|
||||
<copy file="${target.lib.dir}/${project.name}.jar" tofile="${ivy.distrib.dir}/jars/${project.name}-${project.version}.jar" />
|
||||
<copy file="${target.lib.dir}/${project.name}-src.zip" tofile="${ivy.distrib.dir}/jars/${project.name}-src-${project.version}.zip" failonerror="no"/>
|
||||
</target>
|
||||
|
||||
<target name="publish.do.publish" if="publish.needed">
|
||||
<ivy:publish resolver="integration-repo" artifactspattern="${ivy.distrib.dir}/jars/[artifact]-[revision].[ext]" pubrevision="${project.version}" pubdate="${pubdate}" srcivypattern="${ivy.srcivypattern}" />
|
||||
<echo message="project ${project.name} released with version ${project.version}" />
|
||||
</target>
|
||||
|
||||
<!-- dist: Construct the project distributables, but really an alias for publish -->
|
||||
<target name="dist" depends="publish, dist.pre, dist.main, dist.post" description="Create all project distributables">
|
||||
</target>
|
||||
|
||||
<!-- hook target -->
|
||||
<target name="dist.pre" />
|
||||
<target name="dist.main" />
|
||||
<target name="dist.post" />
|
||||
|
||||
<!-- javadocs: Creates the API documentation -->
|
||||
<target name="javadoc" depends="build.prepare" description="Create the project API documentation">
|
||||
<mkdir dir="${target.javadocs.dir}" />
|
||||
<javadoc destdir="${target.javadocs.dir}" author="true" version="true" windowtitle="${project.title} ${project.version} API" doctitle="${project.title} ${project.version}" bottom="${project.copyright}"
|
||||
overview="${src.java.main.dir}/overview.html">
|
||||
<classpath>
|
||||
<pathelement location="${target.classes.dir}" />
|
||||
<pathelement location="${target.testclasses.dir}" />
|
||||
<path refid="compile.classpath"/>
|
||||
</classpath>
|
||||
<sourcepath>
|
||||
<pathelement location="${src.java.main.dir}" />
|
||||
</sourcepath>
|
||||
<packageset dir="${src.java.main.dir}">
|
||||
<include name="**/*" />
|
||||
</packageset>
|
||||
</javadoc>
|
||||
</target>
|
||||
|
||||
<!-- run: allows arbitrary java code to be run -->
|
||||
<target name="run" depends="init,guard.runclass" description="Run a java application">
|
||||
<java classname="${run.class}" fork="true">
|
||||
<classpath>
|
||||
<pathelement location="${target.classes.dir}" />
|
||||
<pathelement location="${target.testclasses.dir}" />
|
||||
<path refid="test.classpath" />
|
||||
</classpath>
|
||||
</java>
|
||||
</target>
|
||||
|
||||
<target name="guard.runclass" unless="run.class">
|
||||
<fail message="The target you are attempting to run requires the ${run.class} property to be set, which doesn't appear to be" />
|
||||
</target>
|
||||
|
||||
<!-- runp: allows arbitrary java code to be run, prompting for arguments -->
|
||||
<target name="run-with-arguments" depends="init,guard.runclass" description="Run a java application with arguments">
|
||||
<input message="Please enter arguments:" addproperty="run.arguments" />
|
||||
|
||||
<java classname="${run.class}" fork="true">
|
||||
<arg line="${run.arguments}" />
|
||||
<classpath>
|
||||
<pathelement location="${target.classes.dir}" />
|
||||
<pathelement location="${target.testclasses.dir}" />
|
||||
<path refid="test.classpath" />
|
||||
</classpath>
|
||||
</java>
|
||||
</target>
|
||||
|
||||
<!-- classicvm: call before any other targets if you want to run unit tests with classic vm -->
|
||||
<target name="classicvm">
|
||||
<property name="unitvm" value="-classic" />
|
||||
</target>
|
||||
|
||||
<!-- jvm arguments we want tacked on to all unit tests -->
|
||||
<!-- set fake default value, will not override existing setting -->
|
||||
<property name="test.arguments" value="-Dzzz456zzz" />
|
||||
|
||||
<target name="tests.prepare" depends="compile" unless="tests.prepare.done">
|
||||
<mkdir dir="${target.testresults.dir}" />
|
||||
<delete>
|
||||
<fileset dir="${target.testresults.dir}" includes="**/*.txt,**/*.log" />
|
||||
</delete>
|
||||
<property name="tests.prepare.done" value="true" />
|
||||
</target>
|
||||
|
||||
<!-- automatically runs all the junit tests. -->
|
||||
<target name="tests" depends="tests-local" description="Runs all tests, first local then server (if any)">
|
||||
<!-- add code here to run server unit tests if there are any -->
|
||||
<!-- this usually involves starting up the server, and in parallel running tests against it -->
|
||||
</target>
|
||||
|
||||
<!-- automatically runs all the junit tests, with compile dependencies. -->
|
||||
<target name="tests-dist" depends="dist, tests" description="Run all tests after creating a project distribution" />
|
||||
|
||||
<!-- Runs the local unit tests. -->
|
||||
<target name="tests-local" depends="tests.prepare" description="Run all local tests">
|
||||
<!-- for the time being we just halt on failure, since these are
|
||||
local tests and there is no server to shut down, etc. But if
|
||||
we want to optionally run all tests and report on the whole
|
||||
batch, then we need to set a failure property as in the server
|
||||
tests. -->
|
||||
<junit forkmode="perBatch" printsummary="yes" haltonfailure="no" haltonerror="no"
|
||||
dir="${basedir}">
|
||||
<jvmarg value="${unitvm}" />
|
||||
<jvmarg value="-Djava.security.auth.login.config=${target.testclasses.dir}/auth.conf" />
|
||||
<jvmarg value="${test.arguments}" />
|
||||
<classpath>
|
||||
<pathelement location="${target.classes.dir}" />
|
||||
<pathelement location="${target.testclasses.dir}" />
|
||||
<pathelement location="${target.genclasses.dir}" />
|
||||
<path refid="test.classpath" />
|
||||
</classpath>
|
||||
|
||||
<formatter type="plain" />
|
||||
<formatter type="xml" />
|
||||
|
||||
<batchtest fork="yes" todir="${target.testresults.dir}">
|
||||
<fileset dir="${target.testclasses.dir}" includes="${test.includes}" excludes="${test.excludes}" />
|
||||
</batchtest>
|
||||
</junit>
|
||||
|
||||
</target>
|
||||
|
||||
<!-- runs one local unit test -->
|
||||
<target name="test" depends="guard.testclass,tests.prepare" description="Runs one local test using the value of the test.class property">
|
||||
<junit forkmode="perBatch" printsummary="yes" haltonfailure="no" haltonerror="no">
|
||||
<jvmarg value="${unitvm}" />
|
||||
<jvmarg value="-Djava.security.auth.login.config=${target.testclasses.dir}/auth.conf" />
|
||||
<jvmarg value="${test.arguments}" />
|
||||
<classpath>
|
||||
<pathelement location="${target.classes.dir}" />
|
||||
<pathelement location="${target.testclasses.dir}" />
|
||||
<pathelement location="${target.genclasses.dir}" />
|
||||
<path refid="test.classpath" />
|
||||
</classpath>
|
||||
<formatter type="plain" />
|
||||
<formatter type="xml" />
|
||||
<!-- the test case -->
|
||||
<test name="${test.class}" todir="${target.testresults.dir}" />
|
||||
</junit>
|
||||
</target>
|
||||
|
||||
<target name="guard.testclass" unless="test.class">
|
||||
<fail message="The target you are attempting to run requires the ${test.class} property to be set, which doesn't appear to be" />
|
||||
</target>
|
||||
|
||||
<!--
|
||||
test-example - a sample unit test
|
||||
shows how to make a target to run just one specific unit test instead
|
||||
of having to specify the class
|
||||
|
||||
It can get a lot more elaborate than this, with various properties being
|
||||
set up, etc. Property files can be written out, etc.
|
||||
|
||||
<target name="test.example" depends="init">
|
||||
<antcall target="test">
|
||||
<param name="test.class" value="com.mycompany.myproject.MyTest"/>
|
||||
</antcall>
|
||||
</target>
|
||||
-->
|
||||
</project>
|
||||
140
common-build/db-targets.xml
Normal file
140
common-build/db-targets.xml
Normal file
@@ -0,0 +1,140 @@
|
||||
<?xml version="1.0"?>
|
||||
|
||||
<!--
|
||||
|
||||
Copyright 2002-2005 the original author or authors.
|
||||
|
||||
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.
|
||||
|
||||
- - -
|
||||
|
||||
Author: Colin Sampaleanu
|
||||
Author: Keith Donald
|
||||
|
||||
Ant XML fragment that contains useful targets for working with databases. These
|
||||
include targets to load the project db schema and test data, as well as export a
|
||||
dbunit dtd to facilitate validating xml test data documents.
|
||||
|
||||
This fragment is meant to be imported into a project build file, along with
|
||||
common-targets.xml, in order to provide build handling for basic db-properties and
|
||||
operations. This is an optional module, and due to the way the ant import works,
|
||||
there is no way to automatically hook this up into the build. The importing project
|
||||
must override appropropriate 'hook' targets from common-targets.xml, and then have
|
||||
the override targets depend on both the targets from common-targets and those from here.
|
||||
-->
|
||||
<project name="db-targets" xmlns:ivy="antlib:fr.jayasoft.ivy.ant">
|
||||
|
||||
<import file="common-targets.xml" />
|
||||
|
||||
<!-- db.task.init: not to be called directly, but needed by other targets -->
|
||||
<target name="db.task.init" depends="dbunit.presetdef.schema,
|
||||
dbunit.presetdef.noschema,
|
||||
retrieve">
|
||||
<property name="src.db.dir" value="${src.etc.dir}/db"/>
|
||||
<property name="target.db.dir" value="${target.dir}/db"/>
|
||||
<presetdef name="my.sql">
|
||||
<sql driver="${database.driver}" url="${database.url}" userid="${database.username}" password="${database.password}" classpathref="test.classpath" />
|
||||
</presetdef>
|
||||
<presetdef name="my.sqladmin">
|
||||
<sql driver="${database.driver}" url="${database.url}" userid="${database.admin.username}" password="${database.admin.password}" classpathref="test.classpath" />
|
||||
</presetdef>
|
||||
</target>
|
||||
|
||||
<target name="dbunit.presetdef.schema" if="database.schema">
|
||||
<taskdef name="dbunit" classname="org.dbunit.ant.DbUnitTask" classpathref="test.classpath" />
|
||||
<presetdef name="my.dbunit">
|
||||
<dbunit driver="${database.driver}" url="${database.url}" schema="${database.schema}"
|
||||
userid="${database.username}" password="${database.password}">
|
||||
<classpath>
|
||||
<path refid="test.classpath" />
|
||||
<pathelement location="${src.test.resources.dir}" />
|
||||
</classpath>
|
||||
</dbunit>
|
||||
</presetdef>
|
||||
</target>
|
||||
<target name="dbunit.presetdef.noschema" unless="database.schema">
|
||||
<taskdef name="dbunit" classname="org.dbunit.ant.DbUnitTask" classpathref="test.classpath" />
|
||||
<presetdef name="my.dbunit">
|
||||
<dbunit driver="${database.driver}" url="${database.url}"
|
||||
userid="${database.username}" password="${database.password}">
|
||||
<classpath>
|
||||
<path refid="test.classpath" />
|
||||
<pathelement location="${src.test.resources.dir}" />
|
||||
</classpath>
|
||||
</dbunit>
|
||||
</presetdef>
|
||||
</target>
|
||||
|
||||
<target name="db-schema-create" depends="db.task.init" description="Load the project schema (tables) into the database">
|
||||
<property name="sql.src" value="${src.db.dir}/schema.sql" />
|
||||
<antcall target="db-sql">
|
||||
<param name="onerror" value="continue" />
|
||||
<param name="autocommit" value="true" />
|
||||
</antcall>
|
||||
</target>
|
||||
|
||||
<target name="db-user-create" depends="db.task.init" description="Create the project schema tablespaces and user">
|
||||
<property name="sql.src" value="${target.testclasses.dir}/create-user.sql" />
|
||||
<antcall target="db-sql-admin">
|
||||
<param name="onerror" value="continue" />
|
||||
<param name="autocommit" value="true" />
|
||||
</antcall>
|
||||
</target>
|
||||
|
||||
<target name="db-schema-dtd" depends="db.task.init" description="Export db unit dtd for testdata file">
|
||||
<mkdir dir="${target.db.dir}" />
|
||||
<my.dbunit>
|
||||
<export dest="${target.db.dir}/schema.dtd" format="dtd" />
|
||||
</my.dbunit>
|
||||
</target>
|
||||
|
||||
<target name="db-data-load" depends="db.task.init" description="Load all data contained in a file to the database">
|
||||
<property name="db.data.file" value="${src.db.dir}/data.xml" />
|
||||
<my.dbunit>
|
||||
<operation type="CLEAN_INSERT" src="${db.data.file}" />
|
||||
</my.dbunit>
|
||||
</target>
|
||||
|
||||
<target name="db-sql" depends="guard.sqlsrc, db.task.init" description="Execute sql statements stored in the file defined by the ${sql.src} property">
|
||||
<property name="onerror" value="stop" />
|
||||
<property name="autocommit" value="false" />
|
||||
<echo>User sql.src = '${sql.src}'</echo>
|
||||
<my.sql src="${sql.src}" onerror="${onerror}" autocommit="${autocommit}">
|
||||
<classpath>
|
||||
<path refid="test.classpath" />
|
||||
<pathelement location="${src.test.resources.dir}" />
|
||||
</classpath>
|
||||
</my.sql>
|
||||
</target>
|
||||
|
||||
<target name="db-sql-admin" depends="guard.sqlsrc, guard.admin, db.task.init" description="Execute sql statements stored in the file defined by the ${sql.src} property">
|
||||
<property name="onerror" value="stop" />
|
||||
<property name="autocommit" value="false" />
|
||||
<echo>Admin sql.src = '${sql.src}'</echo>
|
||||
<my.sqladmin src="${sql.src}" onerror="${onerror}" autocommit="${autocommit}">
|
||||
<classpath>
|
||||
<path refid="test.classpath" />
|
||||
<pathelement location="${src.test.resources.dir}" />
|
||||
</classpath>
|
||||
</my.sqladmin>
|
||||
</target>
|
||||
|
||||
<target name="guard.sqlsrc" unless="sql.src">
|
||||
<fail message="The target you are attempting to run requires the ${sql.src} property to be set, but it doesn't appear to be" />
|
||||
</target>
|
||||
|
||||
<target name="guard.admin" unless="database.admin.username">
|
||||
<fail message="The target you are attempting to run requires the ${database.admin.username} property to be set, but it doesn't appear to be. Since this is a local admin property, define it in a local (secured) build.properties file" />
|
||||
</target>
|
||||
|
||||
</project>
|
||||
157
common-build/doc-targets.xml
Normal file
157
common-build/doc-targets.xml
Normal file
@@ -0,0 +1,157 @@
|
||||
<?xml version="1.0"?>
|
||||
|
||||
<!--
|
||||
Copyright 2002-2005 the original author or authors.
|
||||
|
||||
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.
|
||||
|
||||
- - -
|
||||
Author: Alef Arendsen
|
||||
|
||||
Targets for generating reference documentation.
|
||||
-->
|
||||
|
||||
<project name="doc-targets" xmlns:ivy="antlib:fr.jayasoft.ivy.ant">
|
||||
|
||||
<import file="common-targets.xml" />
|
||||
|
||||
<target name="doc-targets">
|
||||
<echo>
|
||||
Targets for generating reference documentation.
|
||||
|
||||
Please execute
|
||||
ant -p
|
||||
|
||||
to see a list of all relevant targets.
|
||||
</echo>
|
||||
</target>
|
||||
|
||||
<target name="doc-clean" description="Delete temporary directories for reference docs">
|
||||
<delete quiet="true" dir="${docs.ref.target.dir}" />
|
||||
</target>
|
||||
|
||||
<target name="doc-prepare">
|
||||
<fail message="Supporting libraries needed to generate documentation not found in: ${docs.ref.lib.dir}, please see docs/reference/readme.txt for instructions.">
|
||||
<condition>
|
||||
<not>
|
||||
<available file="${docs.ref.lib.dir}" />
|
||||
</not>
|
||||
</condition>
|
||||
</fail>
|
||||
<copy todir="${docs.ref.target.dir}/images">
|
||||
<fileset dir="${docs.ref.dir}/images">
|
||||
<include name="*.gif" />
|
||||
<include name="*.png" />
|
||||
<include name="*.svg" />
|
||||
<include name="*.jpg" />
|
||||
</fileset>
|
||||
<fileset dir="${docs.ref.dir}/images">
|
||||
<include name="**/*.gif" />
|
||||
<include name="**/*.png" />
|
||||
<include name="**/*.svg" />
|
||||
<include name="**/*.jpg" />
|
||||
</fileset>
|
||||
</copy>
|
||||
</target>
|
||||
|
||||
<target name="doc-pdf" depends="doc-prepare" description="Generate PDF reference documentation">
|
||||
<mkdir dir="${docs.ref.target.dir}/pdf/images" />
|
||||
<copy todir="${docs.ref.target.dir}/pdf/images">
|
||||
<fileset dir="${docs.ref.src.dir}/images">
|
||||
<include name="*.gif" />
|
||||
<include name="*.png" />
|
||||
<include name="*.svg" />
|
||||
<include name="*.jpg" />
|
||||
</fileset>
|
||||
</copy>
|
||||
|
||||
<java classname="com.icl.saxon.StyleSheet" fork="true" dir="${docs.ref.dir}">
|
||||
<classpath>
|
||||
<fileset dir="${docs.ref.lib.dir}">
|
||||
<include name="**/*.jar" />
|
||||
</fileset>
|
||||
</classpath>
|
||||
<arg value="-o" />
|
||||
<arg value="${docs.ref.target.dir}/pdf/docbook_fop.tmp" />
|
||||
<arg value="${docs.ref.src.dir}/index.xml" />
|
||||
<arg value="${docs.ref.dir}/styles/fopdf.xsl" />
|
||||
</java>
|
||||
|
||||
<java classname="org.apache.fop.apps.Fop" fork="true" maxmemory="256m" dir="${docs.ref.dir}">
|
||||
<classpath>
|
||||
<fileset dir="${docs.ref.lib.dir}">
|
||||
<include name="**/*.jar" />
|
||||
</fileset>
|
||||
</classpath>
|
||||
<arg value="-d"/>
|
||||
<arg value="${docs.ref.target.dir}/pdf/docbook_fop.tmp" />
|
||||
<arg value="${docs.ref.target.dir}/pdf/${ant.project.name}-reference.pdf" />
|
||||
</java>
|
||||
<delete file="${docs.ref.target.dir}/pdf/docbook_fop.tmp" />
|
||||
</target>
|
||||
|
||||
<target name="doc-html" depends="doc-prepare" description="Generate multi-page HTML reference documentation">
|
||||
<mkdir dir="${docs.ref.target.dir}/html/images" />
|
||||
<mkdir dir="${docs.ref.target.dir}/html_single/styles" />
|
||||
<copy todir="${docs.ref.target.dir}/html/images">
|
||||
<fileset dir="${docs.ref.src.dir}/images">
|
||||
<include name="*.gif" />
|
||||
<include name="*.png" />
|
||||
<include name="*.svg" />
|
||||
<include name="*.jpg" />
|
||||
</fileset>
|
||||
</copy>
|
||||
<copy todir="${docs.ref.target.dir}/html/styles" file="${docs.ref.dir}/styles/html.css"/>
|
||||
|
||||
<java classname="com.icl.saxon.StyleSheet" fork="true" dir="${docs.ref.target.dir}/html">
|
||||
<classpath>
|
||||
<fileset dir="${docs.ref.lib.dir}">
|
||||
<include name="**/*.jar" />
|
||||
</fileset>
|
||||
</classpath>
|
||||
<arg value="${docs.ref.src.dir}/index.xml" />
|
||||
<arg value="${docs.ref.dir}/styles/html_chunk.xsl" />
|
||||
</java>
|
||||
<delete file="${docs.ref.target.dir}/html/docbook_fop.tmp" />
|
||||
</target>
|
||||
|
||||
<target name="doc-htmlsingle" depends="doc-prepare" description="Generate single-page HTML reference documentation">
|
||||
<mkdir dir="${docs.ref.target.dir}/html_single/images" />
|
||||
<mkdir dir="${docs.ref.target.dir}/html_single/styles" />
|
||||
<copy todir="${docs.ref.target.dir}/html_single/images">
|
||||
<fileset dir="${docs.ref.src.dir}/images">
|
||||
<include name="*.gif" />
|
||||
<include name="*.png" />
|
||||
<include name="*.svg" />
|
||||
<include name="*.jpg" />
|
||||
</fileset>
|
||||
</copy>
|
||||
<copy todir="${docs.ref.target.dir}/html_single/styles" file="${docs.ref.dir}/styles/html.css"/>
|
||||
|
||||
<java classname="com.icl.saxon.StyleSheet" fork="true" dir="${docs.ref.target.dir}/html_single">
|
||||
<classpath>
|
||||
<fileset dir="${docs.ref.lib.dir}">
|
||||
<include name="**/*.jar" />
|
||||
</fileset>
|
||||
</classpath>
|
||||
<arg value="-o" />
|
||||
<arg value="${docs.ref.target.dir}/html_single/index.html" />
|
||||
<arg value="${docs.ref.src.dir}/index.xml" />
|
||||
<arg value="${docs.ref.dir}/styles/html.xsl" />
|
||||
</java>
|
||||
<delete file="${docs.ref.target.dir}/htmlsingle/docbook_fop.tmp" />
|
||||
</target>
|
||||
|
||||
<target name="doc-all" depends="doc-html,doc-htmlsingle,doc-pdf" description="Generate reference documentation in all formats" />
|
||||
|
||||
</project>
|
||||
65
common-build/ejb21-targets.xml
Normal file
65
common-build/ejb21-targets.xml
Normal file
@@ -0,0 +1,65 @@
|
||||
<?xml version="1.0"?>
|
||||
|
||||
<!--
|
||||
|
||||
Copyright 2002-2005 the original author or authors.
|
||||
|
||||
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.
|
||||
|
||||
- - -
|
||||
Author: Colin Sampaleanu
|
||||
|
||||
This ant XML fragment is meant to be imported into a project build file, along with
|
||||
common-targets.xml, in order to provide build handling for EJB 2.1 format EJBs. This
|
||||
is an optional module, and due to the way the ant import works, there is no way to
|
||||
automatically hook this up into the build. The importing project must override
|
||||
appropropriate 'hook' targets from common-targets.xml, and then have the override
|
||||
targets depend on both the targets from common-targets and those from here.
|
||||
|
||||
TODO: this is currently not finished. It is in the process of being re-organized due
|
||||
to use of Ivy.
|
||||
-->
|
||||
|
||||
<project name="ejb21" xmlns:ivy="antlib:fr.jayasoft.ivy.ant">
|
||||
|
||||
<import file="common-targets.xml" />
|
||||
|
||||
<!--
|
||||
init: this target must be hooked up to after common-targets.init
|
||||
-->
|
||||
<target name="init">
|
||||
<!-- where ejbs go -->
|
||||
<property name="target.ejb.dir" value="${target.artifacts.dir}/ejb" />
|
||||
<!-- where any exploded ejbs go -->
|
||||
<property name="target.ear.expanded.dir" value="${target.artifacts.dir}/ejb-expanded/primary" />
|
||||
<!-- where deployment descriptors go -->
|
||||
<property name="target.ear.expanded.descriptor.dir" value="${target.ear.expanded.dir}/META-INF" />
|
||||
</target>
|
||||
|
||||
<!--
|
||||
copy-target-ejbs: copies ejbs from target.ejb.dir where something like XDoclet
|
||||
has produced them, into target.expear.dir
|
||||
This target must be hooked up to run before or after common-targets.ear.stage.main
|
||||
-->
|
||||
<target name="copy.target.ejbs" if="build.j2eeapp">
|
||||
|
||||
<!-- copy ejb modules -->
|
||||
<mkdir dir="${target.ejb.dir}" />
|
||||
<copy todir="${target.ear.expanded.dir}">
|
||||
<fileset dir="${target.ejb.dir}">
|
||||
<include name="*.jar" />
|
||||
</fileset>
|
||||
</copy>
|
||||
</target>
|
||||
|
||||
</project>
|
||||
127
common-build/hibernate-targets.xml
Normal file
127
common-build/hibernate-targets.xml
Normal file
@@ -0,0 +1,127 @@
|
||||
<?xml version="1.0"?>
|
||||
|
||||
<!--
|
||||
|
||||
Copyright 2002-2005 the original author or authors.
|
||||
|
||||
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.
|
||||
|
||||
- - -
|
||||
|
||||
Author: Colin Sampaleanu
|
||||
Author: Keith Donald
|
||||
|
||||
Ant XML fragment that contains useful targets for working with hibernate. These
|
||||
include targets to generate hibernate mappings from xdoclet attributes, as well as
|
||||
export a database schema from the mappings.
|
||||
|
||||
This ant XML fragment is meant to be imported into a project build file, along with
|
||||
common-targets.xml. This is an optional module, and due to the way the ant import works,
|
||||
there is no way to automatically hook this up into the build. The importing project
|
||||
must override appropropriate 'hook' targets from common-targets.xml, and then have
|
||||
the override targets depend on both the targets from common-targets and those from here.
|
||||
|
||||
-->
|
||||
|
||||
<project name="hibernate-targets" xmlns:ivy="antlib:fr.jayasoft.ivy.ant">
|
||||
|
||||
<import file="common-targets.xml" />
|
||||
|
||||
<!-- hooks: these are not optional! -->
|
||||
|
||||
<!-- you must hook build.prepare -->
|
||||
<target name="build.prepare" depends="common-targets.build.prepare">
|
||||
<!-- Make sure hibernatedoclet is necessary -->
|
||||
<uptodate property="hibernatedoclet.unnecessary">
|
||||
<srcfiles dir="${src.java.main.dir}" includes="**/*.java" />
|
||||
<srcfiles dir="${target.gen.java.dir}" includes="**/*.java" />
|
||||
<mapper type="glob" from="*.java" to="${target.classes.dir}/*.class" />
|
||||
</uptodate>
|
||||
|
||||
<propertyfile file="${target.filter.file}">
|
||||
<entry key="HIBERNATE_DIALECT" value="${hibernate.dialect}" />
|
||||
<entry key="HIBERNATE_SHOW_SQL" value="${hibernate.show.sql}" />
|
||||
</propertyfile>
|
||||
|
||||
<path id="xdoclet.classpath">
|
||||
<path refid="test.classpath" />
|
||||
</path>
|
||||
|
||||
<path id="hibernate.classpath">
|
||||
<path refid="test.classpath" />
|
||||
<path location="${target.classes.dir}" />
|
||||
<pathelement location="${target.testclasses.dir}" />
|
||||
</path>
|
||||
</target>
|
||||
|
||||
<!-- you must hook statics! -->
|
||||
<target name="statics" depends="common-targets.statics">
|
||||
<antcall target="hibernatedoclet" />
|
||||
</target>
|
||||
|
||||
<!-- end of hooks -->
|
||||
|
||||
<!-- hibernatedoclet: generates Hibernate mapping files based on XDoclet marked-up Plain Old Java Object (POJO) -->
|
||||
<target name="hibernatedoclet" depends="hibernate.task.init" if="use.hibernatedoclet" unless="hibernatedoclet.unnecessary" description="Generate Persistence and form classes">
|
||||
|
||||
<taskdef name="hibernatedoclet" classname="xdoclet.modules.hibernate.HibernateDocletTask" classpathref="xdoclet.classpath" />
|
||||
|
||||
<!-- generate hibernate files -->
|
||||
<hibernatedoclet destdir="${target.gen.java.dir}" mergedir="${src.etc.dir}/merge" excludedtags="@version,@author" addedtags="@xdoclet-generated at ${TODAY}" force="${xdoclet.force}">
|
||||
<fileset dir="${src.java.main.dir}" />
|
||||
<hibernate validatexml="true" version="3.0" />
|
||||
</hibernatedoclet>
|
||||
</target>
|
||||
|
||||
<target name="hibernate.task.init" depends="retrieve">
|
||||
<taskdef name="schemaexport" classname="org.hibernate.tool.hbm2ddl.SchemaExportTask">
|
||||
<classpath>
|
||||
<path refid="xdoclet.classpath" />
|
||||
<path refid="hibernate.classpath" />
|
||||
</classpath>
|
||||
</taskdef>
|
||||
</target>
|
||||
|
||||
<!-- db-init: generates the database schema and creates tables based on the mapping files -->
|
||||
<target name="hibernate-schema-create" depends="hibernate.task.init, statics" description="Creates database tables from hibernate mapping files">
|
||||
<mkdir dir="${target.dir}/db" />
|
||||
<antcall target="generate.hibernate.properties" />
|
||||
<schemaexport quiet="no" text="no" drop="no" delimiter=";" properties="${target.dir}/db/database.properties" output="${target.dir}/db/hib-schema.sql">
|
||||
<fileset dir="${target.classes.dir}" includes="**/*.hbm.xml" />
|
||||
</schemaexport>
|
||||
</target>
|
||||
|
||||
<!-- db-init: drops the database tables -->
|
||||
<target name="hibernate-schema-drop" depends="hibernate.task.init, statics" description="Drop database tables created by Hibernate's schema export">
|
||||
<mkdir dir="${target.dir}/db" />
|
||||
<antcall target="generate.hibernate.properties" />
|
||||
<schemaexport quiet="no" text="no" drop="yes" delimiter=";" properties="${target.dir}/db/database.properties" output="${target.dir}/db/hib-drop-tables.sql">
|
||||
<fileset dir="${target.classes.dir}" includes="**/*.hbm.xml" />
|
||||
</schemaexport>
|
||||
</target>
|
||||
|
||||
<!-- this task is called by tasks that need it in build.xml -->
|
||||
<target name="generate.hibernate.properties">
|
||||
<echo>generating database.properties from build.properties</echo>
|
||||
<propertyfile comment="Hibernate Configuration for targets from db-targets.xml" file="${target.dir}/db/database.properties">
|
||||
<entry key="hibernate.connection.driver_class" value="${database.driver}" />
|
||||
<entry key="hibernate.connection.url" value="${database.url}" />
|
||||
<entry key="hibernate.connection.username" value="${database.username}" />
|
||||
<entry key="hibernate.connection.password" value="${database.password}" />
|
||||
<entry key="hibernate.dialect" value="${hibernate.dialect}" />
|
||||
<entry key="hibernate.connection.show_sql" value="${hibernate.show.sql}" />
|
||||
</propertyfile>
|
||||
<property file="database.properties" />
|
||||
</target>
|
||||
|
||||
</project>
|
||||
2
common-build/ivyconf.properties
Normal file
2
common-build/ivyconf.properties
Normal file
@@ -0,0 +1,2 @@
|
||||
repository.dir=${ivy.conf.dir}/../repository
|
||||
integration.repo.dir=${ivy.conf.dir}/../integration-repo
|
||||
89
common-build/ivyconf.xml
Normal file
89
common-build/ivyconf.xml
Normal file
@@ -0,0 +1,89 @@
|
||||
<ivyconf>
|
||||
<properties file="${ivy.conf.dir}/ivyconf.properties"/>
|
||||
<conf defaultResolver="maven2"/>
|
||||
<resolvers>
|
||||
<chain name="spring-projects" returnFirst="true">
|
||||
<!-- try developer's local integration repository first -->
|
||||
<filesystem name="integration-repo">
|
||||
<ivy pattern="${integration.repo.dir}/artifacts/[organisation]/[module]/ivy-[revision].xml"/>
|
||||
<artifact pattern="${integration.repo.dir}/artifacts/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]" />
|
||||
</filesystem>
|
||||
|
||||
<!-- try shared local filesystem repository second -->
|
||||
<filesystem name="filesystem-repo">
|
||||
<ivy pattern="${repository.dir}/[organisation]/[module]/ivy-[revision].xml" />
|
||||
<artifact pattern="${repository.dir}/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]" />
|
||||
</filesystem>
|
||||
|
||||
<!-- pull from the main release repository third -->
|
||||
<url name="spring-repo" m2compatible="true">
|
||||
<ivy pattern="https://svn.sourceforge.net/svnroot/springframework/repos/repo/[organisation]/[module]/ivy-[revision].xml" />
|
||||
<artifact pattern="https://svn.sourceforge.net/svnroot/springframework/repos/repo/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]" />
|
||||
</url>
|
||||
|
||||
<!-- if still not resolved, try snapshots -->
|
||||
<url name="spring-repo-snapshots" m2compatible="true">
|
||||
<ivy pattern="https://svn.sourceforge.net/svnroot/springframework/repos/repo-snapshots/[organisation]/[module]/ivy-[revision].xml" />
|
||||
<artifact pattern="https://svn.sourceforge.net/svnroot/springframework/repos/repo-snapshots/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]" />
|
||||
</url>
|
||||
</chain>
|
||||
|
||||
<chain name="maven2" returnFirst="true">
|
||||
<!-- try shared local filesystem repository first -->
|
||||
<filesystem name="filesystem-repo">
|
||||
<ivy pattern="${repository.dir}/[organisation]/[module]/ivy-[revision].xml" />
|
||||
<artifact pattern="${repository.dir}/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]" />
|
||||
</filesystem>
|
||||
|
||||
<!-- if still not resolved, try external repo -->
|
||||
<url name="spring-repo-ext" m2compatible="true">
|
||||
<ivy pattern="https://svn.sourceforge.net/svnroot/springframework/repos/repo-ext/[organisation]/[module]/ivy-[revision].xml" />
|
||||
<artifact pattern="https://svn.sourceforge.net/svnroot/springframework/repos/repo-ext/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]" />
|
||||
</url>
|
||||
|
||||
<!-- try popular maven2 ibiblio mirror second -->
|
||||
<ibiblio name="dotsrc-maven2-repo" checkconsistency="false" m2compatible="true" root="http://mirrors.dotsrc.org/maven2/"/>
|
||||
|
||||
<!-- try ibiblio itself third -->
|
||||
<ibiblio name="ibiblio-maven2-repo" checkconsistency="false" m2compatible="true" root="http://www.ibiblio.org/maven2/"/>
|
||||
|
||||
</chain>
|
||||
|
||||
</resolvers>
|
||||
|
||||
<modules>
|
||||
<!-- Pointing modules at local resolvers speeds resolution performance -->
|
||||
<module organisation="org.springframework" name="spring-aop" resolver="spring-projects"/>
|
||||
<module organisation="org.springframework" name="spring-beans" resolver="spring-projects"/>
|
||||
<module organisation="org.springframework" name="spring-binding" resolver="spring-projects"/>
|
||||
<module organisation="org.springframework" name="spring-context" resolver="spring-projects"/>
|
||||
<module organisation="org.springframework" name="spring-core" resolver="spring-projects"/>
|
||||
<module organisation="org.springframework" name="spring-dao" resolver="spring-projects"/>
|
||||
<module organisation="org.springframework" name="spring-hibernate2" resolver="spring-projects"/>
|
||||
<module organisation="org.springframework" name="spring-hibernate3" resolver="spring-projects"/>
|
||||
<module organisation="org.springframework" name="spring-ibatis" resolver="spring-projects"/>
|
||||
<module organisation="org.springframework" name="spring-jca" resolver="spring-projects"/>
|
||||
<module organisation="org.springframework" name="spring-jdbc" resolver="spring-projects"/>
|
||||
<module organisation="org.springframework" name="spring-jdo" resolver="spring-projects"/>
|
||||
<module organisation="org.springframework" name="spring-jms" resolver="spring-projects"/>
|
||||
<module organisation="org.springframework" name="spring-jmx" resolver="spring-projects"/>
|
||||
<module organisation="org.springframework" name="spring-jpa" resolver="spring-projects"/>
|
||||
<module organisation="org.springframework" name="spring-mock" resolver="spring-projects"/>
|
||||
<module organisation="org.springframework" name="spring-obj" resolver="spring-projects"/>
|
||||
<module organisation="org.springframework" name="spring-orm" resolver="spring-projects"/>
|
||||
<module organisation="org.springframework" name="spring-oxm" resolver="spring-projects"/>
|
||||
<module organisation="org.springframework" name="spring-portlet" resolver="spring-projects"/>
|
||||
<module organisation="org.springframework" name="spring-remoting" resolver="spring-projects"/>
|
||||
<module organisation="org.springframework" name="spring-struts" resolver="spring-projects"/>
|
||||
<module organisation="org.springframework" name="spring-support" resolver="spring-projects"/>
|
||||
<module organisation="org.springframework" name="spring-toplink" resolver="spring-projects"/>
|
||||
<module organisation="org.springframework" name="spring-web" resolver="spring-projects"/>
|
||||
<module organisation="org.springframework" name="spring-webflow" resolver="spring-projects"/>
|
||||
<module organisation="org.springframework" name="spring-webmvc" resolver="spring-projects"/>
|
||||
<module organisation="org.springframework" name="spring-ws-core" resolver="spring-projects"/>
|
||||
<module organisation="org.springframework" name="spring-ws-security" resolver="spring-projects"/>
|
||||
<module organisation="org.springframework" name="spring-xml" resolver="spring-projects"/>
|
||||
<module organisation="org.springframework" name="spring-ldap" resolver="spring-projects"/>
|
||||
<module organisation="org.springframework" name="various" resolver="spring-projects"/>
|
||||
</modules>
|
||||
</ivyconf>
|
||||
BIN
common-build/lib/ivy-1.4.1.jar
Normal file
BIN
common-build/lib/ivy-1.4.1.jar
Normal file
Binary file not shown.
135
common-build/project.properties
Normal file
135
common-build/project.properties
Normal file
@@ -0,0 +1,135 @@
|
||||
# values in here are overriden by build.properties and project.properties in
|
||||
# individual projects, and build.properties in this dir, in that order
|
||||
|
||||
# default wildcard for finding JUnit tests
|
||||
# the convention is that our JUnit test classes have XXXTests-style names
|
||||
test.includes=**/*Test.class,**/*Tests.class
|
||||
|
||||
# wildcards to exclude among JUnit tests
|
||||
test.excludes=**/Abstract*
|
||||
|
||||
# we define standard directory locations here
|
||||
# these should not normally never have to be overriden
|
||||
# we define them here instead of in the XML so that Ant nested property
|
||||
# replacement can work for properties overrides by other properties files
|
||||
|
||||
# root of any bin files needed during build
|
||||
bin.dir=${basedir}/bin
|
||||
|
||||
# libs needed for build process. ivy pulls down jars into various dirs under here
|
||||
lib.dir=${basedir}/lib
|
||||
|
||||
# any static libs that need to be checked in instead of being pulled down by ivy
|
||||
# should be placed somehwere under here. The standard build doesn't touch this though
|
||||
static.lib.dir=${basedir}/static-lib
|
||||
|
||||
# root of sources hierarchy
|
||||
src.dir=${basedir}/src
|
||||
|
||||
# main sources
|
||||
src.java.main.dir=${src.dir}/main/java
|
||||
|
||||
# test sources
|
||||
src.java.test.dir=${src.dir}/test/java
|
||||
|
||||
# root of web-apps sources
|
||||
src.web.dir=${basedir}/src/main/webapp
|
||||
|
||||
# root of source doc files
|
||||
src.doc.dir=${basedir}/src/doc
|
||||
|
||||
# root of etc hierarchy, typically used for templated sources and config files
|
||||
src.etc.dir=${basedir}/src/etc
|
||||
|
||||
# resources get copied into target classes dir with filtering
|
||||
src.resources.dir=${src.dir}/main/resources
|
||||
src.dtd.dir=${src.etc.dir}/dtd
|
||||
src.tld.dir=${src.etc.dir}/tld
|
||||
|
||||
# test resources get copied into target test classes dir with filtering
|
||||
src.test.resources.dir=${src.etc.dir}/test-resources
|
||||
|
||||
# root of build hierarchy
|
||||
target.dir=${basedir}/target
|
||||
|
||||
# any generated java sources go here
|
||||
target.gen.java.dir=${target.dir}/gen-java-src
|
||||
target.gen.java.test.dir=${target.dir}/gen-java-test-src
|
||||
|
||||
# where built source class files and resources go
|
||||
target.classes.dir=${target.dir}/classes
|
||||
|
||||
# where built test class files and resources go
|
||||
target.testclasses.dir=${target.dir}/test-classes
|
||||
|
||||
# where test results end up
|
||||
target.testresults.dir=${target.dir}/test-reports
|
||||
|
||||
# where JavaDoc generate files go
|
||||
target.javadocs.dir=${target.dir}/javadocs
|
||||
|
||||
# where J2SE/J2EE modules (.jar, .war, .ear) go
|
||||
target.artifacts.dir=${target.dir}/artifacts
|
||||
|
||||
# where target lib archives (.JARs) go
|
||||
target.lib.dir=${target.artifacts.dir}/lib
|
||||
|
||||
# where WAR archive goes
|
||||
target.artifacts.war.dir=${target.artifacts.dir}/war
|
||||
|
||||
# where EAR archive goes
|
||||
target.artifacts.ear.dir=${target.artifacts.dir}/ear
|
||||
|
||||
# where any exploded web-app goes
|
||||
target.war.expanded.dir=${target.artifacts.dir}/war-expanded
|
||||
|
||||
# where any exploded EAR goes
|
||||
target.ear.expanded.dir=${target.artifacts.dir}/ear-expanded
|
||||
|
||||
# file used to provide token filter values during text file copies
|
||||
target.filter.file=${target.dir}/filter.properties
|
||||
|
||||
# where all project documentation resides
|
||||
docs.dir=${basedir}/docs
|
||||
|
||||
# where all project reference documentation resides
|
||||
docs.ref.dir=${docs.dir}/reference
|
||||
|
||||
# where all project reference documentation sources reside
|
||||
docs.ref.src.dir=${docs.dir}/reference/src
|
||||
|
||||
# where all DocBook libraries reside
|
||||
docs.ref.lib.dir=${docs.dir}/reference/lib
|
||||
|
||||
# where the project reference documentation is built
|
||||
docs.ref.target.dir=${docs.dir}/reference/target
|
||||
|
||||
# where the dist target is saved
|
||||
dist.dir=${target.dir}/dist
|
||||
|
||||
# sample: set proper packages here, for javadocs
|
||||
packages=stub.*
|
||||
|
||||
# override default ivy retrieve pattern to include configuration name in path, and no
|
||||
# revision number The main advantage of no revision number in the name is that when pulling
|
||||
# down subsequent snapshots of the same jar, a newer one will just overwrite a previous
|
||||
# version. This means we are not forced to clean the lib dir between retrieves.
|
||||
ivy.retrieve.pattern=${lib.dir}/[conf]/[artifact].[ext]
|
||||
|
||||
# To add the revision, comment out the previous, and add next 2 to build.properties
|
||||
# clear.libs.before.retrieve=anything
|
||||
# ivy.retrieve.pattern=${lib.dir}/[conf]/[artifact]-[revision].[ext]
|
||||
|
||||
# now define patterns for special retrieve used to build repo for release
|
||||
release.repo.ivy.retrieve.pattern=[organisation]/[module]/[revision]/[artifact]-[revision].[ext]
|
||||
release.repo.ivy.retrieve.ivy.pattern=[organisation]/[module]/ivy-[revision].xml
|
||||
|
||||
# override default ivy distrib dir to go under targets
|
||||
ivy.distrib.dir=${target.dir}/dist
|
||||
# override where ivy.xml files are placed, so they are hierarchical and are safe
|
||||
# to merge from multiple projects
|
||||
ivy.srcivypattern=${ivy.distrib.dir}/ivys/[organisation]/[module]/ivy-[revision].xml
|
||||
|
||||
# Location where temporary data goes. Only used for Oracle-specific create-user script
|
||||
# needs to be customized for the user if location is not appropriate, or always for unix
|
||||
data.dir=c:\\temp
|
||||
37
common-build/readme.txt
Normal file
37
common-build/readme.txt
Normal file
@@ -0,0 +1,37 @@
|
||||
Contained in this directory is the Spring Jumpstart common build system used
|
||||
to build all Spring projects.
|
||||
|
||||
This generic build system is ant 1.6 based and also requires Ivy 1.3 or > for dependency management.
|
||||
|
||||
Projects are expected to import master build files contained within
|
||||
this directory as needed for the build targets they require.
|
||||
|
||||
Build targets are organized into logical files:
|
||||
- common-targets.xml : core targets applicable to all projects
|
||||
- clover-targets.xml : for working with clover
|
||||
- tomcat-targets.xml : for deploying webapps to the tomcat servlet container
|
||||
etc...
|
||||
|
||||
As an example, here is Spring Web Flow's project build.xml:
|
||||
|
||||
<project name="spring-webflow" default="dist">
|
||||
|
||||
<property file="build.properties"/>
|
||||
<property file="project.properties"/>
|
||||
<property file="${common.build.dir}/build.properties"/>
|
||||
<property file="${common.build.dir}/project.properties"/>
|
||||
<property file="${user.home}/build.properties"/>
|
||||
|
||||
<property name="project.title" value="Spring Web Flow"/>
|
||||
<property name="project.package" value="org.springframework.webflow"/>
|
||||
|
||||
<import file="${common.build.dir}/common-targets.xml"/>
|
||||
|
||||
<import file="${common.build.dir}/clover-targets.xml"/>
|
||||
|
||||
</project>
|
||||
|
||||
This build.xml imports the "common-targets.xml" fragment containing
|
||||
core targets for compilation, distribution unit creation, and junit
|
||||
testing. It also imports "clover-targets.xml" to facilitate the
|
||||
generation of test coverage reports with clover.
|
||||
49
common-build/spring-targets.xml
Normal file
49
common-build/spring-targets.xml
Normal file
@@ -0,0 +1,49 @@
|
||||
<?xml version="1.0"?>
|
||||
|
||||
<!--
|
||||
Copyright 2002-2005 the original author or authors.
|
||||
|
||||
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.
|
||||
|
||||
- - -
|
||||
Author: Keith Donald
|
||||
-->
|
||||
|
||||
<project name="spring-targets" xmlns:ivy="antlib:fr.jayasoft.ivy.ant">
|
||||
|
||||
<import file="common-targets.xml"/>
|
||||
|
||||
<target name="spring-beandoc" depends="init" description="Generate Spring bean documentation">
|
||||
|
||||
<property name="spring.beandoc.input.files" value="${src.web.dir}/WEB-INF/applicationContext.xml"/>
|
||||
<property name="spring.beandoc.output.dir" value="${target.artifacts.dir}/beandoc/"/>
|
||||
<property name="spring.beandoc.properties" value="${common.build.dir}/beandoc.properties"/>
|
||||
|
||||
<mkdir dir="${spring.beandoc.output.dir}"/>
|
||||
|
||||
<path id="beandoc.classpath">
|
||||
<path refid="test.classpath"/>
|
||||
</path>
|
||||
|
||||
<taskdef name="beandoc" classname="org.springframework.beandoc.client.AntTask">
|
||||
<classpath refid="beandoc.classpath"/>
|
||||
</taskdef>
|
||||
|
||||
<beandoc
|
||||
inputFiles="${spring.beandoc.input.files}"
|
||||
outputDir="${spring.beandoc.output.dir}"
|
||||
beandocProps="${spring.beandoc.properties}"
|
||||
/>
|
||||
</target>
|
||||
|
||||
</project>
|
||||
5
common-build/templates/db/data.xml
Normal file
5
common-build/templates/db/data.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<!DOCTYPE dataset SYSTEM "schema.dtd">
|
||||
<dataset>
|
||||
<!-- table data rows go here -->
|
||||
</dataset>
|
||||
5
common-build/templates/jsp/includeBottom.jsp
Normal file
5
common-build/templates/jsp/includeBottom.jsp
Normal file
@@ -0,0 +1,5 @@
|
||||
<div id="copyright">
|
||||
<p>© Copyright 2006, <a href="http://www.springframework.org">www.springframework.org</a>, under the terms of the Apache 2.0 software license.</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
22
common-build/templates/jsp/includeTop.jsp
Normal file
22
common-build/templates/jsp/includeTop.jsp
Normal file
@@ -0,0 +1,22 @@
|
||||
<%@ page contentType="text/html" %>
|
||||
<%@ page session="false" %>
|
||||
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
|
||||
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
|
||||
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>@TITLE@</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<link rel="stylesheet" href="style.css" type="text/css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div id="logo">
|
||||
<img src="images/spring-logo.jpg" alt="Logo" border="0">
|
||||
</div>
|
||||
|
||||
<div id="navigation">
|
||||
|
||||
</div>
|
||||
7
common-build/templates/jsp/pageshell.jsp
Normal file
7
common-build/templates/jsp/pageshell.jsp
Normal file
@@ -0,0 +1,7 @@
|
||||
<%@ include file="includeTop.jsp" %>
|
||||
|
||||
<div id="content">
|
||||
|
||||
</div>
|
||||
|
||||
<%@ include file="includeBottom.jsp" %>
|
||||
19
common-build/templates/log4j/log4j.properties
Normal file
19
common-build/templates/log4j/log4j.properties
Normal file
@@ -0,0 +1,19 @@
|
||||
log4j.rootCategory=WARN, stdout, logfile
|
||||
|
||||
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
|
||||
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
|
||||
log4j.appender.stdout.layout.ConversionPattern=%d %p [%c] - <%m>%n
|
||||
|
||||
log4j.appender.logfile=org.apache.log4j.RollingFileAppender
|
||||
log4j.appender.logfile.File=${@PROJECT_NAME@.root}/@PROJECT_NAME@.log
|
||||
log4j.appender.logfile.MaxFileSize=512KB
|
||||
|
||||
# Keep three backup files
|
||||
log4j.appender.logfile.MaxBackupIndex=3
|
||||
log4j.appender.logfile.layout=org.apache.log4j.PatternLayout
|
||||
|
||||
#Pattern to output : date priority [category] - <message>line_separator
|
||||
log4j.appender.logfile.layout.ConversionPattern=%d %p [%c] - <%m>%n
|
||||
|
||||
# Enable debug interceptor
|
||||
#log4j.category.org.springframework.aop.interceptor=DEBUG
|
||||
13
common-build/templates/projects/standard/.classpath
Normal file
13
common-build/templates/projects/standard/.classpath
Normal file
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry output="target/classes" kind="src" path="src/java"/>
|
||||
<classpathentry output="target/test-classes" kind="src" path="src/test"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
|
||||
<classpathentry kind="lib" path="lib/global/commons-logging.jar"/>
|
||||
<classpathentry kind="lib" path="lib/global/log4j.jar"/>
|
||||
<classpathentry kind="lib" path="lib/global/spring.jar"/>
|
||||
<classpathentry kind="lib" path="lib/test/easymock.jar"/>
|
||||
<classpathentry kind="lib" path="lib/test/junit.jar"/>
|
||||
<classpathentry kind="lib" path="lib/test/spring-mock.jar"/>
|
||||
<classpathentry kind="output" path="target/classes"/>
|
||||
</classpath>
|
||||
8
common-build/templates/projects/standard/.cvsignore
Normal file
8
common-build/templates/projects/standard/.cvsignore
Normal file
@@ -0,0 +1,8 @@
|
||||
target
|
||||
lib
|
||||
bak
|
||||
build.properties
|
||||
*.log
|
||||
*.jpx.local*
|
||||
*.iws
|
||||
*.tws
|
||||
17
common-build/templates/projects/standard/.project
Normal file
17
common-build/templates/projects/standard/.project
Normal file
@@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>@PROJECT_NAME@</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
||||
19
common-build/templates/projects/standard/build.xml
Normal file
19
common-build/templates/projects/standard/build.xml
Normal file
@@ -0,0 +1,19 @@
|
||||
<?xml version="1.0"?>
|
||||
|
||||
<project name="@PROJECT_NAME@" default="dist">
|
||||
|
||||
<!-- you may override default properties for the build by using entries
|
||||
in a build.properties file, or by just adding 'property' elements
|
||||
here, before the following properties files are loaded -->
|
||||
<property file="build.properties"/>
|
||||
<property file="project.properties"/>
|
||||
<property file="${common.build.dir}/build.properties"/>
|
||||
<property file="${common.build.dir}/project.properties"/>
|
||||
<property file="${user.home}/build.properties"/>
|
||||
|
||||
<import file="${common.build.dir}/common-targets.xml"/>
|
||||
|
||||
<!-- import clover support -->
|
||||
<import file="${common.build.dir}/clover-targets.xml"/>
|
||||
|
||||
</project>
|
||||
35
common-build/templates/projects/standard/ivy.xml
Normal file
35
common-build/templates/projects/standard/ivy.xml
Normal file
@@ -0,0 +1,35 @@
|
||||
<ivy-module version="1.1">
|
||||
|
||||
<info organisation="@ORGANISATION@" module="@PROJECT_NAME@"/>
|
||||
|
||||
<configurations>
|
||||
<!-- default configuration that 'by default' pulls in the global configuration -->
|
||||
<conf name="default" extends="global"/>
|
||||
|
||||
<!-- core dependencies needed at compile-time, test-time, and runtime -->
|
||||
<conf name="global" visibility="private"/>
|
||||
|
||||
<!-- additional dependencies needed only at build-time -->
|
||||
<conf name="buildtime" visibility="private"/>
|
||||
|
||||
<!-- additional dependencies needed only at test-time -->
|
||||
<conf name="test" visibility="private"/>
|
||||
</configurations>
|
||||
|
||||
<dependencies defaultconf="global->default">
|
||||
<!-- global (compile, test, runtime) dependencies -->
|
||||
<dependency org="apache" name="commons-logging" rev="1.1"/>
|
||||
<dependency org="apache" name="log4j" rev="1.2.13"/>
|
||||
<dependency org="org.springframework" name="spring-beans" rev="2.0-rc3"/>
|
||||
<dependency org="org.springframework" name="spring-core" rev="2.0-rc3"/>
|
||||
<dependency org="org.springframework" name="spring-context" rev="2.0-rc3"/>
|
||||
|
||||
<!-- build time only dependencies -->
|
||||
|
||||
<!-- test time only dependencies -->
|
||||
<dependency org="easymock" name="easymock" rev="1.1" conf="test->default"/>
|
||||
<dependency org="cenqua" name="clover" rev="1.3.11" conf="test->default"/>
|
||||
<dependency org="junit" name="junit" rev="3.8.1" conf="test->default"/>
|
||||
<dependency org="springframework" name="spring-mock" rev="2.0-rc3" conf="test->default"/>
|
||||
</dependencies>
|
||||
</ivy-module>
|
||||
@@ -0,0 +1,5 @@
|
||||
# to override these or other properties with local user settings,
|
||||
# create a unversioned build.properties file
|
||||
|
||||
# The location of the common build system
|
||||
common.build.dir=${basedir}/../common-build
|
||||
@@ -0,0 +1,33 @@
|
||||
# $Header$
|
||||
|
||||
# Contains filterable project settings. Setting placeholders in filterable project text
|
||||
# files will be replaced with these values when the 'statics' build target is run.
|
||||
#
|
||||
# You may add static settings directly to this source file in the format:
|
||||
# setting=value e.g MY_SETTING=myvalue
|
||||
# This is appropriate usage if you know the setting value will never change.
|
||||
#
|
||||
# At build time this source file is copied to the ${target.dir} where additional
|
||||
# dynamic settings may be appended using the <propertyfile> task. Use this approach
|
||||
# when a setting value depends on the build or the local user's environment.
|
||||
#
|
||||
# An example of this approach is shown below:
|
||||
#
|
||||
# build.xml
|
||||
# <target name="build.prepare" depends="common-targets.build.prepare">
|
||||
# <!-- Append additional local settings that are applicable to this project -->
|
||||
# <propertyfile file="${target.filter.file}">
|
||||
# <!-- key=the name of the setting
|
||||
# value=the property in your build.properties file that has the local setting value -->
|
||||
# <entry key="MY_LOCAL_SETTING" value="${my.local.setting}" />
|
||||
# </propertyfile>
|
||||
# </target>
|
||||
#
|
||||
# This allows for dynamic replacement values that are sourced from local properties files to facilitate
|
||||
# local user settings.
|
||||
#
|
||||
# To refer to filterable settings within project source files like config files, JSPs, or
|
||||
# other text files use the standard ant placeholder format:
|
||||
# @SETTING_NAME@ e.g, @MY_SETTING@ and @MY_LOCAL_SETTING@
|
||||
#
|
||||
# Your settings:
|
||||
@@ -0,0 +1,16 @@
|
||||
log4j.rootCategory=WARN, stdout, logfile
|
||||
|
||||
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
|
||||
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
|
||||
log4j.appender.stdout.layout.ConversionPattern=%d %p [%c] - <%m>%n
|
||||
|
||||
log4j.appender.logfile=org.apache.log4j.RollingFileAppender
|
||||
log4j.appender.logfile.File=${@PROJECT_NAME@.root}/@PROJECT_NAME@.log
|
||||
log4j.appender.logfile.MaxFileSize=512KB
|
||||
|
||||
# Keep three backup files
|
||||
log4j.appender.logfile.MaxBackupIndex=3
|
||||
log4j.appender.logfile.layout=org.apache.log4j.PatternLayout
|
||||
|
||||
#Pattern to output : date priority [category] - <message>line_separator
|
||||
log4j.appender.logfile.layout.ConversionPattern=%d %p [%c] - <%m>%n
|
||||
@@ -0,0 +1,5 @@
|
||||
test-resources
|
||||
---------
|
||||
Test-time related configuration files (*.properties, *.xml) and other resources reside in this directory. These files are copied into the test classpath, they are not included in the project distribution unit.
|
||||
|
||||
You may remove this file once you understand the project structure and the purpose of this directory: this file also serves as a "empty directory" placeholder so CVS won't prune the directory.
|
||||
@@ -0,0 +1,5 @@
|
||||
java
|
||||
------
|
||||
Project source code resides in this directory. Files here are compiled into classes placed in ${project.dir}/target/classes and added to the compile classpath.
|
||||
|
||||
You may remove this file once you understand the project structure and the purpose of this directory: this file also serves as a "empty directory" placeholder so CVS won't prune the directory.
|
||||
@@ -0,0 +1,5 @@
|
||||
resources
|
||||
---------
|
||||
Tweakable application configuration files (*.properties) and other resources reside in this directory.
|
||||
|
||||
You may remove this file once you understand the project structure and the purpose of this directory: this file also serves as a "empty directory" placeholder so CVS won't prune the directory.
|
||||
@@ -0,0 +1,5 @@
|
||||
test
|
||||
------
|
||||
Project unit and integration tests reside within this directory. Files here are compiled into classes placed in ${project.dir}/target/test-classes and added to the test classpath.
|
||||
|
||||
You may remove this file once you understand the project structure and the purpose of this directory: this file also serves as a "empty directory" placeholder so CVS won't prune the directory.
|
||||
@@ -0,0 +1,19 @@
|
||||
log4j.rootCategory=WARN, stdout, logfile
|
||||
|
||||
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
|
||||
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
|
||||
log4j.appender.stdout.layout.ConversionPattern=%d %p [%c] - <%m>%n
|
||||
|
||||
log4j.appender.logfile=org.apache.log4j.RollingFileAppender
|
||||
log4j.appender.logfile.File=${@PROJECT_NAME@.root}/@PROJECT_NAME@.log
|
||||
log4j.appender.logfile.MaxFileSize=512KB
|
||||
|
||||
# Keep three backup files
|
||||
log4j.appender.logfile.MaxBackupIndex=3
|
||||
log4j.appender.logfile.layout=org.apache.log4j.PatternLayout
|
||||
|
||||
#Pattern to output : date priority [category] - <message>line_separator
|
||||
log4j.appender.logfile.layout.ConversionPattern=%d %p [%c] - <%m>%n
|
||||
|
||||
# Enable debug interceptor
|
||||
#log4j.category.org.springframework.aop.interceptor=DEBUG
|
||||
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="
|
||||
http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans.xsd">
|
||||
|
||||
</beans>
|
||||
41
common-build/templates/projects/webapp/WEB-INF/web.xml
Normal file
41
common-build/templates/projects/webapp/WEB-INF/web.xml
Normal file
@@ -0,0 +1,41 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
|
||||
<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
|
||||
version="2.4">
|
||||
|
||||
<!--
|
||||
- Location of the Spring bean definition files, for initialization of
|
||||
- root spring application context
|
||||
-->
|
||||
<context-param>
|
||||
<param-name>contextConfigLocation</param-name>
|
||||
<param-value>
|
||||
<!-- Service layer config files go here, space delimited -->
|
||||
</param-value>
|
||||
</context-param>
|
||||
|
||||
<!--
|
||||
- Load the spring root application context from the paths define by
|
||||
- the contextConfigLocation param.
|
||||
-->
|
||||
<listener>
|
||||
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
|
||||
</listener>
|
||||
|
||||
<servlet>
|
||||
<servlet-name>@PROJECT_NAME@</servlet-name>
|
||||
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
|
||||
<init-param>
|
||||
<param-name>contextConfigLocation</param-name>
|
||||
<param-value>/WEB-INF/dispatcher-servlet-config.xml</param-value>
|
||||
</init-param>
|
||||
</servlet>
|
||||
|
||||
<servlet-mapping>
|
||||
<servlet-name>@PROJECT_NAME@</servlet-name>
|
||||
<url-pattern>*.htm</url-pattern>
|
||||
</servlet-mapping>
|
||||
|
||||
</web-app>
|
||||
10
common-build/templates/projects/webapp/index.html
Normal file
10
common-build/templates/projects/webapp/index.html
Normal file
@@ -0,0 +1,10 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Shell</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
2
common-build/templates/readme.txt
Normal file
2
common-build/templates/readme.txt
Normal file
@@ -0,0 +1,2 @@
|
||||
Contained in this directory are useful templates for projects, configuration files,
|
||||
and Java artifacts for products such as Spring, Spring Web Flow, and log4j.
|
||||
@@ -0,0 +1,24 @@
|
||||
package webflow.templates;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import org.springframework.webflow.definition.registry.FlowDefinitionResource;
|
||||
import org.springframework.webflow.test.execution.AbstractXmlFlowExecutionTests;
|
||||
import org.springframework.webflow.test.execution.MockFlowServiceLocator;
|
||||
|
||||
public class FlowExecutionTestTemplate extends AbstractXmlFlowExecutionTests {
|
||||
|
||||
public void testStartFlow() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected FlowDefinitionResource getFlowDefinitionResource() {
|
||||
return createFlowDefinitionResource("/path/to/myflow.xml");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void registerMockServices(MockFlowServiceLocator serviceRegistry) {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<flow xmlns="http://www.springframework.org/schema/webflow"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/webflow
|
||||
http://www.springframework.org/schema/webflow/spring-webflow-1.0.xsd">
|
||||
|
||||
<start-state idref="displayForm"/>
|
||||
|
||||
<view-state id="displayForm" view="form">
|
||||
<render-actions>
|
||||
<action bean="formAction" method="setupForm"/>
|
||||
</render-actions>
|
||||
<transition on="submit" to="finish">
|
||||
<action bean="formAction" method="bindAndValidate"/>
|
||||
</transition>
|
||||
</view-state>
|
||||
|
||||
<end-state id="finish"/>
|
||||
|
||||
<import resource="my-flow-beans.xml"/>
|
||||
|
||||
</flow>
|
||||
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<flow xmlns="http://www.springframework.org/schema/webflow"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/webflow
|
||||
http://www.springframework.org/schema/webflow/spring-webflow-1.0.xsd">
|
||||
|
||||
<start-state idref="displayView" />
|
||||
|
||||
<view-state id="displayView" view="view">
|
||||
<transition on="submit" to="finish"/>
|
||||
</view-state>
|
||||
|
||||
<end-state id="finish"/>
|
||||
|
||||
</flow>
|
||||
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<flow xmlns="http://www.springframework.org/schema/webflow"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="
|
||||
http://www.springframework.org/schema/webflow
|
||||
http://www.springframework.org/schema/webflow/spring-webflow-1.0.xsd">
|
||||
|
||||
<start-state idref="yourStartStateId" />
|
||||
|
||||
<!-- Define your states here -->
|
||||
|
||||
</flow>
|
||||
@@ -0,0 +1,33 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN"
|
||||
"http://www.springframework.org/dtd/spring-beans.dtd">
|
||||
|
||||
<beans>
|
||||
|
||||
<!--
|
||||
Exposes web flows for execution at a single request URL.
|
||||
The id of a flow to launch should be passed in by clients using
|
||||
the "_flowId" request parameter:
|
||||
e.g. /flowController.htm?_flowId=myflow
|
||||
-->
|
||||
<bean name="/flowController.htm" class="org.springframework.webflow.executor.mvc.FlowController">
|
||||
<property name="flowExecutor" ref="flowExecutor" />
|
||||
</bean>
|
||||
|
||||
<!-- Launches new flow executions and resumes existing executions: Spring 1.2 config version -->
|
||||
<bean id="flowExecutor" class="org.springframework.webflow.config.FlowExecutorFactoryBean">
|
||||
<property name="definitionLocator" ref="flowRegistry"/>
|
||||
</bean>
|
||||
|
||||
<!-- Creates the registry of flow definitions for this application: Spring 1.2 config version -->
|
||||
<bean id="flowRegistry" class="org.springframework.webflow.engine.builder.xml.XmlFlowRegistryFactoryBean">
|
||||
<property name="flowLocations" value="/WEB-INF/flows/**/*-flow.xml"/>
|
||||
</bean>
|
||||
|
||||
<!-- Resolves flow view names to .jsp templates -->
|
||||
<bean id="viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver">
|
||||
<property name="prefix" value="/WEB-INF/jsp/" />
|
||||
<property name="suffix" value=".jsp" />
|
||||
</bean>
|
||||
|
||||
</beans>
|
||||
35
common-build/templates/spring-webflow/webflow-config-1.0.xml
Normal file
35
common-build/templates/spring-webflow/webflow-config-1.0.xml
Normal file
@@ -0,0 +1,35 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:flow="http://www.springframework.org/schema/webflow-config"
|
||||
xsi:schemaLocation="
|
||||
http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
|
||||
http://www.springframework.org/schema/webflow-config
|
||||
http://www.springframework.org/schema/webflow-config/spring-webflow-config-1.0.xsd">
|
||||
|
||||
<!--
|
||||
Exposes web flows for execution at a single request URL.
|
||||
The id of a flow to launch should be passed in by clients using
|
||||
the "_flowId" request parameter:
|
||||
e.g. /flowController.htm?_flowId=myflow
|
||||
-->
|
||||
<bean name="/flowController.htm" class="org.springframework.webflow.executor.mvc.FlowController">
|
||||
<property name="flowExecutor" ref="flowExecutor" />
|
||||
</bean>
|
||||
|
||||
<!-- Launches new flow executions and resumes existing executions. -->
|
||||
<flow:executor id="flowExecutor" registry-ref="flowRegistry"/>
|
||||
|
||||
<!-- Creates the registry of flow definitions for this application -->
|
||||
<flow:registry id="flowRegistry">
|
||||
<flow:location path="/WEB-INF/flows/**/*-flow.xml" />
|
||||
</flow:registry>
|
||||
|
||||
<!-- Resolves flow view names to .jsp templates -->
|
||||
<bean id="viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver">
|
||||
<property name="prefix" value="/WEB-INF/jsp/" />
|
||||
<property name="suffix" value=".jsp" />
|
||||
</bean>
|
||||
|
||||
</beans>
|
||||
18
common-build/templates/spring-webflow/webflow-form.jsp
Normal file
18
common-build/templates/spring-webflow/webflow-form.jsp
Normal file
@@ -0,0 +1,18 @@
|
||||
<%@ include file="includeTop.jsp" %>
|
||||
|
||||
<div id="content">
|
||||
<form action="flowController.htm" method="post"/>
|
||||
<table>
|
||||
<tr>
|
||||
<td colspan="2" class="buttonBar">
|
||||
<!-- Tell webflow what flow execution we're participating in -->
|
||||
<input type="hidden" name="_flowExecutionKey" value="${flowExecutionKey}"/>
|
||||
<!-- Tell webflow what event occurred -->
|
||||
<input type="submit" name="_eventId_submit" value="Submit">
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<%@ include file="includeBottom.jsp" %>
|
||||
9
common-build/templates/spring/bean-definitions-1.2.xml
Normal file
9
common-build/templates/spring/bean-definitions-1.2.xml
Normal file
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN"
|
||||
"http://www.springframework.org/dtd/spring-beans.dtd">
|
||||
|
||||
<beans>
|
||||
|
||||
<!-- Deploy your beans here -->
|
||||
|
||||
</beans>
|
||||
10
common-build/templates/spring/bean-definitions-2.0.xml
Normal file
10
common-build/templates/spring/bean-definitions-2.0.xml
Normal file
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="
|
||||
http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
|
||||
|
||||
<!-- Deploy your beans here -->
|
||||
|
||||
</beans>
|
||||
4
common-build/templates/tomcat/context.xml
Normal file
4
common-build/templates/tomcat/context.xml
Normal file
@@ -0,0 +1,4 @@
|
||||
<Context path="/@PROJECT_NAME@" docBase="@DOC_BASE@"
|
||||
debug="0" privileged="true">
|
||||
|
||||
</Context>
|
||||
139
common-build/tomcat-targets.xml
Normal file
139
common-build/tomcat-targets.xml
Normal file
@@ -0,0 +1,139 @@
|
||||
<?xml version="1.0"?>
|
||||
|
||||
<!--
|
||||
|
||||
Copyright 2002-2005 the original author or authors.
|
||||
|
||||
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.
|
||||
|
||||
- - -
|
||||
|
||||
Author: Keith Donald
|
||||
Author: Colin Sampaleanu
|
||||
|
||||
Ant XML fragment that contains useful targets for working with tomcat. These
|
||||
include targets to spawn a tomcat process deplyoing the project, as well as update
|
||||
the deployed application and static web content.
|
||||
|
||||
This ant XML fragment is meant to be imported into a project build file, along with
|
||||
common-targets.xml. This is an optional module, and due to the way the ant import works,
|
||||
there is no way to automatically hook this up into the build. The importing project
|
||||
must override appropropriate 'hook' targets from common-targets.xml, and then have
|
||||
the override targets depend on both the targets from common-targets and those from here.
|
||||
|
||||
-->
|
||||
|
||||
<!--
|
||||
|
||||
For these tasks to work, the specified user (tomcat.username property below,
|
||||
which defaults to 'manager' but may be specified in build.properties) must be
|
||||
a user defined in the TomCat server, and that user must have the role
|
||||
'manager'. For the default in-memory realm in TomCat, this is done by modifying
|
||||
conf/tomcat-users.xml in the TomCat install. See
|
||||
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/manager-howto.html
|
||||
for more information.
|
||||
-->
|
||||
|
||||
<project name="tomcat-targets" xmlns:ivy="antlib:fr.jayasoft.ivy.ant">
|
||||
|
||||
<import file="common-targets.xml" />
|
||||
|
||||
<target name="tomcat.init" depends="init,guard.tomcatdir">
|
||||
<property name="tomcat.deploy.dir" value="${tomcat.dir}/webapps" />
|
||||
<property name="tomcat.manager.url" value="http://localhost:8080/manager" />
|
||||
<property name="tomcat.username" value="manager" />
|
||||
<property name="tomcat.password" value="manager" />
|
||||
|
||||
<taskdef resource="org/apache/catalina/ant/catalina.tasks" onerror="ignore">
|
||||
<classpath>
|
||||
<filelist dir="${tomcat.dir}/server/lib">
|
||||
<file name="catalina.jar" />
|
||||
<file name="catalina-ant.jar" />
|
||||
</filelist>
|
||||
</classpath>
|
||||
</taskdef>
|
||||
</target>
|
||||
|
||||
<target name="guard.tomcatdir" unless="tomcat.dir">
|
||||
<fail message="The target you are attempting to run requires the ${tomcat.dir} property to be set, which doesn't appear to be" />
|
||||
</target>
|
||||
|
||||
<target name="tomcat-deploy" depends="tomcat.init, war" description="Install this web application to tomcat">
|
||||
<deploy url="${tomcat.manager.url}" username="${tomcat.username}" password="${tomcat.password}" path="/${project.webapp.name}" war="${project.war}" />
|
||||
</target>
|
||||
|
||||
<target name="tomcat-undeploy" depends="tomcat.init" description="Remove this application from tomcat">
|
||||
<undeploy url="${tomcat.manager.url}" username="${tomcat.username}" password="${tomcat.password}" path="/${project.webapp.name}" failonerror="false" />
|
||||
</target>
|
||||
|
||||
<target name="tomcat-redeploy" depends="tomcat-undeploy, tomcat-deploy" description="Redeploy the web application" />
|
||||
|
||||
<target name="tomcat-reload" depends="tomcat.init" description="Reload this application in tomcat">
|
||||
<reload url="${tomcat.manager.url}" username="${tomcat.username}" password="${tomcat.password}" path="/${project.name}" />
|
||||
</target>
|
||||
|
||||
<target name="tomcat-copy-war" depends="tomcat.init, war" description="Copy this application .war to tomcat">
|
||||
<copy file="${project.war}" todir="${tomcat.deploy.dir}" />
|
||||
</target>
|
||||
|
||||
<target name="tomcat-clean-war" depends="tomcat.init" description="Clean this application expanded war directory from tomcat">
|
||||
<delete failonerror="false" dir="${tomcat.deploy.dir}/${project.webapp.name}" />
|
||||
</target>
|
||||
|
||||
<target name="tomcat-refresh-war" depends="tomcat-clean-war, tomcat-copy-war" description="Clean and copy this application .war to tomcat">
|
||||
</target>
|
||||
|
||||
<target name="tomcat-launch" depends="tomcat.init,tomcat-refresh-war" description="Launch the tomcat server process and have it deploy this web application">
|
||||
<exec dir="${tomcat.dir}/bin" executable="startup.bat" spawn="true" vmlauncher="false">
|
||||
<env key="JAVA_OPTS" value="${tomcat.javaopts}" />
|
||||
</exec>
|
||||
</target>
|
||||
|
||||
<target name="tomcat-start" depends="tomcat.init" description="Start this web application in tomcat">
|
||||
<start url="${tomcat.manager.url}" username="${tomcat.username}" password="${tomcat.password}" path="/${project.webapp.name}" />
|
||||
</target>
|
||||
|
||||
<target name="tomcat-stop" depends="tomcat.init" description="Stop this web application in tomcat">
|
||||
<stop url="${tomcat.manager.url}" username="${tomcat.username}" password="${tomcat.password}" path="/${project.webapp.name}" />
|
||||
</target>
|
||||
|
||||
<target name="tomcat-list" depends="tomcat.init" description="List installed tomcat applications">
|
||||
<list url="${tomcat.manager.url}" username="${tomcat.username}" password="${tomcat.password}" />
|
||||
</target>
|
||||
|
||||
<target name="tomcat-content" depends="statics, tomcat.init" description="Copy web content to tomcat without redeploy">
|
||||
<copy todir="${tomcat.deploy.dir}/${project.webapp.name}">
|
||||
<fileset dir="${target.war.expanded.dir}">
|
||||
<patternset refid="web.public.content.files" />
|
||||
</fileset>
|
||||
<fileset dir="${target.war.expanded.dir}">
|
||||
<patternset refid="web.protected.content.files" />
|
||||
</fileset>
|
||||
</copy>
|
||||
</target>
|
||||
|
||||
<target name="tomcat-context" depends="init.post,tomcat-context-error">
|
||||
<delete quiet="true" file="${tomcat.dir}/conf/Catalina/localhost/${ant.project.name}.xml" />
|
||||
<!-- create tomcat context file -->
|
||||
<copy file="${common.build.dir}/templates/tomcat/context.xml" tofile="${tomcat.dir}/conf/Catalina/${ant.project.name}.xml" />
|
||||
<replace file="${tomcat.dir}/conf/Catalina/${ant.project.name}.xml" token="@PROJECT_NAME@" value="${ant.project.name}" />
|
||||
<replace file="${tomcat.dir}/conf/Catalina/${ant.project.name}.xml" token="@DOC_BASE@" value="${target.war.expanded.dir}" />
|
||||
<copy file="${tomcat.dir}/conf/Catalina/${ant.project.name}.xml" todir="${tomcat.dir}/conf/Catalina/localhost" />
|
||||
<delete quiet="true" file="${tomcat.dir}/conf/Catalina/${ant.project.name}.xml" />
|
||||
</target>
|
||||
|
||||
<target name="tomcat-context-error" unless="tomcat.dir">
|
||||
<fail>Set tomcat.dir in your USER_HOME/build.properties file (create if it doesn't exist)</fail>
|
||||
</target>
|
||||
|
||||
</project>
|
||||
13
common-build/version.txt
Normal file
13
common-build/version.txt
Normal file
@@ -0,0 +1,13 @@
|
||||
version 20060409-1
|
||||
|
||||
Changelog:
|
||||
2006-08-25: Keith: updated project and file templates inside "templates"
|
||||
2006-04-09: Colin: upgrade Ivy to 1.3.1
|
||||
2006-03-26: Colin: upgrade Ivy to snapshot 20060322, for transitive dep fix.
|
||||
2006-03-08: Colin: upgrade Ivy to 1.3RC3
|
||||
2006-02-17: Colin: Add retrieve-to-repo to common-targets.xml, user for release procoess
|
||||
2006-02-13: Arjen: Standard docbook images are now also copied in doc-targets.xml
|
||||
2006-02-08: Colin: add dir="${basedir} to junit task so it runs ok from other dirs
|
||||
2006-01-04: Colin: add description element to "retrieve" since it's not an internal target
|
||||
2005-11-27: Update Spring version in templates
|
||||
2005-11-20: Arjen: add gen java source dir functionality for test sources too
|
||||
Reference in New Issue
Block a user