maven-plugins/tjdo/plugin.jelly
evenisse 85df922d35 Update to ASL v.2
git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@114795 13f79535-47bb-0310-9956-ffa450edef68
2004-03-04 18:40:25 +00:00

115 lines
4.3 KiB
XML

<?xml version="1.0"?>
<!--
/*
* Copyright 2001-2004 The Apache Software Foundation.
*
* 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.
*/
-->
<!--
============================================================================
Plugin for Triactive JDO implementation.
============================================================================
-->
<project
xmlns:j="jelly:core"
xmlns:ant="jelly:ant"
xmlns:u="jelly:util"
xmlns:doc="doc">
<!--
========================================================================
Default goal.
========================================================================
-->
<goal name="tjdo"
description="Enhance classes for use with Triactive JDO"
prereqs="tjdo:enhance"/>
<!--
========================================================================
Initializations.
========================================================================
-->
<goal name="tjdo:init">
<!-- Construct CLASSPATH to include TJDO and dependencies -->
<path id="tjdoClasspath">
<path refid="maven.dependency.classpath"/>
<pathelement path="${maven.build.dest}"/>
<pathelement path="${plugin.getDependencyPath('tjdo')}"/>
</path>
<!-- Construct FileSet of JDO meta-data files -->
<j:set var="jdo_fileset_dir_var_name" value="maven.tjdo.jdo.fileset.dir"/>
<fileset dir="${context.getVariable(jdo_fileset_dir_var_name)}" id="jdo.files">
<!-- Includes -->
<j:set var="jdo_fileset_include_var_name" value="maven.tjdo.jdo.fileset.include"/>
<j:if test="${context.getVariable(jdo_fileset_include_var_name) != null}">
<include name="${context.getVariable(jdo_fileset_include_var_name)}"/>
</j:if>
<!-- Excludes -->
<j:set var="jdo_fileset_exclude_var_name" value="maven.tjdo.jdo.fileset.exclude"/>
<j:if test="${context.getVariable(jdo_fileset_exclude_var_name) != null}">
<exclude name="${context.getVariable(jdo_fileset_exclude_var_name)}"/>
</j:if>
</fileset>
<pathconvert pathsep=" " property="tjdoMetaDataFiles" refid="jdo.files"/>
</goal>
<!--
========================================================================
Run the enhancer on any class files to make the persistable.
========================================================================
-->
<goal name="tjdo:enhance"
description="Provides the enhancement of classes to use TJDO for persistence"
prereqs="tjdo:init">
<echo>JDO-enhancing classes for Triactive JDO</echo>
<!-- Run enhancer on JDO files -->
<ant:java dir="${maven.build.dest}"
classname="com.triactive.jdo.enhance.SunReferenceEnhancer"
failonerror="true"
fork="true">
<classpath refid="tjdoClasspath"/>
<arg line="${tjdoMetaDataFiles}"/>
</ant:java>
<echo>Classes are now JDO-enhanced for Triactive JDO</echo>
</goal>
<!--
========================================================================
Goal to drop the JDO tables
========================================================================
-->
<goal name="tjdo:drop-tables"
description="Drops the tables managed by Triactive JDO."
prereqs="tjdo:init">
<!-- Drop JDO tables defined in JDO_TABLE -->
<ant:java dir="${maven.build.dest}"
classname="com.triactive.jdo.DropJDOTables"
failonerror="true"
fork="true">
<classpath refid="tjdoClasspath"/>
</ant:java>
<echo>DB tables for Triactive JDO have now been dropped</echo>
</goal>
</project>