#967933 ant-optional: Missing ant-junitlauncher.jar

#967933#5
Date:
2020-08-05 07:55:57 UTC
From:
To:
Hi,

I'm trying to run junit-based tests for the JOSM application using ant,
which does not work out of the box. The error I'm getting is:

  build.xml:491: The following error occurred while executing this line:
  build.xml:442: Problem: failed to create task or type junitlauncher
  Cause: the class org.apache.tools.ant.taskdefs.optional.junitlauncher.confined.JUnitLauncherTask was not found.

Which suggests the org.apache.tools.ant.taskdefs.optional.junitlauncher.confined package is
missing, which was added in ant 1.10.6 [1].

I'm not entirely familiar with this ecosystem, but I *think* this
package is supplied by upstream (the java sources are present in the
Debian source package) and should result in an ant-junitlauncher.jar
file, which I think should be shipped in the ant-optional Debian
package. However, that jar is not contained in any Debian package
AFAICS.

It seems there is an explicit whitelist of jar/pom files to install, and
this new jar was probably forgotten when it was added upstream?

Note that I tested on a slightly older Ubuntu version, but it seems the
newest Debian version has the same problem.

If my analysis is correct, could you make the changes so
ant-junitlauncher is included?

Gr.

Matthijs

[1]: https://ant.apache.org/manual/api/org/apache/tools/ant/taskdefs/optional/junitlauncher/confined/package-summary.html

#967933#10
Date:
2021-07-14 12:32:01 UTC
From:
To:
Hello,

the good news is, adding that module is not a big deal. I think I have
done that correctly. Even better, it gets rid of the specific error you
reported!

However, that does not make josm test successfully for me. I get
another message that could either mean I built ant-optional not
correctly or there is something weird going on in josm:

test:
[echo] Running unit tests with JUnit
[junitlauncher] Error: Could not find or load main class org.apache.tools.ant.taskdefs.optional.junitlauncher.StandaloneLauncher
[junitlauncher] Caused by: java.lang.ClassNotFoundException: org.apache.tools.ant.taskdefs.optional.junitlauncher.StandaloneLauncher

The documentation of StandaloneLauncher hints at it should not actually
be used externally. However, it is referenced in
JUnitLauncherTaskTest.java (which is part of the exposed/"confined"
classes) in a test... it's a bit weird.

Since there is some discussion about a newer ant release in some of the
josm tickets with similar problems I tried updating to the currently
available upstream releases (1.10.10 and 1.10.11) but it doesn't fix
that issue.

One of the devs pointed me to the CI configuration that builds on
Ubuntu. Maybe there is some hint in there but I dont see it...
https://github.com/openstreetmap/josm/blob/master/.github/workflows/ant.yml

I am out of ideas. At least it builds fine and is executable...

#967933#15
Date:
2021-07-15 09:51:03 UTC
From:
To:
Ok, got it. I missed some additional build requirements for Ant on
Junit5 if one wants to build junitlauncher completely and the whole
confined stuff threw me off.

Interestingly, junit5 is then not needed at runtime anymore - at least
not for how josm uses it. I have not tested other applications though.

I have made some additional useful changes but I do not intend to do a
NMU (yet) - it would be my first and I am not really confident that
this does not break anything - unless instructed to do so.
Feel free to copy any of it:
https://salsa.debian.org/stefanct/ant/-/commits/master

#967933#18
Date:
2022-07-11 00:06:35 UTC
From:
To:
Hello,

Bug #967933 in ant reported by you has been fixed in the
Git repository and is awaiting an upload. You can see the commit
message below and you can check the diff of the fix at:

https://salsa.debian.org/java-team/ant/-/commit/b15414ef50d903860f6264e0b49d4658231aa3d5

(this message was generated automatically)
-- 
Greetings

https://bugs.debian.org/967933

