Hello,
I'm attempting to execute JUnit 4 tests using the org.junit.runner.JUnitCore.runClasses utility for commandline execution.
This is done from using the groovy ant task e.g.
<groovy classpathref="groovy.test.classpath">
def basedir = project.references.groovytests.getDirectoryScanner().basedir
project.references.groovytests.getDirectoryScanner().getIncludedFiles().each {
println "Executing: ${it}"
def testClass = loader.parseClass(new File("${basedir}/${it}"))
org.junit.runner.JUnitCore.runClasses(testClass)
}
</groovy>
I get the javax.persistence.PersistenceException: No Persistence provider for EntityManager named ... exception when trying to create an EntityManager and I know the classpath,
classes and persistence.xml are configured properly.
Has anyone encountered an issue like this before?