junitlauncher dependency on JUnit4?

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

junitlauncher dependency on JUnit4?

Stefan Bodewig
Hi

I've just added a POM for ant-junitlauncher and it currently fails to
build as
org.apache.tools.ant.taskdefs.optional.junitlauncher.SingleTestClass has
a dependency on org.junit.Test and I haven't declared any dependency on
JUnit4 inside the POM (only transitively with scope test).

The class has an @Test annotation inside of the main build tree, is this
intentional? To me it looks as if the annotation and the import of
org.junit.Test could be removed.

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: junitlauncher dependency on JUnit4?

Gintautas Grigelionis
My understanding is that junitlauncher has a dependency on JUnit 4 through
vintage engine. I guess pom should provide profiles for engine choice. See
my earlier questions re the task classpath.

Gintas

Den tis 20 mars 2018 16:28Stefan Bodewig <[hidden email]> skrev:

> Hi
>
> I've just added a POM for ant-junitlauncher and it currently fails to
> build as
> org.apache.tools.ant.taskdefs.optional.junitlauncher.SingleTestClass has
> a dependency on org.junit.Test and I haven't declared any dependency on
> JUnit4 inside the POM (only transitively with scope test).
>
> The class has an @Test annotation inside of the main build tree, is this
> intentional? To me it looks as if the annotation and the import of
> org.junit.Test could be removed.
>
> Stefan
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
Reply | Threaded
Open this post in threaded view
|

Re: junitlauncher dependency on JUnit4?

Stefan Bodewig
On 2018-03-20, Gintautas Grigelionis wrote:

> My understanding is that junitlauncher has a dependency on JUnit 4 through
> vintage engine. I guess pom should provide profiles for engine choice. See
> my earlier questions re the task classpath.

Only when running the tests. The launcher task itself doesn't depend on
any of the engines at compile time.

> Den tis 20 mars 2018 16:28Stefan Bodewig <[hidden email]> skrev:

>> I've just added a POM for ant-junitlauncher and it currently fails to
>> build as
>> org.apache.tools.ant.taskdefs.optional.junitlauncher.SingleTestClass has
>> a dependency on org.junit.Test and I haven't declared any dependency on
>> JUnit4 inside the POM (only transitively with scope test).

This class is in src/main and the test works fine even if I remove the
@Test annotation.

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: junitlauncher dependency on JUnit4?

Jaikiran Pai
In reply to this post by Stefan Bodewig
Hi Stefan,

This looks like some odd merge or squashing issue when I pushed that
task changes. I have fixed it. The task itself doesn't need any JUnit
test engine specific dependencies like this one. I just pushed the
commit upstream which should fix this.

P.S: I haven't responded to some other mails due to limited internet
connectivity this few days. I'll respond to them soon.

-Jaikiran


On 20/03/18 8:57 PM, Stefan Bodewig wrote:

> Hi
>
> I've just added a POM for ant-junitlauncher and it currently fails to
> build as
> org.apache.tools.ant.taskdefs.optional.junitlauncher.SingleTestClass has
> a dependency on org.junit.Test and I haven't declared any dependency on
> JUnit4 inside the POM (only transitively with scope test).
>
> The class has an @Test annotation inside of the main build tree, is this
> intentional? To me it looks as if the annotation and the import of
> org.junit.Test could be removed.
>
> Stefan
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: junitlauncher dependency on JUnit4?

Stefan Bodewig
On 2018-03-20, Jaikiran Pai wrote:

> This looks like some odd merge or squashing issue when I pushed that
> task changes. I have fixed it. The task itself doesn't need any JUnit
> test engine specific dependencies like this one. I just pushed the
> commit upstream which should fix this.

Looks good, building from POMs now works on master. Thanks.

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: junitlauncher dependency on JUnit4?

Gintautas Grigelionis
In reply to this post by Stefan Bodewig
2018-03-20 16:43 GMT+01:00 Stefan Bodewig <[hidden email]>:

> On 2018-03-20, Gintautas Grigelionis wrote:
>
> > My understanding is that junitlauncher has a dependency on JUnit 4
> through
> > vintage engine. I guess pom should provide profiles for engine choice.
> See
> > my earlier questions re the task classpath.
>
> Only when running the tests. The launcher task itself doesn't depend on
> any of the engines at compile time.
>

At least in pom there is a clear distinction between compile and runtime.
I wish there was Ivy 2.5 out there so that we could have a unified ivy.xml;
until then -- sorry for thinking as an end user in terms of dependencies.

Gintas