Just to be clearer, I have inner classes in several unit tests but this is the only one which is causing the problem.

Adam Hardy on 02/04/09 18:09, wrote:
Ah, the penny has finally dropped!

The TestRunManagerTest.class does have an inner class, despite my previous complete conviction that there was no way I had put an inner class in my junit test class.

It's actually inline which is why I didn't recognise it.

In case you think I'm nuts, it's an EasyMock Answer class to examine parameters passed to mocked classes.

This has just come out of the woodwork now despite being present for the last year. I see mvn just downloaded a surefire update surefire-junit4-2.4.3.jar this afternoon so maybe that's the culprit.

However I have these EasyMock inner classes dotted all over my code.

Anyway the problem is that it's an anonymous inner class. I suppose I could make it a normal inner class, but if I don't, I can't give it a constructor.




Bryan Loofbourrow on 02/04/09 17:19, wrote:
Adam,

I think the easy solution is to add the public no-args constructor to
your inner class, as it's telling you to do.

I've run into this before, surefire trying to instantiate all my
classes, including inner classes.

-- Bryan

-----Original Message-----
From: Adam Hardy [mailto:adam.ma...@cyberspaceroad.com] Sent: Thursday, April 02, 2009 9:10 AM
To: Maven Users List
Subject: Re: strange error with hopefully easy solution?

Hi Martin,

you had me worried there for a moment, thought I'd emailed the wrong
list!

But anyway, I'll be surprised if you can reproduce it unless I send you
my whole project.

Actually perhaps I should try recreating the eclipse project.

however here is the pom.xml - unless the mailing list strips off the
attachment.

There are no batchrun plug-ins, and in case the name of the class is
confusing, the TestRunManager has nothing to do with the maven test run, except of
course that it gets tested like all the other classes.

Just surefire, war and maven-openjpa (which affects the entity beans,
not the Manager classes).

In case you wonder, I have no other classes in any of my dependent
projects (atomic, testdatarepo, parent project) called TestRunManager - unless
it's hiding.


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

Reply via email to