You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Manali Joshi <jo...@gmail.com> on 2007/08/24 23:13:41 UTC

Can maven 1.x run Junit 4 tests ?

Hi all,

I want to include Junit4 unit tests for my project which uses maven 1.1.

Currently, I am getting test failures when I try to run those with the
following failure error -

Testsuite: com.HibernateMappingsTest
Tests run: 1, Failures: 1, Errors: 0, Time elapsed: 0.328 sec

Testcase: warning(junit.framework.TestSuite$1):    FAILED
No tests found in com.HibernateMappingsTest
junit.framework.AssertionFailedError: No tests found in
com.HibernateMappingsTest

My project.xml includes the following plugin -
<report>maven-junit-report-plugin</report>


Is it possible to run junit4 tests in maven 1.1 ? If so, what plugin do I
need to use or what configuration am I missing ? Please help..

thanks,
manali

Re: Can maven 1.x run Junit 4 tests ?

Posted by Manali Joshi <jo...@gmail.com>.
Thanks !! That worked :)

On 8/25/07, Arnaud HERITIER <ah...@gmail.com> wrote:
>
> It's possible but you have to :
> - add a junit 4.x dependency in your project
> For exemple :
>     <dependency>
>       <groupId>junit</groupId>
>       <artifactId>junit</artifactId>
>       <version>4.1</version>
>       <type>jar</type>
>     </dependency>
> - add an adapter in your tests :
>     /**
>      * @return instance of this as Junit test case
>      */
>     public static junit.framework.Test suite ()
>     {
>         return new JUnit4TestAdapter(IntTestSpringCoherency.class);
>     }
>
> http://jira.codehaus.org/browse/MPTEST-65
>
> Arnaud
>
> On 24/08/07, Manali Joshi <jo...@gmail.com> wrote:
> > Hi all,
> >
> > I want to include Junit4 unit tests for my project which uses maven 1.1.
> >
> > Currently, I am getting test failures when I try to run those with the
> > following failure error -
> >
> > Testsuite: com.HibernateMappingsTest
> > Tests run: 1, Failures: 1, Errors: 0, Time elapsed: 0.328 sec
> >
> > Testcase: warning(junit.framework.TestSuite$1):    FAILED
> > No tests found in com.HibernateMappingsTest
> > junit.framework.AssertionFailedError: No tests found in
> > com.HibernateMappingsTest
> >
> > My project.xml includes the following plugin -
> > <report>maven-junit-report-plugin</report>
> >
> >
> > Is it possible to run junit4 tests in maven 1.1 ? If so, what plugin do
> I
> > need to use or what configuration am I missing ? Please help..
> >
> > thanks,
> > manali
> >
>
>
> --
> ..........................................................
> Arnaud HERITIER
> ..........................................................
> OCTO Technology - aheritier AT octo DOT com
> www.octo.com | blog.octo.com
> ..........................................................
> ASF - aheritier AT apache DOT org
> www.apache.org | maven.apache.org
> ...........................................................
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: Can maven 1.x run Junit 4 tests ?

Posted by Arnaud HERITIER <ah...@gmail.com>.
It's possible but you have to :
- add a junit 4.x dependency in your project
For exemple :
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.1</version>
      <type>jar</type>
    </dependency>
- add an adapter in your tests :
    /**
     * @return instance of this as Junit test case
     */
    public static junit.framework.Test suite ()
    {
        return new JUnit4TestAdapter(IntTestSpringCoherency.class);
    }

http://jira.codehaus.org/browse/MPTEST-65

Arnaud

On 24/08/07, Manali Joshi <jo...@gmail.com> wrote:
> Hi all,
>
> I want to include Junit4 unit tests for my project which uses maven 1.1.
>
> Currently, I am getting test failures when I try to run those with the
> following failure error -
>
> Testsuite: com.HibernateMappingsTest
> Tests run: 1, Failures: 1, Errors: 0, Time elapsed: 0.328 sec
>
> Testcase: warning(junit.framework.TestSuite$1):    FAILED
> No tests found in com.HibernateMappingsTest
> junit.framework.AssertionFailedError: No tests found in
> com.HibernateMappingsTest
>
> My project.xml includes the following plugin -
> <report>maven-junit-report-plugin</report>
>
>
> Is it possible to run junit4 tests in maven 1.1 ? If so, what plugin do I
> need to use or what configuration am I missing ? Please help..
>
> thanks,
> manali
>


-- 
..........................................................
Arnaud HERITIER
..........................................................
OCTO Technology - aheritier AT octo DOT com
www.octo.com | blog.octo.com
..........................................................
ASF - aheritier AT apache DOT org
www.apache.org | maven.apache.org
...........................................................

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Maven Version Issues

