I’m trying to run tests for my webapp. I’ve used Spring and Hibernate for it. But running mvn package results in an ClassNotFoundException in the test tasks: java.lang.ClassNotFoundException: org.apache.commons.dbcp.BasicDataSource
I already tried adding this into my pom.xml, but without success:
<dependency>
<groupId>commons-dbcp</groupId>
<artifactId>commons-dbcp</artifactId>
<version>1.4</version>
<scope>test</scope>
</dependency>
What to do here?
UPDATE
mvn -X clean package: http://paste.ubuntuusers.de/raw/409407/
I don’t see any problem with DBCP here. Rather log says about some problems with autowiring Spring beans, starting with missing
com.example.model.ArticleService. Declare such missing beans as Spring components and should be OK.