Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#12672 - [apache-ant] missing some upstream jars

Attached to Project: Arch Linux
Opened by Steve Bigham (huzzah) - Sunday, 04 January 2009, 22:18 GMT
Last edited by Paul Mattal (paul) - Sunday, 21 June 2009, 23:43 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Paul Mattal (paul)
Architecture All
Severity Medium
Priority Normal
Reported Version None
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

Apache Ant ships several jars in lib/ to support the optional Ant tasks. Many of these are not included in the Arch apache-ant package. Specifically, I have build.xml targets relying on the 'scp' and 'sshexec' tasks failing due to a missing lib/ant-jsch.jar.


Additional info:
* package version(s)
apache-ant 1.7.0-2

* config and/or log files etc.
none


Steps to reproduce:

pacman -Ql apache-ant | grep jar | wc -l
10

cd /tmp
wget http://archive.apache.org/dist/ant/binaries/apache-ant-1.7.0-bin.tar.gz
tar zxf apache-ant-1.7.0-bin.tar.gz
ls apache-ant-1.7.0/lib/*.jar | wc -l
27
This task depends upon

Closed by  Paul Mattal (paul)
Sunday, 21 June 2009, 23:43 GMT
Reason for closing:  Implemented
Comment by Marc St-Laurent (peart) - Saturday, 21 March 2009, 23:07 GMT
Arch packages ant from source, which does not contain the optional jar files. Only the binary distribution contains the extra jars. So I've created a PKGBUILD that creates a package using the binary distribution of ant. IMHO, there is no advantage to building ant (nor any other java app) from source, and using the binary distro is so much easier.

The PKGBUILD also removes the Windows .bat/.cmd files, and puts the jars in /usr/share/java/pkgname instead of /usr/lib. This addresses both points in  FS#10472 .


Comment by Paul Mattal (paul) - Tuesday, 02 June 2009, 21:07 GMT
It's generally more flexible to build from source where we can, but we've certainly made exceptions.

These jar files that are missing-- how can one build them? Can't we just add the building of these to the build process for ant somehow? Is the source for them available?
Comment by Marc St-Laurent (peart) - Wednesday, 03 June 2009, 01:50 GMT
Hi Paul,

There is no need to build the optional dependencies. More accurately, since they are not really a part of the Ant project, it would be more appropriate for them to be built in their own packages. All we need in this context is the prebuilt .jar files.

The list of optional libs is here: http://ant.apache.org/manual/install.html#librarydependencies . As you can see, there's a bunch of them. In order to build Ant from source with all the optional libs, the PKGBUILD would have to download all those jars from various web sites, and put them in ANT_HOME/lib/optional before starting the build process. That would make for an insane PKGBUILD :)

The way I see it, there are only 3 reasonable options:
1) Leave things the way they are right now. This is fine for basic usage, but a java developper will probably wish the package provided more advanced functionalities (like running junit tests from Ant).

2) Use the PKGBUILD I provided above (or similar) to provide a binary Ant with all deps.

3) Cherry-pick only a few optional deps that will add the most popular functionalities without turning the PKGBUILD into a crazy mess.
Comment by Paul Mattal (paul) - Friday, 05 June 2009, 01:37 GMT
I think I'm persuaded by your PKGBUILD, Marc. It is elegant, and the fact that these jars ship with the binary distribution means it's a defensible "vanilla" position.

Unless someone objects, I'll plan to implement this fix early next week.

Thanks, Marc, for your well-thought-out PKGBUILD and well-reasoned position.
Comment by Marc St-Laurent (peart) - Monday, 08 June 2009, 11:23 GMT
Hello again Paul,

My PKGBUILD wasn't so well thought out after all. I guess I didn't test it before attaching it to this bug. The problem is that the binaries go under /usr/bin, while the libs go somewhere in /usr/share. They have to all be installed under the same parent directory.

Here's a new PKGBUILD that puts everything in one directory. I chose /usr/share/java/ant; feel free to change it to your liking. I also created /etc/profile.d/apache-ant.sh, that adds the binaries to the PATH, and exports ANT_HOME to the user's env. This is not only recommended by Apache, but also necessary if Ant is no longer going to live directly under /usr. Side note: If you want to change Ant's installation directory, just change ANT_HOME in apache-ant.sh then rerun makepkg. The PKGBUILD gets it's install dir from there.

Finally, I actually tested it this time :) The basic stuff works fine, but I don't currently have any sources that could test the optional deps. (Gimme a few weeks, and I will).

Ciao for now,
Marc
Comment by Paul Mattal (paul) - Wednesday, 10 June 2009, 00:38 GMT
resolved in 1.7.1-2 in testing, to be moved to extra in a week
Comment by Tobias Kieslich (tobias) - Friday, 19 June 2009, 00:19 GMT
1.7.1-2 breaks ant for me du to the binaries moved to awkward spots "/usr/share/apache/ant/bin/ant" ore something, anyway it's not in path anymore.
It might be wort to opene anotehr bug for that
Comment by Paul Mattal (paul) - Sunday, 21 June 2009, 22:53 GMT
It looks like 1.7.1-2 is working for me. It installs an /etc/profile.d/apache-ant.sh which adds it to the PATH. In order to take effect, you probably have to log out and back in.
Comment by Tobias Kieslich (tobias) - Sunday, 21 June 2009, 23:21 GMT
Oh I see, I alway s leave that box on for weeks and weeks

Loading...