Это мой pom.xml
:
<project>
[...]
<build>
<plugins>
<plugin>
<groupId>org.codehaus.gmaven</groupId>
<artifactId>gmaven-plugin</artifactId>
<version>1.3</version>
<executions>
<execution>
<phase>generate-test-resources</phase>
<goals>
<goal>execute</goal>
</goals>
<configuration>
<classpath>
<element>
<groupId>hsqldb</groupId>
<artifactId>hsqldb</artifactId>
<version>1.8.0.10</version>
</element>
</classpath>
<source>
Class.forName("org.hsqldb.jdbcDriver")
</source>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
Вывод:
$ mvn test
[INFO] Scanning for projects...
...
[INFO] --- gmaven-plugin:1.3:execute (default) @ foo ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5.866s
[INFO] Finished at: Sun May 08 17:53:13 PDT 2011
[INFO] Final Memory: 7M/1531M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.gmaven:gmaven-plugin:1.3:execute
(default) on project foo: java.lang.ClassNotFoundException:
org.hsqldb.jdbcDriver -> [Help 1]
...
Почему этот класс не в classpath?