Hi Martin,

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.

Gintas

2018-04-12 12:05 GMT+00:00 Martin Gainty <mgai...@hotmail.com>:

> 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
> https://issues.apache.org/jira/browse/SUREFIRE-184
> [SUREFIRE-184] [PATCH] make the basedir system property ...
> <https://issues.apache.org/jira/browse/SUREFIRE-184>
> issues.apache.org
> 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.
>
> ?
>
> Martin
> ______________________________________________
>
>
>
>
> ------------------------------
> *From:* Gintautas Grigelionis <g.grigelio...@gmail.com>
> *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.forums2...@gmail.com>:´
>
> > 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
> also
> > don't understand how Surefire is related to our tests, which are run
> using
> > 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
>
> https://github.com/apache/ant/commit/7a30a2b577ef60c6f05ccd93793264
> 39f8c88fed
>
> <https://github.com/apache/ant/commit/7a30a2b577ef60c6f05ccd9379326439f8c88fed>
> update Maven documentation · apache/ant@7a30a2b
> <https://github.com/apache/ant/commit/7a30a2b577ef60c6f05ccd9379326439f8c88fed>
> github.com
> ant - Mirror of Apache Ant
>
>
> https://github.com/apache/ant/commit/4a8ef26e69a586684685ec1ca072fb
> bccc7c00b0
>
> XMLCatalogTest is an example of unit tests complicated by root property.
>
> Gintas
>

Reply via email to