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

2021-07-15 Thread Stefan Tauner
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

-- 
Kind regards/Mit freundlichen Grüßen, Stefan Tauner



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

2021-07-14 Thread Stefan Tauner
On Wed, 05 Aug 2020 09:55:57 +0200 Matthijs Kooijman
 wrote:
>
> If my analysis is correct, could you make the changes so
> ant-junitlauncher is included?

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...

-- 
Kind regards/Mit freundlichen Grüßen, Stefan Tauner



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

2020-08-05 Thread Matthijs Kooijman
Package: ant-optional
Version: 1.10.6-1ubuntu0.1
Severity: normal

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