Return-Path: X-Original-To: apmail-db-jdo-commits-archive@www.apache.org Delivered-To: apmail-db-jdo-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5213D9A1F for ; Sun, 29 Jan 2012 08:48:04 +0000 (UTC) Received: (qmail 48386 invoked by uid 500); 29 Jan 2012 08:47:58 -0000 Mailing-List: contact jdo-commits-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: jdo-dev@db.apache.org Delivered-To: mailing list jdo-commits@db.apache.org Received: (qmail 48365 invoked by uid 99); 29 Jan 2012 08:47:49 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 29 Jan 2012 08:47:49 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 29 Jan 2012 08:47:46 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 8D8F72388860; Sun, 29 Jan 2012 08:47:26 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1237213 - in /db/jdo/trunk/exectck/src/main/java/org/apache/jdo/exectck: AbstractTCKMojo.java Enhance.java InstallSchema.java PropertyUtils.java RunTCK.java Date: Sun, 29 Jan 2012 08:47:26 -0000 To: jdo-commits@db.apache.org From: andyj@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120129084726.8D8F72388860@eris.apache.org> Author: andyj Date: Sun Jan 29 08:47:25 2012 New Revision: 1237213 URL: http://svn.apache.org/viewvc?rev=1237213&view=rev Log: JDO-647 Read configurations from src/conf/configurations.list when not user defined just like in Maven1. Also add abstract superclass providing some common things rather than duping. Fix duplicated installation of "schema.sql" Added: db/jdo/trunk/exectck/src/main/java/org/apache/jdo/exectck/AbstractTCKMojo.java Modified: db/jdo/trunk/exectck/src/main/java/org/apache/jdo/exectck/Enhance.java db/jdo/trunk/exectck/src/main/java/org/apache/jdo/exectck/InstallSchema.java db/jdo/trunk/exectck/src/main/java/org/apache/jdo/exectck/PropertyUtils.java db/jdo/trunk/exectck/src/main/java/org/apache/jdo/exectck/RunTCK.java Added: db/jdo/trunk/exectck/src/main/java/org/apache/jdo/exectck/AbstractTCKMojo.java URL: http://svn.apache.org/viewvc/db/jdo/trunk/exectck/src/main/java/org/apache/jdo/exectck/AbstractTCKMojo.java?rev=1237213&view=auto ============================================================================== --- db/jdo/trunk/exectck/src/main/java/org/apache/jdo/exectck/AbstractTCKMojo.java (added) +++ db/jdo/trunk/exectck/src/main/java/org/apache/jdo/exectck/AbstractTCKMojo.java Sun Jan 29 08:47:25 2012 @@ -0,0 +1,122 @@ +/* + * Copyright 2006-2012 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. + */ +package org.apache.jdo.exectck; + +import java.io.File; +import java.io.FileInputStream; +import java.util.Collection; +import java.util.HashSet; +import java.util.Properties; + +import org.apache.maven.plugin.AbstractMojo; +import org.apache.maven.plugin.MojoExecutionException; + +/** + * Abstract Mojo to be extended for the actual goals of this maven plugin. + */ +public abstract class AbstractTCKMojo extends AbstractMojo { + + /** + * Location of TCK generated output. + * @parameter expression="${project.build.directory}" + * default-value="${basedir}/target" + * @required + */ + protected String buildDirectory; + + /** + * Location of the logs directory. + * @parameter expression="${project.log.directory}" + * default-value="${project.build.directory}/logs" + * @required + */ + protected File logsDirectory; + + /** + * Location of the configuration directory. + * @parameter expression="${project.conf.directory}" + * default-value="${basedir}/src/conf" + * @required + */ + protected String confDirectory; + + /** + * Location of the configuration directory. + * @parameter expression="${project.sql.directory}" + * default-value="${basedir}/src/sql" + * @required + */ + protected String sqlDirectory; + + /** + * List of configuration files, each describing a test configuration. + * Note: Collection can only be configured in pom.xml. Using multi-valued + * type because long String cannot be broken across lines in pom.xml. + * @parameter + * @optional + */ + protected Collection cfgs; + + /** + * List of configuration files, each describing a test configuration. + * Allows command line override of configured cfgs value. + * @parameter expression="${jdo.tck.cfglist}" + * @optional + */ + protected String cfgList; + + /** + * List of databases to run tests under. + * Currently only derby is supported. + * @parameter expression="${jdo.tck.dblist}" + * default-value="derby" + * @required + */ + protected String dblist; + + protected Collection dbs = new HashSet(); + + /** + * List of identity types to be tested. + * @parameter expression="${jdo.tck.identitytypes}" + * default-value="applicationidentity datastoreidentity" + * @required + */ + protected String identitytypes; + + protected Collection idtypes = new HashSet(); + + /** + * Convenience method to set the cfgList from the file + * "src/conf/configurations.list". + * @throws MojoExecutionException If the file could not be found/opened + */ + protected void setCfgListFromFile() throws MojoExecutionException { + try { + Properties defaultProps = new Properties(); + FileInputStream in = new FileInputStream(confDirectory + File.separator + + "configurations.list"); + defaultProps.load(in); + in.close(); + cfgList = defaultProps.getProperty("jdo.tck.cfglist"); + } + catch (Exception e) { + // Error finding configurations.list + throw new MojoExecutionException("No configuration specified and could not " + + "find 'src/conf/configurations.list'"); + } + } +} Modified: db/jdo/trunk/exectck/src/main/java/org/apache/jdo/exectck/Enhance.java URL: http://svn.apache.org/viewvc/db/jdo/trunk/exectck/src/main/java/org/apache/jdo/exectck/Enhance.java?rev=1237213&r1=1237212&r2=1237213&view=diff ============================================================================== --- db/jdo/trunk/exectck/src/main/java/org/apache/jdo/exectck/Enhance.java (original) +++ db/jdo/trunk/exectck/src/main/java/org/apache/jdo/exectck/Enhance.java Sun Jan 29 08:47:25 2012 @@ -14,6 +14,7 @@ import java.io.IOException; import java.net.URL; import java.net.URLClassLoader; import java.util.ArrayList; +import java.util.Collection; import java.util.HashSet; import java.util.Iterator; import javax.jdo.JDOEnhancer; @@ -25,7 +26,6 @@ import javax.jdo.JDOHelper; * @goal enhance * * @phase integration-test - * */ public class Enhance extends AbstractMojo { @@ -78,6 +78,7 @@ public class Enhance extends AbstractMoj * @required */ private String iutLibsDirectory; + /** * List of identity types to be tested. * @parameter expression="${jdo.tck.identitytypes}" @@ -85,7 +86,7 @@ public class Enhance extends AbstractMoj * @required */ private String identitytypes; - private HashSet idtypes; + private Collection idtypes; @Override public void execute() throws MojoExecutionException, MojoFailureException { @@ -95,7 +96,7 @@ public class Enhance extends AbstractMoj return; } - idtypes = new HashSet(); + idtypes = new HashSet(); PropertyUtils.string2Set(identitytypes, idtypes); // Create directory for enhancer logs @@ -117,7 +118,6 @@ public class Enhance extends AbstractMoj String[] metadataExtensions = {"jdo", "jdoquery", "orm", "xml", "properties"}; // we really want "jdo.properties", but this is easier String[] srcDirs = {"jdo", "orm", "testdata"}; - String genericPkgName = "org"; File toFile = null; File fromFile = null; String fromFileName = null; Modified: db/jdo/trunk/exectck/src/main/java/org/apache/jdo/exectck/InstallSchema.java URL: http://svn.apache.org/viewvc/db/jdo/trunk/exectck/src/main/java/org/apache/jdo/exectck/InstallSchema.java?rev=1237213&r1=1237212&r2=1237213&view=diff ============================================================================== --- db/jdo/trunk/exectck/src/main/java/org/apache/jdo/exectck/InstallSchema.java (original) +++ db/jdo/trunk/exectck/src/main/java/org/apache/jdo/exectck/InstallSchema.java Sun Jan 29 08:47:25 2012 @@ -1,7 +1,5 @@ -package org.apache.jdo.exectck; - /* - * Copyright 2001-2005 The Apache Software Foundation. + * Copyright 2006-2012 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. @@ -15,12 +13,14 @@ package org.apache.jdo.exectck; * See the License for the specific language governing permissions and * limitations under the License. */ +package org.apache.jdo.exectck; + import org.apache.commons.io.FileUtils; -import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; import java.io.File; import java.io.IOException; +import java.util.Collection; import java.util.HashSet; /** @@ -29,10 +29,8 @@ import java.util.HashSet; * @goal installSchema * * @phase integration-test - * */ -public class InstallSchema - extends AbstractMojo { +public class InstallSchema extends AbstractTCKMojo { /** * Location of TCK generated output. @@ -43,103 +41,38 @@ public class InstallSchema private boolean doInstallSchema; /** - * Root of the TCK installation. - * @parameter expression="${project.base.directory}" - * default-value="${basedir}" - * @required - */ -// private String baseDirectory; - - /** - * Location of TCK generated output. - * @parameter expression="${project.build.directory}" - * default-value="${basedir}/target" - * @required - */ - private String buildDirectory; - - /** - * Location of the logs directory. - * @parameter expression="${project.log.directory}" - * default-value="${project.build.directory}/logs" - * @required - */ - private File logsDirectory; - - /** - * Location of the configuration directory. - * @parameter expression="${project.conf.directory}" - * default-value="${basedir}/src/conf" - * @required + * List of mappings required by the current configuration */ - private String confDirectory; - - /** - * Location of the configuration directory. - * @parameter expression="${project.sql.directory}" - * default-value="${basedir}/src/sql" - * @required - */ - private String sqlDirectory; - - /** - * List of configuration files, each describing a test configuration. - * Note: Collection can only be configured in pom.xml. Using multi-valued - * type because long String cannot be broken across lines in pom.xml. - * @parameter - * @optional - */ - private HashSet cfgs; - - /** - * List of configuration files, each describing a test configuration. - * Allows command line override of configured cfgs value. - * @parameter expression="${jdo.tck.cfglist} - * default-value="company1-1Relationships.conf company1-MRelationships.conf companyAnnotated1-1RelationshipsFCPM.conf companyAnnotated1-MRelationshipsFCPM.conf companyAnnotatedAllRelationshipsFCConcrete.conf companyAnnotatedAllRelationshipsFCPM.conf companyAnnotatedAllRelationshipsJPAConcrete.conf companyAnnotatedAllRelationshipsJPAPM.conf companyAnnotatedAllRelationshipsPCConcrete.conf companyAnnotatedAllRelationshipsPCPM.conf companyAnnotatedAllRelationshipsPIPM.conf companyAnnotatedEmbeddedFCPM.conf companyAnnotatedEmbeddedJPAConcrete.conf companyAnnotatedEmbeddedJPAPM.conf companyAnnotatedM-MRelationshipsFCConcrete.conf companyAnnotatedM-MRelationshipsFCPM.conf companyAnnotatedNoRelationshipsFCConcrete.conf companyAnnotatedNoRelationshipsFCPM.conf companyAnnotatedNoRelationshipsPCConcrete.conf companyAnnotatedNoRelationshipsPCPM.conf companyAnnotatedNoRelationshipsPIPM.conf companyEmbedded.conf companyListWithoutJoin.conf companyMapWithoutJoin.conf companyM-MRelation ships.conf companyNoRelationships.conf companyOverrideAnnotatedAllRelationshipsFCPM.conf companyPMClass.conf companyPMInterface.conf compoundIdentity.conf detach.conf enhancement.conf extents.conf fetchgroup.conf fetchplan.conf inheritance1.conf inheritance2.conf inheritance3.conf inheritance4.conf instancecallbacks.conf jdohelper.conf jdoql.conf jdoql1.conf lifecycle.conf models1.conf models.conf pm.conf pmf.conf query.conf relationshipAllRelationships.conf relationshipNoRelationships.conf runonce.conf schemaAttributeClass.conf schemaAttributeOrm.conf schemaAttributePackage.conf security.conf transactions.conf" - * @optional - */ - private String cfgList; - - /** - * List of databases to run tests under. - * Currently only derby is supported. - * @parameter expression="${jdo.tck.dblist}" default-value="derby" - * @required - */ - private String dblist; - private HashSet dbs; - - /** - * List of identity types to be tested. - * @parameter expression="${jdo.tck.identitytypes}" - * default-value="applicationidentity datastoreidentity" - * @required - */ - private String identitytypes; - private HashSet idtypes; - - /** - * List of mappings required by the current configurationd - */ - private HashSet mappings; + protected Collection mappings = new HashSet(); @Override - public void execute() - throws MojoExecutionException { + public void execute() throws MojoExecutionException { if (!doInstallSchema) { System.out.println("Skipping InstallSchema goal!"); return; } - - dbs = new HashSet(); - idtypes = new HashSet(); - mappings = new HashSet(); - - System.out.println("cfgList is " + cfgList); - if (cfgList != null) { - cfgs = new HashSet(); - PropertyUtils.string2Set(cfgList, cfgs); + + if (cfgs == null) { + if (cfgList != null) { + System.out.println("cfgList is " + cfgList); + cfgs = new HashSet(); + PropertyUtils.string2Set(cfgList, cfgs); + } + else { + // Fallback to "src/conf/configurations.list" + setCfgListFromFile(); + if (cfgList != null) { + cfgs = new HashSet(); + PropertyUtils.string2Set(cfgList, cfgs); + } + + if (cfgList == null) { + throw new MojoExecutionException( + "Could not find configurations to run TCK. " + + "Set cfgList parameter on command line or cfgs in pom.xml."); + } + } } PropertyUtils.string2Set(dblist, dbs); @@ -186,6 +119,14 @@ public class InstallSchema + " to " + dbDir + ": " + ex.getLocalizedMessage()); } + if (mappings.contains("0")) { + // If schema was explicitly specified as "0" change to "" since + // the schema file in that case is "schema.sql". Note that this + // removes a duplicate entry too + mappings.remove("0"); + mappings.add(""); + } + // Create database for (String idtype : idtypes) { @@ -195,9 +136,6 @@ public class InstallSchema + "database" + File.separator + db + "_" + idtype + "_" + mapping + ".txt"); - if (mapping.equals("0")) { - mapping = ""; - } System.out.println("*> Installing schema" + mapping + ".sql for " + db + " " + idtype); Modified: db/jdo/trunk/exectck/src/main/java/org/apache/jdo/exectck/PropertyUtils.java URL: http://svn.apache.org/viewvc/db/jdo/trunk/exectck/src/main/java/org/apache/jdo/exectck/PropertyUtils.java?rev=1237213&r1=1237212&r2=1237213&view=diff ============================================================================== --- db/jdo/trunk/exectck/src/main/java/org/apache/jdo/exectck/PropertyUtils.java (original) +++ db/jdo/trunk/exectck/src/main/java/org/apache/jdo/exectck/PropertyUtils.java Sun Jan 29 08:47:25 2012 @@ -1,39 +1,47 @@ /* - * To change this template, choose Tools | Templates - * and open the template in the editor. + * Copyright 2006-2012 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. */ package org.apache.jdo.exectck; import java.io.File; import java.io.FileInputStream; import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; +import java.util.Collection; +import java.util.List; import java.util.Properties; import java.util.logging.Level; import java.util.logging.Logger; /** - * * Helper class that sets properties required for running the JDO TCK. * */ public class PropertyUtils { /** - * Separates white space separated items from a String into HashSet entries + * Separates white space separated items from a String into Collection entries * Used to collect command line argument lists into a Collection * * @param names String of white space separated items * @param list HashSet to contain String items */ - public static void string2Set(String names, HashSet list) { -// System.out.println("names are " + names); + public static void string2Set(String names, Collection list) { String[] items = names.split("[ \t\n]"); for (String s : items) { list.add(s); } -// System.out.println("List names are " + list.toString()); } /** @@ -43,7 +51,7 @@ public class PropertyUtils { * @param names String of white space separated items * @param list HashSet to contain String items */ - public static void string2List(String names, ArrayList list) { + public static void string2List(String names, List list) { // System.out.println("names are " + names); String[] items = names.split("[ \t\n]"); for (String s : items) { @@ -54,13 +62,13 @@ public class PropertyUtils { /** * Parses a set of config files for the mapping entry and - * provides the mapping values in a HashSet. + * provides the mapping values in a Collection. * @param cfglist config file names * @param confDir directory where config files are found * @param mappings object to containg mapping values */ - public static void mappingsSet(HashSet cfglist, String confDir, - HashSet mappings) { + public static void mappingsSet(Collection cfglist, String confDir, + Collection mappings) { for (String cfg : cfglist) { String mapping = ""; @@ -94,8 +102,6 @@ public class PropertyUtils { * Open a properties file and return a Properties object */ public static Properties getProperties(String fname){ -// System.out.println("Goal RunTCK, getProperties: parsing properties from " -// + fname); Properties props = new Properties(); FileInputStream fis = null; try { Modified: db/jdo/trunk/exectck/src/main/java/org/apache/jdo/exectck/RunTCK.java URL: http://svn.apache.org/viewvc/db/jdo/trunk/exectck/src/main/java/org/apache/jdo/exectck/RunTCK.java?rev=1237213&r1=1237212&r2=1237213&view=diff ============================================================================== --- db/jdo/trunk/exectck/src/main/java/org/apache/jdo/exectck/RunTCK.java (original) +++ db/jdo/trunk/exectck/src/main/java/org/apache/jdo/exectck/RunTCK.java Sun Jan 29 08:47:25 2012 @@ -1,3 +1,18 @@ +/* + * Copyright 2006-2012 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. + */ package org.apache.jdo.exectck; import java.io.BufferedWriter; @@ -9,7 +24,6 @@ import java.net.URL; import java.net.URLClassLoader; import java.util.ArrayList; import java.util.Arrays; -import java.util.HashSet; import java.util.Iterator; import java.util.List; import java.util.Properties; @@ -17,7 +31,6 @@ import java.util.logging.Level; import java.util.logging.Logger; import org.apache.commons.io.FileUtils; import org.apache.jdo.exectck.Utilities.InvocationResult; -import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugin.MojoFailureException; @@ -30,7 +43,7 @@ import org.apache.maven.plugin.MojoFailu * @phase integration-test * */ -public class RunTCK extends AbstractMojo { +public class RunTCK extends AbstractTCKMojo { /** * To skip running of TCK, set to false. @@ -54,34 +67,6 @@ public class RunTCK extends AbstractMojo */ private boolean debugTCK; /** - * Location of TCK generated output. - * @parameter expression="${project.build.directory}" - * default-value="${basedir}/target" - * @required - */ - private String buildDirectory; - /** - * Location of the logs directory. - * @parameter expression="${project.log.directory}" - * default-value="${project.build.directory}/logs" - * @required - */ - private File logsDirectory; - /** - * Location of the configuration directory. - * @parameter expression="${project.conf.directory}" - * default-value="${basedir}/src/conf" - * @required - */ - private String confDirectory; - /** - * Location of the configuration directory. - * @parameter expression="${project.sql.directory}" - * default-value="${basedir}/src/sql" - * @required - */ - private String sqlDirectory; - /** * Implementation to be tested (jdori or iut). * Any value other than "jdori" will test an appropriately configured IUT * @parameter expression="${jdo.tck.impl}" @@ -103,22 +88,7 @@ public class RunTCK extends AbstractMojo * @required */ private String iutLibsDirectory; - /** - * List of configuration files, each describing a test configuration. - * Note: Collection can only be configured in pom.xml. Using multi-valued - * type because long String cannot be broken across lines in pom.xml. - * @parameter - * @optional - */ - private ArrayList cfgs; - /** - * List of configuration files, each describing a test configuration. - * Allows command line override of configured cfgs value. - * @parameter expression="${jdo.tck.cfglist}" - * default-value="company1-1Relationships.conf company1-MRelationships.conf companyAnnotated1-1RelationshipsFCPM.conf companyAnnotated1-MRelationshipsFCPM.conf companyAnnotatedAllRelationshipsFCConcrete.conf companyAnnotatedAllRelationshipsFCPM.conf companyAnnotatedAllRelationshipsJPAConcrete.conf companyAnnotatedAllRelationshipsJPAPM.conf companyAnnotatedAllRelationshipsPCConcrete.conf companyAnnotatedAllRelationshipsPCPM.conf companyAnnotatedAllRelationshipsPIPM.conf companyAnnotatedEmbeddedFCPM.conf companyAnnotatedEmbeddedJPAConcrete.conf companyAnnotatedEmbeddedJPAPM.conf companyAnnotatedM-MRelationshipsFCConcrete.conf companyAnnotatedM-MRelationshipsFCPM.conf companyAnnotatedNoRelationshipsFCConcrete.conf companyAnnotatedNoRelationshipsFCPM.conf companyAnnotatedNoRelationshipsPCConcrete.conf companyAnnotatedNoRelationshipsPCPM.conf companyAnnotatedNoRelationshipsPIPM.conf companyEmbedded.conf companyListWithoutJoin.conf companyMapWithoutJoin.conf companyM-MRelation ships.conf companyNoRelationships.conf companyOverrideAnnotatedAllRelationshipsFCPM.conf companyPMClass.conf companyPMInterface.conf compoundIdentity.conf detach.conf enhancement.conf extents.conf fetchgroup.conf fetchplan.conf inheritance1.conf inheritance2.conf inheritance3.conf inheritance4.conf instancecallbacks.conf jdohelper.conf jdoql.conf jdoql1.conf lifecycle.conf models1.conf models.conf pm.conf pmf.conf query.conf relationshipAllRelationships.conf relationshipNoRelationships.conf runonce.conf schemaAttributeClass.conf schemaAttributeOrm.conf schemaAttributePackage.conf security.conf transactions.conf" - * @optional - */ - private String cfgList; + /** * Name of file in src/conf containing pmf properties. * @parameter expression="${jdo.tck.pmfproperties}" @@ -134,27 +104,7 @@ public class RunTCK extends AbstractMojo * @required */ private String exclude; - /** - * List of databases to run tests under. - * Currently only derby is supported. - * @parameter expression="${jdo.tck.dblist}" - * default-value="derby" - * @required - */ - private String dblist; - private HashSet dbs; - /** - * List of identity types to be tested. - * @parameter expression="${jdo.tck.identitytypes}" - * default-value="applicationidentity datastoreidentity" - * @required - */ - private String identitytypes; - private HashSet idtypes; - /** - * List of mappings required by the current configuration - */ - private HashSet mappings; + /** * Run the TCK tests in verbose mode. * @parameter expression="${jdo.tck.verbose} @@ -190,13 +140,7 @@ public class RunTCK extends AbstractMojo * @optional */ private String jvmproperties; - /** - * The port number the JVM should listen for a debugger on. - * @parameter expression="${jdo.tck.debug.port}" - * default-value="8787" - * @optional - */ - private String debugPort; + /** * User-supplied arguments for debug directives. * @parameter expression="${jdo.tck.debug.jvmargs}" @@ -237,9 +181,6 @@ public class RunTCK extends AbstractMojo return; } - dbs = new HashSet(); - idtypes = new HashSet(); - mappings = new HashSet(); Properties props = null; boolean alreadyran = false; String runonce = "false"; @@ -253,17 +194,25 @@ public class RunTCK extends AbstractMojo if (impl.equals("iut")) { pmfProperties="iut-pmf.properties"; } - if (cfgs != null) { -// System.out.println("Configurations specified in cfgs are " + cfgs.toString()); - } else if (cfgList != null) { - cfgs = new ArrayList(); - PropertyUtils.string2List(cfgList, cfgs); -// System.out.println("Configurations are " + cfgs.toString()); - } else { - throw new MojoExecutionException( - "Could not find configurations to run TCK. " - + "Set cfgList parameter on command line " - + "or cfgs in pom.xml."); + + if (cfgs == null) { + if (cfgList != null) { + cfgs = new ArrayList(); + PropertyUtils.string2List(cfgList, (List)cfgs); + } else { + // Fallback to "src/conf/configurations.list" + setCfgListFromFile(); + if (cfgList != null) { + cfgs = new ArrayList(); + PropertyUtils.string2List(cfgList, (List)cfgs); + } + + if (cfgList == null) { + throw new MojoExecutionException( + "Could not find configurations to run TCK. " + + "Set cfgList parameter on command line or cfgs in pom.xml"); + } + } } PropertyUtils.string2Set(dblist, dbs);