Re: Mass changes to various projects under Ant umbrella - should we be doing it?
the issue is somewhat misleading. JUnit tests must be runner-agnostic, it
should make no difference whether it's Ant-JUnit* or Surefire.
However, it is my experience that Surefire needs basedir property to find
things where Ant-JUnit* finds them.
Once upon a time, Surefire lacked the possibility to set that property,
hence Ant's unit tests were complicated to work around that.
There is no need for any additional properties, but IMHO there is a need to
make tests simple and clean.
Else I must take care to set up the extra property in my IDE(s), and that I
would like to avoid.
2018-04-12 12:05 GMT+00:00 Martin Gainty <mgainty@xxxxxxxxxxx>:
> Mornin' Gintas
> maven plugin maven-surefire-plugin 'basedir' property accurately refers to
> maven basedir
> (and not ant's basedir)
> external tool properties/attributes should have a label indicating their
> external tool origin so
> ant basedir would be 'ant.basedir' property in maven-surefire-plugin
> if 'ant.basedir' is set maven-surefire-plugin would access testCases
> located under 'ant.basedir'
> it seems the timeline for this patch would be a quick update for
> maven-surefire-plugin (less than 1 day)
> can you propose the patch in maven-surefire-plugin JIRA
> [SUREFIRE-184] [PATCH] make the basedir system property ...
> I wanted to run the ant testcases using the maven-surefire-plugin (I
> actually built all the ant jars using maven). The problem is that the
> plugin sets a system property basedir that ant cannot override.
> *From:* Gintautas Grigelionis <g.grigelionis@xxxxxxxxx>
> *Sent:* Wednesday, April 11, 2018 4:44 PM
> *To:* Ant Developers List
> *Subject:* Re: Mass changes to various projects under Ant umbrella -
> should we be doing it?
> 2018-04-11 6:25 GMT+00:00 Jaikiran Pai <jai.forums2013@xxxxxxxxx>:´
> > On 10/04/18 12:27 AM, Gintautas Grigelionis wrote:
> >> I wrote earlier that I was about to review the unit tests.
> >> I was particularly unhappy about the root-property hack for an ancient
> >> deficiency in Surefire.
> > I checked some of the mail discussions, but couldn't find any relevant
> > details about this. Can you explain what the root-property hack is? I
> > don't understand how Surefire is related to our tests, which are run
> > the junit and ant-unit framework. If I missed some previous discussion,
> > please pointme to it and I'll read up on that.
> It's quite unobtrusive so far, see
> update Maven documentation · apache/ant@7a30a2b
> ant - Mirror of Apache Ant
> XMLCatalogTest is an example of unit tests complicated by root property.