Here's what I finally settled on for my pom with Spring and Hibernate.
<dependency>
<groupId>springframework</groupId>
<artifactId>spring</artifactId>
<version>1.2.6</version>
</dependency>
<dependency>
<groupId>springframework</groupId>
<artifactId>spring-mock</artifactId>
<version>1.2.6</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate</artifactId>
<version>3.1beta3</version>
<exclusions>
<exclusion>
<artifactId>jta</artifactId>
<groupId>javax.transaction</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<artifactId>geronimo-spec-jta</artifactId>
<groupId>geronimo-spec</groupId>
<version>1.0.1B-rc4</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>commons-dbcp</groupId>
<artifactId>commons-dbcp</artifactId>
<version>1.2</version>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>xml-apis</groupId>
<artifactId>xml-apis</artifactId>
</exclusion>
<exclusion>
<groupId>xerces</groupId>
<artifactId>xerces</artifactId>
</exclusion>
</exclusions>
</dependency>
I'm still using the springframework group id until the poms start
telling me otherwise ;)
The biggest problem that I had came from not all the spring-* jars
having everything in them that the all inclusive spring.jar package has.
Hope that helps.
Rich
cameron clarke wrote:
don't shoot I'm new to Maven ;-)
spring-mock is specified in spring-parent-1.2.5.pom but spring-mock.jar does
not get pulled down from http://repo1.maven.org/maven2 Is there a reason
why this jar/pom is missing? I have written some tests that utilise
org.springframework.test.AbstractTransactionalDataSourceSpringContextTestsbut
are failing in the M2 world as NoClassDef can be found.
I installed it local via :
mvn install:install-file
-DgroupId=org.springframework-DartifactId=spring-mock -Dversion=
1.2.5 -Dfile=C:/spring-mock.jar -Dpackaging=jar -DgeneratePom=true
I checked the repository file system to see that it now exists but the test
still fails with the same error. I noticed the pom file was not created
though ! instead a maven-metadata-local.xml was created. So I manually
created spring-mock-1.2.5.pom as follows:
<project>
<parent>
<artifactId>spring-parent</artifactId>
<groupId>org.springframework</groupId>
<version>1.2.5</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>spring-mock</artifactId>
<name>Spring Mock</name>
<version>1.2.5</version>
<distributionManagement>
<status>deployed</status>
</distributionManagement>
</project>
(I didn't worked out the dependencies ..yet)
but still my tests fail ..... :-( ANY HELP GREATLY APPRECIATED
java.lang.NoClassDefFoundError:
org/springframework/test/AbstractTransactionalDa
taSourceSpringContextTests
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]