Index: exectck/src/main/java/org/apache/jdo/exectck/AbstractTCKMojo.java =================================================================== --- exectck/src/main/java/org/apache/jdo/exectck/AbstractTCKMojo.java (revision 1848780) +++ exectck/src/main/java/org/apache/jdo/exectck/AbstractTCKMojo.java (working copy) @@ -87,6 +87,14 @@ */ protected String dblist; + /** + * Classpath including the dependencies using : as separator between entries. + * @parameter property="jdo.tck.dependencyClasspath" + * default-value="" + * @required + */ + protected String dependencyClasspath; + protected Collection dbs = new HashSet(); /** Index: exectck/src/main/java/org/apache/jdo/exectck/Enhance.java =================================================================== --- exectck/src/main/java/org/apache/jdo/exectck/Enhance.java (revision 1848780) +++ exectck/src/main/java/org/apache/jdo/exectck/Enhance.java (working copy) @@ -43,7 +43,7 @@ * * @phase integration-test */ -public class Enhance extends AbstractMojo { +public class Enhance extends AbstractTCKMojo { private static final String[] PC_PKG_DIRS = { "org" + File.separator + "apache" + File.separator + "jdo" + File.separator + "tck" + File.separator + "api" + File.separator, @@ -94,20 +94,6 @@ */ private String implLogFile; /** - * Location of jar files for implementation under test. - * @parameter property="project.lib.iut.directory" - * default-value="${basedir}/../lib/iut" - * @required - */ - private String iutLibsDirectory; - /** - * Location of jar files for implementation under test. - * @parameter property="project.lib.iut.directory" - * default-value="${basedir}/../lib/jdori" - * @required - */ - private String jdoriLibsDirectory; - /** * List of identity types to be tested. * @parameter property="jdo.tck.identitytypes" * default-value="applicationidentity datastoreidentity" @@ -232,19 +218,8 @@ try { // Must add enhancedIdDirName first!! cpList1.add((new File(enhancedIdDirName)).toURI().toURL()); - String[] jars = {"jar"}; - if (impl.equals("jdori")) { - cpList1.add((new File(jdoriLibsDirectory)).toURI().toURL()); - fi = FileUtils.iterateFiles(new File(jdoriLibsDirectory), jars, true); - while (fi.hasNext()) { - cpList1.add(fi.next().toURI().toURL()); - } - } else { - cpList1.add((new File(iutLibsDirectory)).toURI().toURL()); - fi = FileUtils.iterateFiles(new File(iutLibsDirectory), jars, true); - while (fi.hasNext()) { - cpList1.add(fi.next().toURI().toURL()); - } + for (String dependency : this.dependencyClasspath.split(":")) { + cpList1.add(new File(dependency).toURI().toURL()); } enhancerLoader = new URLClassLoader(cpList1.toArray(classPathURLs1), getClass().getClassLoader()); @@ -257,17 +232,11 @@ // Context classloader for finding log4j.properties ClassLoader prevCl = Thread.currentThread().getContextClassLoader(); try { - URL implUrl; - if (impl.equals("jdori")) { - implUrl = (new File(jdoriLibsDirectory)).toURI().toURL(); - } else { - implUrl = (new File(iutLibsDirectory)).toURI().toURL(); - } URL enhancedClassesUrl = (new File(enhancedIdDirName)).toURI().toURL(); // Classes dir needed for org.apache.jdo.tck.util.TCKFileAppender URL classesUrl = (new File(classesDirName)).toURI().toURL(); ClassLoader loggingPropsCl = - URLClassLoader.newInstance(new URL[]{implUrl, + URLClassLoader.newInstance(new URL[]{ enhancedClassesUrl, classesUrl}, prevCl); Thread.currentThread().setContextClassLoader(loggingPropsCl); } catch (Exception e) { Index: exectck/src/main/java/org/apache/jdo/exectck/Help.java =================================================================== --- exectck/src/main/java/org/apache/jdo/exectck/Help.java (revision 1848780) +++ exectck/src/main/java/org/apache/jdo/exectck/Help.java (working copy) @@ -65,8 +65,6 @@ msg.append("* jdo.tck.identitytypes\n"); msg.append(" List of identity types to be tested\n"); msg.append(" Default value is \"applicationidentity datastoreidentity\"\n"); - msg.append("* project.lib.iut.directory\n"); - msg.append(" Location of implementation jar files. Default: ${basedir}/../lib/iut\n"); msg.append("* jdo.tck.impl.logfile\n"); msg.append(" Location of implementation log file. Default: ${user.dir}/datanucleus.txt\n"); msg.append("* jdo.tck.doInstallSchema\n"); Index: exectck/src/main/java/org/apache/jdo/exectck/RunTCK.java =================================================================== --- exectck/src/main/java/org/apache/jdo/exectck/RunTCK.java (revision 1848780) +++ exectck/src/main/java/org/apache/jdo/exectck/RunTCK.java (working copy) @@ -106,20 +106,6 @@ private String implLogFile; /** - * Location of jar files for implementation under test. - * @parameter property="project.lib.iut.directory" - * default-value="${basedir}/../lib/iut" - * @required - */ - private String iutLibsDirectory; - /** - * Location of jar files for implementation under test. - * @parameter property="project.lib.iut.directory" - * default-value="${basedir}/../lib/jdori" - * @required - */ - private String jdoriLibsDirectory; - /** * Name of file in src/conf containing pmf properties. * @parameter property="jdo.tck.pmfproperties" * default-value="jdori-pmf.properties" @@ -199,7 +185,7 @@ /** * Helper method returning the trimmed value of the specified property. * @param props the Properties object - * @param ke the key of the property to be returned + * @param key the key of the property to be returned * @return the trimmed property value or the empty string if the property is not defined. + */ private String getTrimmedPropertyValue (Properties props, String key) { String value = props.getProperty(key); @@ -342,18 +328,8 @@ while (fi.hasNext()) { cpList.add(fi.next().toURI().toURL()); } - if (impl.equals("iut")) { - fi = FileUtils.iterateFiles( - new File(iutLibsDirectory), jars, true); - while (fi.hasNext()) { - cpList.add(fi.next().toURI().toURL()); - } - } else { - fi = FileUtils.iterateFiles( - new File(jdoriLibsDirectory), jars, true); - while (fi.hasNext()) { - cpList.add(fi.next().toURI().toURL()); - } + for (String dependency : this.dependencyClasspath.split(":")) { + cpList.add(new File(dependency).toURI().toURL()); } } catch (MalformedURLException ex) { ex.printStackTrace(); Index: pom.xml =================================================================== --- pom.xml (revision 1848780) +++ pom.xml (working copy) @@ -36,7 +36,6 @@ parent-pom api exectck - copyjdorijars tck Index: tck/pom.xml =================================================================== --- tck/pom.xml (revision 1848780) +++ tck/pom.xml (working copy) @@ -62,6 +62,22 @@ + + maven-dependency-plugin + 2.8 + + + generate-sources + + build-classpath + + + dependency.classpath + + + + + org.apache.jdo jdo-exectck 3.2-SNAPSHOT @@ -74,6 +90,10 @@ enhance runtck + + + ${dependency.classpath} + @@ -87,7 +107,7 @@ ${project.name} ${pom.currentVersion} - + org.apache.maven.plugins maven-deploy-plugin 2.6 @@ -106,16 +126,67 @@ iut + + + jdori true + + jdo.tck.impl + jdori + + + + org.datanucleus + datanucleus-core + 5.2.0-m2 + + + org.datanucleus + datanucleus-rdbms + 5.2.0-m2 + + + org.datanucleus + datanucleus-api-jdo + 5.2.0-m3-SNAPSHOT + + + org.datanucleus + datanucleus-jdo-query + 5.0.8 + + + org.datanucleus + datanucleus-api-jpa + 5.2.0-m2 + + + log4j + log4j + 1.2.16 + + + + + DataNucleus Nightly + http://www.datanucleus.org/downloads/maven2-nightly + + false + + + true + + + - + javax.jdo jdo-api @@ -124,24 +195,14 @@ junit - org.datanucleus - datanucleus-api-jdo - 5.2.0-m3-SNAPSHOT + commons-logging + commons-logging - org.datanucleus - datanucleus-jdo-query - 5.0.8 + javax.transaction + javax.transaction-api - commons-logging - commons-logging - - - javax.transaction - javax.transaction-api - - org.springframework spring-core @@ -186,4 +247,5 @@ +