diff --git a/tooling/metamodel-generator/pom.xml b/tooling/metamodel-generator/pom.xml index ec1368800c..a333d08019 100644 --- a/tooling/metamodel-generator/pom.xml +++ b/tooling/metamodel-generator/pom.xml @@ -15,9 +15,9 @@ - org.hibernate.java-persistence - jpa-api - 2.0-cr-1 + org.hibernate.javax.persistence + hibernate-jpa-2.0-api + 1.0.0-CR-1 org.testng diff --git a/tooling/metamodel-generator/src/test/java/org/hibernate/jpamodelgen/test/util/CompilationTest.java b/tooling/metamodel-generator/src/test/java/org/hibernate/jpamodelgen/test/util/CompilationTest.java index 2433ac2d1b..93bd0ec869 100644 --- a/tooling/metamodel-generator/src/test/java/org/hibernate/jpamodelgen/test/util/CompilationTest.java +++ b/tooling/metamodel-generator/src/test/java/org/hibernate/jpamodelgen/test/util/CompilationTest.java @@ -58,6 +58,7 @@ public abstract class CompilationTest { compile(); } catch ( Exception e ) { + e.printStackTrace( ); fail( "Unable to compile test sources. " + e.getMessage() ); } } @@ -114,7 +115,11 @@ public abstract class CompilationTest { return name.endsWith( ".java" ) && !name.endsWith( "Test.java" ); } }; - for ( File file : packageDir.listFiles( javaFileFilter ) ) { + final File[] files = packageDir.listFiles( javaFileFilter ); + if (files == null) { + throw new RuntimeException( "Cannot find package directory (is your base dir correct?): " + packageDirName ); + } + for ( File file : files ) { javaFiles.add( file ); } return javaFiles;