Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.maint.java > #9816 > unrolled thread

Surefire plugin

Started byMarkus Koschany <apo@debian.org>
First post2017-07-21 12:40 +0200
Last post2017-07-22 21:30 +0200
Articles 10 — 3 participants

Back to article view | Back to linux.debian.maint.java


Contents

  Surefire plugin Markus Koschany <apo@debian.org> - 2017-07-21 12:40 +0200
    Re: Surefire plugin Emmanuel Bourg <ebourg@apache.org> - 2017-07-21 12:50 +0200
      Re: Surefire plugin Markus Koschany <apo@debian.org> - 2017-07-21 13:00 +0200
        Re: Surefire plugin Emmanuel Bourg <ebourg@apache.org> - 2017-07-21 13:20 +0200
          Re: Surefire plugin Emmanuel Bourg <ebourg@apache.org> - 2017-07-21 15:30 +0200
            Re: Surefire plugin Mykola Nikishov <mn@mn.com.ua> - 2017-07-21 20:00 +0200
              Re: Surefire plugin Emmanuel Bourg <ebourg@apache.org> - 2017-07-21 20:20 +0200
                Re: Surefire plugin Mykola Nikishov <mn@mn.com.ua> - 2017-07-21 20:40 +0200
          Re: Surefire plugin Markus Koschany <apo@debian.org> - 2017-07-22 12:50 +0200
            Re: Surefire plugin Emmanuel Bourg <ebourg@apache.org> - 2017-07-22 21:30 +0200

#9816 — Surefire plugin

FromMarkus Koschany <apo@debian.org>
Date2017-07-21 12:40 +0200
SubjectSurefire plugin
Message-ID<u5DvI-3Ew-5@gated-at.bofh.it>

[Multipart message — attachments visible in raw view] — view raw

Hi,

I wanted to upload a new revision of libtwelvemonkeys-java but it fails
to build with the following error message:

