Re: Maven Unit tests with EOF
Re: Maven Unit tests with EOF
- Subject: Re: Maven Unit tests with EOF
- From: Paul Hoadley via Webobjects-dev <email@hidden>
- Date: Thu, 13 Feb 2020 14:27:54 +1030
Hi Aaron,
On 13 Feb 2020, at 14:14, Aaron Rosenzweig <email@hidden> wrote:
> If I understand you right you are using the surefire plugin but setting the
> nature for Maven to find the files? That’s a neat way to do it.
They're basically unrelated, they just happen to intersect here. When unit
tests are run, if something (e.g. WOUnit) asks for the main NSBundle (I haven't
dug around in the WOUnit source, but presumably this is part of getting the
default EOModelGroup to find your models), then eventually
NSStandardProjectBundle.Factory is going to try and work out whether the
project is Maven or Fluffy Bunny. It does this by examining .project in the
root of the project, looking for that hard-coded magic string. It's not
Surefire or Maven that's doing this, it's ERFoundation's low-level machinery.
> I think that nature was there for people who wanted to build with Maven
> inside of eclipse, but you can use it the way you have done as well.
From Eclipse's point of view, it's an obsolete specifier, replaced by
'org.eclipse.m2e.core.maven2Nature'. If you never need NSBundle to load you an
NSMavenProjectBundle, you don't need it in .project—it no longer does anything.
But, as demonstrated here, if you do want an NSMavenProjectBundle then it needs
to be in .project. That's its single remaining purpose, to match a hard-coded
magic string in NSStandardProjectBundle.Factory.
Anyway, it may not be the solution to your original problem, but if you're
expecting an NSMavenProjectBundle but getting an NSFluffyBunnyProjectBundle,
then it could well be.
--
Paul Hoadley
https://logicsquad.net/
https://www.linkedin.com/company/logic-squad/
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden