You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by cameron clarke <ca...@gmail.com> on 2005/12/13 11:48:39 UTC

spring-mock Spring framework 1.2.5

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

Fwd: spring-mock Spring framework 1.2.5

Posted by cameron clarke <ca...@gmail.com>.
 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

Re: spring-mock Spring framework 1.2.5

Posted by cameron101 <ca...@gmail.com>.
thanks, my mistake I didn't eralise that I needed to specify spring-mock
independent of spring which  makes sense from a scope point of view too

        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-mock</artifactId>
            <version>1.2.5</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <artifactId>spring</artifactId>
            <groupId>org.springframework</groupId>
            <version>1.2.5</version>
        </dependency>

On 14/12/05, Carlos Sanchez <ca...@apache.org> wrote:
>
> Spring mock is there
> http://www.ibiblio.org/maven2/org/springframework/spring-mock/1.2.5/
> Your errors are probably due to other reason
>
> On 12/13/05, cameron clarke <ca...@gmail.com> wrote:
> > don't shoot I'm new to Maven ;-)
> >
> > spring-mock is specified in spring-parent-1.2.5.pom but spring-mock.jardoes
> > 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: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: spring-mock Spring framework 1.2.5

Posted by Carlos Sanchez <ca...@apache.org>.
Spring mock is there
http://www.ibiblio.org/maven2/org/springframework/spring-mock/1.2.5/
Your errors are probably due to other reason

On 12/13/05, cameron clarke <ca...@gmail.com> 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: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: spring-mock Spring framework 1.2.5

Posted by cameron101 <ca...@gmail.com>.
please use appropriate subject text, rather than simply replying to another
post, it causing conversations to become disjointed !

On 13/12/05, charles Anto <an...@gmail.com> wrote:
>
> Any idea, how to create database in postgresql using maven or ant scripts.
> I've tried DBUNIT. But not able to reach the goal. Because i don't know
> how
> to configure JDBC driver and DBunit driver with maven scripts.
>
>
> Thanks,
> Charles
>
>

Re: spring-mock Spring framework 1.2.5

Posted by charles Anto <an...@gmail.com>.
Any idea, how to create database in postgresql using maven or ant scripts.
I've tried DBUNIT. But not able to reach the goal. Because i don't know how
to configure JDBC driver and DBunit driver with maven scripts.


Thanks,
Charles

Re: spring-mock Spring framework 1.2.5

Posted by Richard Wallace <rw...@thewallacepack.net>.
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: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org