Posted by Wendy Smoak <ws...@gmail.com>.
On 8/24/07, Mike Darretta <mi...@metnet.navy.mil> wrote:
> I've tried all maven versions from 2.0.3 through 2.0.7. 2.0.6 and 7
> failed to build at all. 2.0.3-5 built but my EJBs failed to deploy. I
> get this error message:
>
> javax.ejb.EJBException: RuntimeException; CausedByException is:
>          createBeanClassInstanceCommand == null

It's less likely to be the version of Maven (which you didn't change)
than one of the plugins that auto-updated.

Unless you are specifying <version> for every plugin, Maven will grab
the latest plugin release when run with -U or if it can't find the
plugin in your local repo.

Can you get on irc? It's #maven on irc.codehaus.org, and there is a
web interface here:  http://irc.codehaus.org/

-- 
Wendy

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Maven Version Issues

Posted by Mike Darretta <mi...@metnet.navy.mil>.
I've tried all maven versions from 2.0.3 through 2.0.7. 2.0.6 and 7 
failed to build at all. 2.0.3-5 built but my EJBs failed to deploy. I 
get this error message:

javax.ejb.EJBException: RuntimeException; CausedByException is:
         createBeanClassInstanceCommand == null

Before I'm asked to consult the JBoss experts, know that no code changes 
were made to create this error. We have been successfully deploying EJBs 
using the current poms for two years. The only thing I can think of was 
that maven pulled in some new/updated libraries that are no longer 
compatible with my pom configurations.

We are supposed to be beta testing for an early September release, so 
this strange thing has occurred at the most frustrating time. If anyone 
has any clues as to what may be happening (even guesses), please feel 
free to chime in.

Thank you.

Mike Darretta wrote:
> We are nearing deployment, but now I have found myself in a black hole 
> trying to resolve version discrepancies with current vs. prior Maven 
> builds. Starting on Tuesday, our build broke without any changes to the 
> source code. The only suspect we have are updated libraries downloaded 
> via Maven 2.0.2. I made a very slight modification to the poms that 
> properly (I think) create the build. Now, our EJBs fail to deploy 
> properly. I tried upgrading to Maven 2.0.7, but cannot build our EJBs at 
> all (spec 2.0, using JBoss 3.2.5).
> 
> I realize that much of our libraries are out of date, but the time 
> constraints forbid us from making the many mods to get in sync with 
> latest releases. My basic question is that does anyone know which 
> post-2.0.2 version of Maven should be safe to use for building and 
> deploying EJB 2.0 (specifically for JBoss 3.2.5). I will be downloading 
> Maven 2.0.x incrementally and going through the task of building and 
> deploying for each.
> 
> Any help is appreciated.
> 
> 
> ------------------------------------------------------------------------
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org

-- 

Mike Darretta
VRAM Project Lead
Computer Sciences Corporation (CSC)
(o) 831.656.4324
(c) 209.814.2774
michael.darretta.ctr@metnet.navy.mil

------------------------------------------------------------
This is a PRIVATE message. If you are not the intended recipient, please
delete without copying and kindly advise us by e-mail of the mistake in
delivery. NOTE: Regardless of content, this e-mail shall not operate to
bind CSC to any order or other contract unless pursuant to explicit
written agreement or government initiative expressly permitting the use
of e-mail for such purpose.
------------------------------------------------------------


Maven Version Issues

Posted by Mike Darretta <mi...@metnet.navy.mil>.
We are nearing deployment, but now I have found myself in a black hole 
trying to resolve version discrepancies with current vs. prior Maven 
builds. Starting on Tuesday, our build broke without any changes to the 
source code. The only suspect we have are updated libraries downloaded 
via Maven 2.0.2. I made a very slight modification to the poms that 
properly (I think) create the build. Now, our EJBs fail to deploy 
properly. I tried upgrading to Maven 2.0.7, but cannot build our EJBs at 
all (spec 2.0, using JBoss 3.2.5).

I realize that much of our libraries are out of date, but the time 
constraints forbid us from making the many mods to get in sync with 
latest releases. My basic question is that does anyone know which 
post-2.0.2 version of Maven should be safe to use for building and 
deploying EJB 2.0 (specifically for JBoss 3.2.5). I will be downloading 
Maven 2.0.x incrementally and going through the task of building and 
deploying for each.

Any help is appreciated.

-- 

Mike Darretta
VRAM Project Lead
Computer Sciences Corporation (CSC)
(o) 831.656.4324
(c) 209.814.2774
michael.darretta.ctr@metnet.navy.mil

------------------------------------------------------------
This is a PRIVATE message. If you are not the intended recipient, please 
delete without copying and kindly advise us by e-mail of the mistake in 
delivery. NOTE: Regardless of content, this e-mail shall not operate to 
bind CSC to any order or other contract unless pursuant to explicit 
written agreement or government initiative expressly permitting the use 
of e-mail for such purpose.
------------------------------------------------------------