Hello,

I'm currently running Maven 2.2.1. When I try to put a META-INF/hibernate.xml in the testResources directory (and therefore get copied over to the test-classes/META-INF dir) all the tests fail looking for a NamedQuery that is in one of my classes. However, when I run without the META-INF (and a clean before hand) the tests find the NamedQuery in the classes directory just fine. I've also found that if I copy over all the source classes into the test-classes directory with the META-INF/hibernate.xml the tests pass as well. It *looks* like the target/classes directory is put in the classpath that surefire gets, but not sure if it's setting up correctly or not.

Please let me know if any more information is needed, or if this should be a thread in another project... just figured I'd start here ;)

Thanks,
Ben

Here's the surefire...tmp file that sets up the classPath:

#surefire
#Thu Nov 05 14:00:14 GMT-05:00 2009
enableAssertions=true
report.0.types=java.lang.Boolean
report.2.types=java.io.File|java.lang.Boolean
report.0.params=true
report.1.types=java.io.File|java.lang.Boolean
testSuite.0.params=/home/bdouglas/eclipse-ws/RegressionSystem/TestcaseManager/target/test-classes|[**/Test*.java, **/*Test.java, **/*TestCase.java]|[**/*$*]
report.1.params=/home/bdouglas/eclipse-ws/RegressionSystem/TestcaseManager/target/surefire-reports|true
classPathUrl.39=/home/bdouglas/.m2/repository/org/jvnet/mimepull/1.2/mimepull-1.2.jar
classPathUrl.38=/home/bdouglas/.m2/repository/com/sun/org/apache/xml/internal/resolver/20050927/resolver-20050927.jar
classPathUrl.37=/home/bdouglas/.m2/repository/com/sun/xml/stream/sjsxp/1.0.1/sjsxp-1.0.1.jar
classPathUrl.36=/home/bdouglas/.m2/repository/org/jvnet/staxex/stax-ex/1.2/stax-ex-1.2.jar
classPathUrl.35=/home/bdouglas/.m2/repository/com/sun/xml/stream/buffer/streambuffer/0.7/streambuffer-0.7.jar
classPathUrl.34=/home/bdouglas/.m2/repository/com/sun/xml/messaging/saaj/saaj-impl/1.3.1/saaj-impl-1.3.1.jar
report.2.params=/home/bdouglas/eclipse-ws/RegressionSystem/TestcaseManager/target/surefire-reports|true
classPathUrl.33=/home/bdouglas/.m2/repository/com/sun/xml/bind/jaxb-impl/2.1.7/jaxb-impl-2.1.7.jar
classPathUrl.32=/home/bdouglas/.m2/repository/javax/jws/jsr181-api/1.0-MR1/jsr181-api-1.0-MR1.jar
surefireClassPathUrl.2=/home/bdouglas/.m2/repository/org/apache/maven/surefire/surefire-api/2.4.3/surefire-api-2.4.3.jar
classPathUrl.31=/home/bdouglas/.m2/repository/javax/annotation/jsr250-api/1.0/jsr250-api-1.0.jar
surefireClassPathUrl.1=/home/bdouglas/.m2/repository/junit/junit/4.0/junit-4.0.jar
classPathUrl.30=/home/bdouglas/.m2/repository/javax/xml/soap/saaj-api/1.3/saaj-api-1.3.jar
surefireClassPathUrl.0=/home/bdouglas/.m2/repository/org/apache/maven/surefire/surefire-junit4/2.4.3/surefire-junit4-2.4.3.jar
classPathUrl.9=/home/bdouglas/.m2/repository/dom4j/dom4j/1.6.1/dom4j-1.6.1.jar
classPathUrl.8=/home/bdouglas/.m2/repository/asm/asm-attrs/1.5.3/asm-attrs-1.5.3.jar
classPathUrl.7=/home/bdouglas/.m2/repository/commons-collections/commons-collections/2.1.1/commons-collections-2.1.1.jar
classPathUrl.6=/home/bdouglas/.m2/repository/commons-logging/commons-logging/1.0.4/commons-logging-1.0.4.jar
classPathUrl.5=/home/bdouglas/.m2/repository/net/sf/ehcache/ehcache/1.2.3/ehcache-1.2.3.jar
classPathUrl.4=/home/bdouglas/.m2/repository/org/hibernate/hibernate/3.2.6.ga/hibernate-3.2.6.ga.jar
classPathUrl.3=/home/bdouglas/.m2/repository/javax/persistence/persistence-api/1.0/persistence-api-1.0.jar
classPathUrl.2=/home/bdouglas/.m2/repository/junit/junit/4.5/junit-4.5.jar
classPathUrl.1=/home/bdouglas/eclipse-ws/RegressionSystem/TestcaseManager/target/classes
report.2=org.apache.maven.surefire.report.XMLReporter
classPathUrl.0=/home/bdouglas/eclipse-ws/RegressionSystem/TestcaseManager/target/test-classes
childDelegation=false
report.1=org.apache.maven.surefire.report.BriefFileReporter
report.0=org.apache.maven.surefire.report.ForkingConsoleReporter
classPathUrl.29=/home/bdouglas/.m2/repository/javax/activation/activation/1.1/activation-1.1.jar
classPathUrl.28=/home/bdouglas/.m2/repository/javax/xml/stream/stax-api/1.0/stax-api-1.0.jar
classPathUrl.27=/home/bdouglas/.m2/repository/javax/xml/bind/jaxb-api/2.1/jaxb-api-2.1.jar
classPathUrl.26=/home/bdouglas/.m2/repository/javax/xml/ws/jaxws-api/2.1/jaxws-api-2.1.jar
classPathUrl.25=/home/bdouglas/.m2/repository/com/sun/xml/ws/jaxws-rt/2.1.4/jaxws-rt-2.1.4.jar
classPathUrl.24=/home/bdouglas/.m2/repository/mysql/mysql-connector-java/5.1.10/mysql-connector-java-5.1.10.jar
classPathUrl.23=/home/bdouglas/.m2/repository/c3p0/c3p0/0.9.1.2/c3p0-0.9.1.2.jar
classPathUrl.22=/home/bdouglas/.m2/repository/log4j/log4j/1.2.12/log4j-1.2.12.jar
classPathUrl.21=/home/bdouglas/.m2/repository/org/slf4j/slf4j-log4j12/1.4.2/slf4j-log4j12-1.4.2.jar
classPathUrl.20=/home/bdouglas/.m2/repository/javassist/javassist/3.4.GA/javassist-3.4.GA.jar
failIfNoTests=false
useManifestOnlyJar=true
classPathUrl.19=/home/bdouglas/.m2/repository/javax/transaction/jta/1.1/jta-1.1.jar
classPathUrl.18=/home/bdouglas/.m2/repository/org/hibernate/hibernate-core/3.3.0.SP1/hibernate-core-3.3.0.SP1.jar
testSuite.0.types=java.io.File|java.util.ArrayList|java.util.ArrayList
classPathUrl.17=/home/bdouglas/.m2/repository/org/hibernate/hibernate-annotations/3.4.0.GA/hibernate-annotations-3.4.0.GA.jar
classPathUrl.16=/home/bdouglas/.m2/repository/org/slf4j/slf4j-api/1.4.2/slf4j-api-1.4.2.jar
classPathUrl.15=/home/bdouglas/.m2/repository/org/hibernate/hibernate-commons-annotations/3.1.0.GA/hibernate-commons-annotations-3.1.0.GA.jar
classPathUrl.14=/home/bdouglas/.m2/repository/org/hibernate/ejb3-persistence/1.0.2.GA/ejb3-persistence-1.0.2.GA.jar
classPathUrl.13=/home/bdouglas/.m2/repository/org/hibernate/hibernate-entitymanager/3.4.0.GA/hibernate-entitymanager-3.4.0.GA.jar
classPathUrl.12=/home/bdouglas/.m2/repository/asm/asm/1.5.3/asm-1.5.3.jar
classPathUrl.11=/home/bdouglas/.m2/repository/cglib/cglib/2.1_3/cglib-2.1_3.jar
classPathUrl.10=/home/bdouglas/.m2/repository/antlr/antlr/2.7.6/antlr-2.7.6.jar
testSuite.0=org.apache.maven.surefire.junit4.JUnit4DirectoryTestSuite
classPathUrl.40=/home/bdouglas/.m2/repository/log4j/apache-log4j-extras/1.0/apache-log4j-extras-1.0.jar
useSystemClassLoader=true

Reply via email to