tfischer 2005/07/17 21:00:54
Modified: src/generator project.xml project.properties maven.xml
Added: src/generator/src/conf build-src.properties
Log:
moved default target and resources from the generator's maven.xml to its
project.xml
added a hack to resolve dependency on project-base.xml for the generator
source distribution
removed the templates from the binary distribution. They will be released in
a separate artifact.
Revision Changes Path
1.21 +44 -3 db-torque/src/generator/project.xml
Index: project.xml
===================================================================
RCS file: /home/cvs/db-torque/src/generator/project.xml,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- project.xml 8 Jul 2005 17:26:12 -0000 1.20
+++ project.xml 18 Jul 2005 03:59:44 -0000 1.21
@@ -18,7 +18,7 @@
-->
<project>
- <extend>../../project-base.xml</extend>
+ <extend>${torque.project.base.path}</extend>
<pomVersion>3</pomVersion>
<id>torque-gen</id>
<groupId>torque</groupId>
@@ -62,6 +62,20 @@
</dependency>
<dependency>
+ <artifactId>logkit</artifactId>
+ <groupId>logkit</groupId>
+ <version>1.0.1</version>
+ <url>http://avalon.apache.org/products/runtime/system/logging/</url>
+ </dependency>
+
+ <dependency>
+ <groupId>torque</groupId>
+ <artifactId>torque-gen-templates</artifactId>
+ <version>3.2-dev</version>
+ <url>http://db.apache.org/torque/generator/templates/</url>
+ </dependency>
+
+ <dependency>
<artifactId>velocity</artifactId>
<groupId>velocity</groupId>
<version>1.3.1</version>
@@ -105,7 +119,34 @@
<exclude>**/BaseTestCase.java</exclude>
</excludes>
</unitTest>
-
- <resources></resources>
+ <defaultGoal>jar:jar</defaultGoal>
+ <resources>
+ <resource>
+ <targetPath>org/apache/torque</targetPath>
+ <filtering>false</filtering>
+ <directory>src/conf</directory>
+ <includes>
+ <include>default.properties</include>
+ </includes>
+ </resource>
+ <resource>
+ <targetPath>org/apache/torque/engine/database/transform</targetPath>
+ <filtering>false</filtering>
+ <directory>src/dtd</directory>
+ <includes>
+ <include>database.dtd</include>
+ </includes>
+ </resource>
+ <resource>
+ <targetPath></targetPath>
+ <filtering>false</filtering>
+ <directory>src/conf</directory>
+ <includes>
+ <include>commons-logging.properties</include>
+ <include>log4j.properties</include>
+ <include>simplelog.properties</include>
+ </includes>
+ </resource>
+ </resources>
</build>
</project>
1.4 +14 -1 db-torque/src/generator/project.properties
Index: project.properties
===================================================================
RCS file: /home/cvs/db-torque/src/generator/project.properties,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- project.properties 26 Aug 2004 11:43:51 -0000 1.3
+++ project.properties 18 Jul 2005 03:59:49 -0000 1.4
@@ -24,6 +24,19 @@
# your build.properties file.
# -------------------------------------------------------------------
+# -------------------------------------------------------------------
+# Workaround to allow building from the source distribution.
+# In cvs, the extends path is ../../project-base.xml,
+# whereas in the source distribution, the extends path is
+# project-base.xml
+# The property in this file controls the path for the cvs version.
+# The property can be removed as soon as maven distributes a
+# project.xml where the <extends> is already resolved.
+# Outside building from the source distribution, this property has
+# no effect.
+# -------------------------------------------------------------------
+torque.project.base.path = ../../project-base.xml
+
#========================================================================
#
# Maven building and deploy. These settings are for deployment to
www.apache.org.
1.12 +29 -42 db-torque/src/generator/maven.xml
Index: maven.xml
===================================================================
RCS file: /home/cvs/db-torque/src/generator/maven.xml,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- maven.xml 31 Jan 2005 19:43:58 -0000 1.11
+++ maven.xml 18 Jul 2005 03:59:54 -0000 1.12
@@ -26,7 +26,6 @@
<!--
======================================================================== -->
<project
- default="jar:jar"
xmlns:pom="pom"
xmlns:deploy="deploy">
@@ -34,46 +33,6 @@
<property file="${user.home}/build.properties" />
<!-- ================================================================== -->
- <!-- C O M P I L E P O S T G O A L -->
- <!-- ================================================================== -->
- <!-- copies the templates, dtd, .. to the ${maven.build.dest} to -->
- <!-- include them in the jar file -->
- <!-- ================================================================== -->
- <postGoal name="java:compile">
- <!-- copy default.properties to the right place -->
- <copy
- file="${maven.src.dir}/conf/default.properties"
- todir="${maven.build.dest}/org/apache/torque"
- />
-
- <!-- copy database.dtd to the right place -->
- <copy
- file="${maven.src.dir}/dtd/database.dtd"
- todir="${maven.build.dest}/org/apache/torque/engine/database/transform"
- />
-
- <!-- copy logging properties to the right place -->
- <copy
- file="${maven.src.dir}/conf/commons-logging.properties"
- todir="${maven.build.dest}"
- />
- <copy
- file="${maven.src.dir}/conf/simplelog.properties"
- todir="${maven.build.dest}"
- />
- <copy
- file="${maven.src.dir}/conf/log4j.properties"
- todir="${maven.build.dest}"
- />
-
- <!-- copy templates to the right place -->
- <copy todir="${maven.build.dest}">
- <fileset dir="${maven.src.dir}/templates" />
- </copy>
- </postGoal>
-
-
- <!-- ================================================================== -->
<!-- X D O C : I N I T P O S T G O A L -->
<!-- ================================================================== -->
<postGoal name="xdoc:init">
@@ -93,6 +52,34 @@
<preGoal name="dist:build-bin">
<!-- include listed dependencies -->
<deploy:copy-deps todir="${maven.dist.bin.assembly.dir}/lib"
excludes="jndi:jndi,jdbc" />
+
+ <!--copy build-torque.xml to the right place -->
+ <copy
+ file="${maven.src.dir}/conf/build-torque.xml"
+ todir="${maven.dist.bin.assembly.dir}"
+ />
+ <copy
+ file="${maven.src.dir}/conf/build.properties"
+ todir="${maven.dist.bin.assembly.dir}"
+ />
+ </preGoal>
+
+ <!-- ================================================================== -->
+ <!-- D I S T : B U I L D _ S R C P R E G O A L -->
+ <!-- ================================================================== -->
+ <!-- copies files to the right place to get pom <extends> path right -->
+ <!-- ================================================================== -->
+ <preGoal name="dist:build-src">
+ <!--copy build-src.properties to the right place -->
+ <!--see comment in build-src.properties -->
+ <copy
+ file="${maven.src.dir}/conf/build-src.properties"
+ tofile="${maven.dist.src.assembly.dir}/build.properties"
+ />
+ <copy
+ file="${torque.project.base.path}"
+ todir="${maven.dist.src.assembly.dir}"
+ />
</preGoal>
<!-- ================================================================== -->
1.1 db-torque/src/generator/src/conf/build-src.properties
Index: build-src.properties
===================================================================
# -------------------------------------------------------------------
# Workaround to allow building from the source distribution.
# In cvs, the extends path is ../../project-base.xml,
# whereas in the source distribution, the extends is project-base.xml
# This file gets copied into the project root of the source
# distribution and the definition of ${torque.project.base.path}
# overwrites the definition in project.properties.
# The property can be removed as soon as maven distributes a
# project.xml where the <extends> is already resolved.
# Outside building from the source distribution, this property has
# no effect.
# -------------------------------------------------------------------
torque.project.base.path = ./project-base.xml
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]