[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test
(default-test) on project common-lang: Execution default-test of goal
org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test failed:
Plugin org.apache.maven.plugins:maven-surefire-plugin:2.17 or one of its
dependencies could not be resolved: Cannot access central
(https://repo.maven.apache.org/maven2) in offline mode and the artifact
junit:junit:jar:4.x has not been downloaded from it before. -> [Help 1]

I added org.apache.maven.plugins:maven-surefire-plugin:2.19.1 to
maven.ignoreRules and even removed the entry from pom.xml but Maven
still complains about a missing artifact. I suspect something went wrong
with the latest update of surefire to 2.19.1 but I can't figure out what.

Ideas?

Regards,

Markus

[toc] | [next] | [standalone]


#9817

FromEmmanuel Bourg <ebourg@apache.org>
Date2017-07-21 12:50 +0200
Message-ID<u5DFo-3I1-19@gated-at.bofh.it>
In reply to#9816
Le 21/07/2017 à 12:31, Markus Koschany a écrit :

> Ideas?

Hi Markus,

I think the package is just missing a build dependency on junit4. I
fixed a similar issue with plexus-cli this morning.

I updated many Maven related libraries this week. I suspect one of them
pulled junit4 before and doesn't anymore now, thus the build failure you
observed.

Emmanuel

[toc] | [prev] | [next] | [standalone]


#9818

FromMarkus Koschany <apo@debian.org>
Date2017-07-21 13:00 +0200
Message-ID<u5DP5-3Lj-35@gated-at.bofh.it>
In reply to#9817

[Multipart message — attachments visible in raw view] — view raw

Am 21.07.2017 um 12:41 schrieb Emmanuel Bourg:
> Le 21/07/2017 à 12:31, Markus Koschany a écrit :
> 
>> Ideas?
> 
> Hi Markus,
> 
> I think the package is just missing a build dependency on junit4. I
> fixed a similar issue with plexus-cli this morning.
> 
> I updated many Maven related libraries this week. I suspect one of them
> pulled junit4 before and doesn't anymore now, thus the build failure you
> observed.
> 
> Emmanuel

Interesting. Thanks for the explanation. Adding junit4 to Build-Depends
works. I'm just wondering if it should be necessary because I disabled
the tests and also added junit to maven.ignoreRules. Is it somehow
possible to avoid adding junit4 to Build-Depends?

Markus

[toc] | [prev] | [next] | [standalone]


#9819

FromEmmanuel Bourg <ebourg@apache.org>
Date2017-07-21 13:20 +0200
Message-ID<u5E8q-493-21@gated-at.bofh.it>
In reply to#9818
Le 21/07/2017 à 12:57, Markus Koschany a écrit :

> Interesting. Thanks for the explanation. Adding junit4 to Build-Depends
> works. I'm just wondering if it should be necessary because I disabled
> the tests and also added junit to maven.ignoreRules. Is it somehow
> possible to avoid adding junit4 to Build-Depends?

Strictly speaking setting the maven.test.skip parameter to false doesn't
disable the test phase, the execution of the tests is skipped but
maven-surefire-plugin is still invoked.

I think using an empty override_dh_auto_test target should do it. But I
agree this shouldn't be necessary, I'll investigate.

Emmanuel

[toc] | [prev] | [next] | [standalone]


#9820

FromEmmanuel Bourg <ebourg@apache.org>
Date2017-07-21 15:30 +0200
Message-ID<u5Gaf-5lR-31@gated-at.bofh.it>
In reply to#9819
Le 21/07/2017 à 13:12, Emmanuel Bourg a écrit :

> But I agree this shouldn't be necessary, I'll investigate.

Running maven in debug mode (with the -X parameter) I see that the
junit4 dependency is pulled through this chain:

 org.apache.maven.plugins:maven-surefire-plugin:jar:2.19.1:
    org.apache.maven.surefire:maven-surefire-common:jar:debian:compile
       org.apache.maven:maven-core:jar:debian:compile
          classworlds:classworlds:jar:debian:compile
             junit:junit:jar:4.x:compile

The classworlds pom.xml defines a dependency on junit but doesn't set
the scope to 'test'. I'll try to fix that and see if it helps.

Emmanuel Bourg

[toc] | [prev] | [next] | [standalone]


#9821

FromMykola Nikishov <mn@mn.com.ua>
Date2017-07-21 20:00 +0200
Message-ID<u5Knv-7Q8-1@gated-at.bofh.it>
In reply to#9820
Emmanuel Bourg <ebourg@apache.org> writes:

> The classworlds pom.xml defines a dependency on junit but doesn't set
> the scope to 'test'. I'll try to fix that and see if it helps.

I'm going to reportbug the same problem against
libplexus-sec-dispatcher-java and libplexus-cipher-java packages...

-- 
Mykola
https://manandbytes.github.io/

[toc] | [prev] | [next] | [standalone]


#9822

FromEmmanuel Bourg <ebourg@apache.org>
Date2017-07-21 20:20 +0200
Message-ID<u5KGR-8dk-3@gated-at.bofh.it>
In reply to#9821
Le 21/07/2017 à 19:51, Mykola Nikishov a écrit :

> I'm going to reportbug the same problem against
> libplexus-sec-dispatcher-java and libplexus-cipher-java packages...

Good catch. That's a bit different there though, because these packages
declare the dependency on junit, so the poms are consistent with the
package dependencies. But they still pull an unnecessary dependency.

Emmanuel Bourg

[toc] | [prev] | [next] | [standalone]


#9823

FromMykola Nikishov <mn@mn.com.ua>
Date2017-07-21 20:40 +0200
Message-ID<u5L0e-8jy-21@gated-at.bofh.it>
In reply to#9822
Emmanuel Bourg <ebourg@apache.org> writes:

>> I'm going to reportbug the same problem against
>> libplexus-sec-dispatcher-java and libplexus-cipher-java packages...
>
> Good catch. That's a bit different there though, because these packages
> declare the dependency on junit, so the poms are consistent with the
> package dependencies. But they still pull an unnecessary dependency.

They do declare but not with test scope:

[1] https://sources.debian.net/src/plexus-cipher/1.7-1/pom.xml/#L124
[2] https://sources.debian.net/src/plexus-sec-dispatcher/1.4-1/pom.xml/#L86

-- 
Mykola
https://manandbytes.github.io/

[toc] | [prev] | [next] | [standalone]


#9824

FromMarkus Koschany <apo@debian.org>
Date2017-07-22 12:50 +0200
Message-ID<u608V-PS-3@gated-at.bofh.it>
In reply to#9819

[Multipart message — attachments visible in raw view] — view raw

Am 21.07.2017 um 13:12 schrieb Emmanuel Bourg:
> Le 21/07/2017 à 12:57, Markus Koschany a écrit :
> 
>> Interesting. Thanks for the explanation. Adding junit4 to Build-Depends
>> works. I'm just wondering if it should be necessary because I disabled
>> the tests and also added junit to maven.ignoreRules. Is it somehow
>> possible to avoid adding junit4 to Build-Depends?
> 
> Strictly speaking setting the maven.test.skip parameter to false doesn't
> disable the test phase, the execution of the tests is skipped but
> maven-surefire-plugin is still invoked.

Should we treat this as a bug in maven-debian-helper or as a Maven
feature? I believe most people would expect that either the tests are
completely "skipped" if maven.test.skip is set to true in
debian/maven.properties or that an ignore rule like

org.apache.maven.plugins maven-surefire-plugin * * * *

prevents the maven-surefire-plugin from being invoked?

> I think using an empty override_dh_auto_test target should do it. But I
> agree this shouldn't be necessary, I'll investigate.

I also thought that overriding dh_auto_test should do it but I just saw
that I already did that. Unfortunately the package still fails to build.

Markus

[toc] | [prev] | [next] | [standalone]


#9827

FromEmmanuel Bourg <ebourg@apache.org>
Date2017-07-22 21:30 +0200
Message-ID<u68g9-5TK-3@gated-at.bofh.it>
In reply to#9824
Le 22/07/2017 à 12:46, Markus Koschany a écrit :

> Should we treat this as a bug in maven-debian-helper or as a Maven
> feature?

That's a Maven feature, there isn't much we can do I think.


> I also thought that overriding dh_auto_test should do it but I just saw
> that I already did that. Unfortunately the package still fails to build.

Ok, let's fix the packages that mistakenly drag the junit dependency then.

Emmanuel

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.maint.java


csiph-web