Hi,
I looked into adding goals to clean and build jdo11 and jdo20 projects
to the maven.xml in trunk. You find a patch for review attached.
I added the following goals:
jdo11.build - builds all JDO1 projects
jdo11.clean - cleans all JDO1 projects
jdo20.build - builds all JDO2 projects
jdo20.clean - cleans all JDO2 projects
tck20.build - builds tck20 and dependent JDO2 projects
tck20.clean - cleans tck20 and dependent JDO2 projects
help - printing the above as help text, this is the default goal
I also looked for a solution for the problem that maven
multiproject:clean fails if the jars of dependend projects are not
available. I found a solution in the mail archive of the 'Maven User
List'. It redefines the goal multiproject:clean. I copied the solution
in the maven.xml in trunk and it works perfect. You find it in the
attached patch file.
Regards Michael
--
Michael Bouschen [EMAIL PROTECTED] Engineering GmbH
mailto:[EMAIL PROTECTED] http://www.tech.spree.de/
Tel.:++49/30/235 520-33 Buelowstr. 66
Fax.:++49/30/2175 2012 D-10783 Berlin
Index: project.properties
===================================================================
--- project.properties (Revision 289187)
+++ project.properties (Arbeitskopie)
@@ -20,3 +20,11 @@
# Set the javadoc title
maven.javadoc.windowtitle = ${pom.name} ${pom.currentVersion}
+
+# project lists
+jdo11.projects=api11/project.xml,btree/project.xml,ri11/project.xml,tck11/project.xml
+jdo20.projects=api20/project.xml,core20/project.xml,enhancer20/project.xml,\
+runtime20/project.xml,query20/project.xml,btree/project.xml,fostore20/project.xml,\
+tck20/project.xml
+tck20.projects=api20/project.xml,core20/project.xml,enhancer20/project.xml,tck20/project.xml
+
Index: maven.xml
===================================================================
--- maven.xml (Revision 289187)
+++ maven.xml (Arbeitskopie)
@@ -1 +1,113 @@
-<project default="multiproject:install-snapshot"/>
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright 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.
+-->
+<project default="help"
+ xmlns:j="jelly:core"
+ xmlns:ant="jelly:ant"
+ xmlns:maven="jelly:maven"
+ xmlns:u="jelly:util"
+ >
+
+ <!-- ==================== -->
+ <!-- Default Global Goals -->
+ <!-- ==================== -->
+
+ <goal name="help">
+ <echo>Custom goals for this project are:</echo>
+ <echo> jdo11.build - builds all JDO1 projects</echo>
+ <echo> jdo11.clean - cleans all JDO1 projects</echo>
+ <echo> jdo20.build - builds all JDO2 projects</echo>
+ <echo> jdo20.clean - cleans all JDO2 projects</echo>
+ <echo> tck20.build - builds tck20 and dependent JDO2 projects</echo>
+ <echo> tck20.clean - cleans tck20 and dependent JDO2 projects</echo>
+ <echo>Please check README.txt for more details.</echo>
+ </goal>
+
+ <!-- ========== -->
+ <!-- JDO1 Goals -->
+ <!-- ========== -->
+
+ <goal name="jdo11.build"
+ description="Builds all JDO1 projects">
+ <j:set var="maven.multiproject.includes">${jdo11.projects}</j:set>
+ <j:set var="goal">build</j:set>
+ <attainGoal name="multiproject:goal"/>
+ </goal>
+
+ <goal name="jdo11.clean"
+ description="Cleans all JDO1 projects">
+ <j:set var="maven.multiproject.includes">${jdo11.projects}</j:set>
+ <attainGoal name="multiproject:clean"/>
+ </goal>
+
+ <!-- ========== -->
+ <!-- JDO2 Goals -->
+ <!-- ========== -->
+
+ <goal name="jdo20.build"
+ description="Builds all JDO2 projects">
+ <j:set var="maven.multiproject.includes">${jdo20.projects}</j:set>
+ <j:set var="goal">build</j:set>
+ <attainGoal name="multiproject:goal"/>
+ </goal>
+
+ <goal name="jdo20.clean"
+ description="Cleans all JDO2 projects">
+ <j:set var="maven.multiproject.includes">${jdo20.projects}</j:set>
+ <attainGoal name="multiproject:clean"/>
+ </goal>
+
+ <goal name="tck20.build"
+ description="Builds tck20 and dependent JDO2 projects">
+ <j:set var="maven.multiproject.includes">${tck20.projects}</j:set>
+ <j:set var="goal">build</j:set>
+ <attainGoal name="multiproject:goal"/>
+ </goal>
+
+ <goal name="tck20.clean"
+ description="Cleans tck20 and dependent JDO2 projects">
+ <j:set var="maven.multiproject.includes">${tck20.projects}</j:set>
+ <attainGoal name="multiproject:clean"/>
+ </goal>
+
+ <!-- ==== -->
+ <!-- Misc -->
+ <!-- ==== -->
+
+ <goal name="multiproject:clean">
+ <attainGoal name="multiproject:projects-init"/>
+ <maven:reactor
+ basedir="${maven.multiproject.basedir}"
+ banner="Gathering project list"
+ includes="${maven.multiproject.includes}"
+ excludes="${maven.multiproject.excludes}"
+ postProcessing="true"
+ ignoreFailures="${maven.multiproject.ignoreFailures}"
+ collectionVar="reactorProjects"
+ collectOnly="true" />
+ <j:forEach var="reactorProject" items="${reactorProjects}">
+ <j:set
var="_clean_dir">${reactorProject.context.getVariable("maven.build.dest")}</j:set>
+ <ant:delete dir="${_clean_dir}" failonerror="false" />
+ <j:set
var="_clean_dir">${reactorProject.context.getVariable("maven.build.dir")}</j:set>
+ <ant:delete dir="${_clean_dir}" failonerror="false" />
+ <j:set
var="_basedir">${reactorProject.context.getVariable("basedir")}</j:set>
+ <ant:delete file="${_basedir}/velocity.log" quiet="true"
failonerror="false" />
+ <ant:delete file="${_basedir}/velocity.log.1" quiet="true"
failonerror="false" />
+ <ant:delete file="${_basedir}/jcoverage.ser" quiet="true"
failonerror="false" />
+ </j:forEach>
+ </goal>
+
+</project>