#967933#25
Date:
2022-07-11 00:18:56 UTC
From:
To:
We believe that the bug you reported is fixed in the latest version of
ant, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 967933@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
tony mancill <tmancill@debian.org> (supplier of updated ant package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
Format: 1.8
Date: Sun, 10 Jul 2022 17:00:19 -0700
Source: ant
Architecture: source
Version: 1.10.12-2
Distribution: unstable
Urgency: medium
Maintainer: Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.org>
Changed-By: tony mancill <tmancill@debian.org>
Closes: 967933 1014635
Changes:
 ant (1.10.12-2) unstable; urgency=medium
 .
   * Team upload.
   * Add patch to set "compiled on" to changelog date.  (Closes: #1014635)
   * Ship the ant-junitlauncher jar in ant-optional (Closes: #967933)
   * Bump Standards-Version to 4.6.1
   * Set Rules-Requires-Root: no in debian/control
Checksums-Sha1:
 d9c854a56fe2cc3f97a2d7a33d0dcff87b3e4985 2428 ant_1.10.12-2.dsc
 f88354514a543a6b3e5dc03cfb2eb412cad74df6 20204 ant_1.10.12-2.debian.tar.xz
 da810b07ff52350b79285fc51ed5c7b1fcd2beb6 9513 ant_1.10.12-2_amd64.buildinfo
Checksums-Sha256:
 fa7dae40a10c352d74abd9c2286b7352cec7e1f8bcb8a875473c62ea5720fccd 2428 ant_1.10.12-2.dsc
 6c8b79ade95dd7221bf52f5b4b1d13baed571f437c0d25c18412a0254cffdf57 20204 ant_1.10.12-2.debian.tar.xz
 32e78f04245093b0ec275ad488f1f69f08dee389d9566c7cd4db25ccb10253b8 9513 ant_1.10.12-2_amd64.buildinfo
Files:
 060dfd4d35fae1bb2d2292515c770331 2428 java optional ant_1.10.12-2.dsc
 b9ce8fd79c9e0da4a12f561fc8093a1b 20204 java optional ant_1.10.12-2.debian.tar.xz
 9ffcd43c8632c06c8a501e56c8fa4ab7 9513 java optional ant_1.10.12-2_amd64.buildinfo
-----BEGIN PGP SIGNATURE-----

iQJIBAEBCgAyFiEE5Qr9Va3SequXFjqLIdIFiZdLPpYFAmLLaUwUHHRtYW5jaWxs
QGRlYmlhbi5vcmcACgkQIdIFiZdLPpZVEw//TwCBz13+SA8Vg2cLjyE5UGTB4HFf
IKNYAjkRlclzCkj94e2V8CdjSmXLNpYXfNpmv9A+TwOtW3i1cJmg+XNpiHkExyhP
Wm3Nt5KvcQdba4kT+cgNa01i2zI+9P5DE8VE7RTi+hOCRTE3gg7xycMaGt2oa2Hb
XO799q2DcFLx3Na2eVhixM08K57Yzw49pJDUo0RJMuQbKj7UVn7GDcPzcA7Pkl7p
iCR/SkPnsTj1A34CDbmjhEr7Wa0qXGN+YzNUPweICoKjv3CIKAJgglNI38qwJRlu
GjymzCK9ONi36fBBVkBaup9KKkB44QAtqu9EQMds1WyWhpT+HnLFkzvVbLL6VYqW
AVeYNfP60o3Mv15eB1wuuAh+0vztlaHM4Z2BY41mPhJlibsU9KeZ6HxqdAdhRAT2
Gf2KjGWYfiWTNWV/UnZR5DHSCMuQMhmqFxHQQgn35ZnrTqt3VbbWFWuZz0pMInmu
L3q+SeeKwff3y4PasW6eO62uDHhbhZ7NoCjb8Tdcu5Jc2C6U7liYp0AL2MYGebiX
KKB0wjY5l7bZmIMBdFQbeELhFkv7+DFZ8Er+LmLCDNCX0XNZ4w1sMxCt3Kr5nDKn
D4X557oJnwzgNZBSYh7nC07mQtJ7s4gxK+NRtucrzZMn4/JFAuVoMgZqvuHU2EjB
ZkXSboG9f90XdpU=
=Rdh6
-----END PGP SIGNATURE-----

#967933#30
Date:
2022-07-11 00:29:52 UTC
From:
To:
Hi Tony,

thanks!
What do you think about the junit5 dependencies mentioned earlier that I
have included in my attempt
(https://salsa.debian.org/stefanct/ant/-/commit/3ca052c0b7a1c7300659a791ab18989af6fc25bd)?
I forgot about everything I did back then TBH though.

#967933#35
Date:
2022-07-11 00:29:52 UTC
From:
To:
Hi Tony,

thanks!
What do you think about the junit5 dependencies mentioned earlier that I
have included in my attempt
(https://salsa.debian.org/stefanct/ant/-/commit/3ca052c0b7a1c7300659a791ab18989af6fc25bd)?
I forgot about everything I did back then TBH though.

#967933#40
Date:
2022-07-11 04:38:30 UTC
From:
To:
Hello Stefan,

I think I should have read the information in the bug report more
carefully instead of merely focusing on the title... :)

Thank you for the pointer to your branch.  I will prepare another upload
with a build-dep on junit5 and setting the build classpath.

Cheers,
tony

#967933#47
Date:
2022-07-11 06:03:53 UTC
From:
To:
We believe that the bug you reported is fixed in the latest version of
ant, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 967933@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
tony mancill <tmancill@debian.org> (supplier of updated ant package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
Format: 1.8
Date: Sun, 10 Jul 2022 21:47:24 -0700
Source: ant
Architecture: source
Version: 1.10.12-3
Distribution: unstable
Urgency: medium
Maintainer: Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.org>
Changed-By: tony mancill <tmancill@debian.org>
Closes: 967933
Changes:
 ant (1.10.12-3) unstable; urgency=medium
 .
   * Team upload.
   * Build-dep on junit5 and add jars to build classpath (Closes: #967933)
     The fix for #967933 in the 1.10.12-2 upload was incomplete.
     The presence of junit5 at build time adds additional classes to
     ant-junitlauncher.jar.  Thank you to Stefan Tauner for the help.
Checksums-Sha1:
 b065e5f284408033c9e4545205c5b43a8f50ce05 2436 ant_1.10.12-3.dsc
 96a051c87c1d966f2321a1bf423be393800f164f 20328 ant_1.10.12-3.debian.tar.xz
 e36438e1c7a81e292962aebf798fd99bacb9fcb8 12501 ant_1.10.12-3_amd64.buildinfo
Checksums-Sha256:
 fc105949b1a2723cab21368dab781df98f5d2f1cc042f593cbb36de42d8db349 2436 ant_1.10.12-3.dsc
 7fbe972ec12419107e970cb192adb856aa425186b9908bfa6cf31ad66b99e273 20328 ant_1.10.12-3.debian.tar.xz
 aed5c1489e8b34a59c6bcb0b22821e5c89330ba02fafd93fc8ed5233b6e9591c 12501 ant_1.10.12-3_amd64.buildinfo
Files:
 036538eb6be5943f9b7508fb1984f903 2436 java optional ant_1.10.12-3.dsc
 44ab062625ebbd1ba9bca0fafd4e6675 20328 java optional ant_1.10.12-3.debian.tar.xz
 9f2154d5965b8818c08d31c616b7ff76 12501 java optional ant_1.10.12-3_amd64.buildinfo
-----BEGIN PGP SIGNATURE-----

iQJIBAEBCgAyFiEE5Qr9Va3SequXFjqLIdIFiZdLPpYFAmLLuCAUHHRtYW5jaWxs
QGRlYmlhbi5vcmcACgkQIdIFiZdLPpY54xAAwYV68xaiOWNWgeN5xJv4Y4TCgg2d
HhZjQxLptrD4LfVKvasmRRAJktEF6EN/QDxSo6mEW7P8xc5/Vb640mYB0p5F7suC
ECIaP1+PtFGdxFmQckQBkDX1apu0KupaRRCtoYt+JakXa+COdF+D8c0rPf+z8b+C
17/w8KQA4JL6zTyAzwbS7uuLL7q3lTElxuThDN36/Qv1BUki1ARJ4kOWHgdm+ox0
s+FMHiv/CBkZOUQCW6wxdz6Ea4UekyCL1Fo326DJXl1+6B5wF/Vlg0loWWqT/CAJ
vV8zYGJ2RZz3Yakpn+WP9sdkqUXkqwdnsTgsDiLC+2FxGV+mLY2IsAx0vnwqoc5p
OiRlg8CDaeJFdCvdOsH7vg6BQp8w3QbRmfuDooQoZtrDAC01hYqKRn5l9Oa6VT9k
rpNCe5xwJ7NFCvHAaAJjUhA7HCSkTUqaoPTCFGAmLutiJTLGVFfH+fVeCFr0my/y
05thBy8PhZye7PwMrI22IL06VmpkVb7DxoxiKP/AoPyzdkaQGnSGUKjRNQDxsHxk
0t03IazR1Q/byeKhW0FT8Z4zIlpOHdS9DK6mPza9xow491z/Be+YB2McGGKqrsOd
c2fYFCgML+co2MJrUPcAO/shjkulEe//aucbE+kg2UPvLWo1EX2eapTmZKQf9oIJ
b2M+135N97QqWmw=
=jPGP
-----END PGP SIGNATURE-----