Author: henning
Date: Sun Oct 30 11:44:31 2005
New Revision: 329604
URL: http://svn.apache.org/viewcvs?rev=329604&view=rev
Log:
Repair the maven build.
Modified:
jakarta/velocity/core/trunk/maven.xml
jakarta/velocity/core/trunk/project.xml
Modified: jakarta/velocity/core/trunk/maven.xml
URL:
http://svn.apache.org/viewcvs/jakarta/velocity/core/trunk/maven.xml?rev=329604&r1=329603&r2=329604&view=diff
==============================================================================
--- jakarta/velocity/core/trunk/maven.xml (original)
+++ jakarta/velocity/core/trunk/maven.xml Sun Oct 30 11:44:31 2005
@@ -1,10 +1,98 @@
<?xml version="1.0" encoding="UTF-8"?>
-<project default="jar:jar">
- <!-- The ClasspathResourceTestCase, TexenTestCase and AnakiaTestCase
- require that some prerequisites are run before the actual test
- cases (which compare only outputs) are executed.
- -->
+<!--
+ Copyright 2001-2005 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.
+-->
+
+<!-- ========================================================================
-->
+<!--
-->
+<!-- maven Buildfile
-->
+<!--
-->
+<!-- $Id$ -->
+<!--
-->
+<!-- ========================================================================
-->
+
+<project
+ xmlns:j="jelly:core"
+ xmlns:u="jelly:util"
+ xmlns:maven="jelly:maven"
+ xmlns:ant="jelly:ant"
+ default="jar:jar">
+
+ <!-- ================================================================== -->
+ <!-- C O M P I L E P R E - G O A L -->
+ <!-- ================================================================== -->
+ <!-- Before compiling the Source Code, it is necessary to -->
+ <!-- replace a few tokens in the source code. -->
+ <!-- ================================================================== -->
+ <preGoal name="java:compile">
+ <ant:tstamp>
+ <ant:format property="build.time" pattern="yyyy-MM-dd hh:mm:ss" />
+ <ant:format property="build.year" pattern="yyyy"/>
+ </ant:tstamp>
+ <ant:filter token="build.year" value="${build.year}"/>
+ <ant:filter token="build.version" value="${version}"/>
+ <ant:filter token="build.time" value="${build.time}"/>
+
+ <ant:copy todir="target/src" filtering="yes">
+ <ant:fileset dir="src/java">
+ <ant:include name="**/*.java"/>
+ </ant:fileset>
+ </ant:copy>
+
+ <!-- Hack for Maven bug when compiling with a clean target. -->
+ <j:if test="${sourcesPresent != 'true'}">
+ <j:set var="sourcesPresent" value="true"/>
+ <path id="maven.compile.src.set" location="target/src"/>
+ </j:if>
+
+ </preGoal>
+
+ <!-- ================================================================== -->
+ <!-- T E S T - C O M P I L E P R E - G O A L -->
+ <!-- ================================================================== -->
+ <!-- The test code is used by the ant and the maven build but both use -->
+ <!-- different directories controlled by ant tokens. Replace these -->
+ <!-- with the correct values. -->
+ <!-- ================================================================== -->
+ <preGoal name="test:compile">
+ <ant:filter token="test.dir" value="./test"/>
+ <ant:filter token="build.test" value="target/test"/>
+
+ <ant:copy todir="target/test-src" filtering="yes">
+ <ant:fileset dir="src/test">
+ <ant:include name="**/*.java"/>
+ </ant:fileset>
+ </ant:copy>
+
+ <!-- Hack for Maven bug when compiling with a clean target. -->
+ <j:if test="${unitTestSourcesPresent != 'true'}">
+ <j:set var="unitTestSourcesPresent" value="true"/>
+ <path id="maven.test.compile.src.set" location="target/test-src"/>
+ </j:if>
+
+ </preGoal>
+
+ <!-- ================================================================== -->
+ <!-- T E S T - R E S O U R C E S P R E - G O A L -->
+ <!-- ================================================================== -->
+ <!-- The ClasspathResourceTestCase, TexenTestCase and AnakiaTestCase -->
+ <!-- require that some prerequisites are run before the actual test -->
+ <!-- cases (which compare only outputs) are executed. -->
+ <!-- ================================================================== -->
+
<preGoal name="test:test-resources">
<attainGoal name="anakiaTest"/>
<attainGoal name="texenTest"/>
@@ -96,6 +184,7 @@
have to unjar the test jar in the test-classes directory.
See http://jira.codehaus.org/browse/MPTEST-57
-->
+
<postGoal name="test:test-resources">
<unjar src="test/cpload/test1.jar" dest="target/test-classes" />
</postGoal>
Modified: jakarta/velocity/core/trunk/project.xml
URL:
http://svn.apache.org/viewcvs/jakarta/velocity/core/trunk/project.xml?rev=329604&r1=329603&r2=329604&view=diff
==============================================================================
--- jakarta/velocity/core/trunk/project.xml (original)
+++ jakarta/velocity/core/trunk/project.xml Sun Oct 30 11:44:31 2005
@@ -119,7 +119,7 @@
<!-- = = -->
<!-- ==================================================================== -->
-<!--
+<!--
<dependency>
<groupId>javax.sql</groupId>
<artifactId>jdbc-stdext</artifactId>
@@ -269,22 +269,27 @@
</dependencies>
<build>
-
<sourceModifications>
+ <!-- Remove the DataSource Loader if we don't have JDBC ext on the class
path -->
<sourceModification>
<className>javax.sql.DataSource</className>
<excludes>
<exclude>**/org/apache/velocity/runtime/resource/loader/DataSourceResourceLoader.java</exclude>
</excludes>
</sourceModification>
+
+ <!-- Remove the JdkLogChute if we don't run under at least JDK 1.4 -->
+ <sourceModification>
+ <className>java.util.logging.Logger</className>
+ <excludes>
+
<exclude>**/org/apache/velocity/runtime/log/JdkLogChute.java</exclude>
+ </excludes>
+ </sourceModification>
</sourceModifications>
<nagEmailAddress>[email protected]</nagEmailAddress>
- <sourceDirectory>src/java</sourceDirectory>
- <unitTestSourceDirectory>src/test</unitTestSourceDirectory>
- <integrationUnitTestSourceDirectory/>
-
- <aspectSourceDirectory></aspectSourceDirectory>
+ <sourceDirectory>target/src</sourceDirectory>
+ <unitTestSourceDirectory>target/test-src</unitTestSourceDirectory>
<!-- Unit test classes -->
<unitTest>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]