Hide Forgot
Description of problem: Version-Release number of selected component (if applicable): After installing ant and apache-ivy packages with yum, basic ivy example fails, but... If I set up ANT_HOME, create symlink to ivy.jar in /usr/share/ant/lib/ and run ant --noconfig, it actually works. [root@localhost e1]# env | grep ANT_HOME ANT_HOME=/usr/share/ant [root@localhost e1]# ll /usr/share/ant/lib/ total 8 drwxr-xr-x 4 root root 4096 Jun 17 13:42 .. lrwxrwxrwx 1 root root 27 Jun 17 13:42 ant-launcher.jar -> ../../java/ant-launcher.jar lrwxrwxrwx 1 root root 18 Jun 17 13:42 ant.jar -> ../../java/ant.jar lrwxrwxrwx 1 root root 28 Jun 17 13:42 ant-bootstrap.jar -> ../../java/ant-bootstrap.jar lrwxrwxrwx 1 root root 29 Jun 17 13:42 ant-nodeps.jar -> ../../java/ant/ant-nodeps.jar lrwxrwxrwx 1 root root 27 Oct 17 21:21 ant-trax.jar -> ../../java/ant/ant-trax.jar lrwxrwxrwx 1 root root 18 Nov 7 11:56 ivy.jar -> ../../java/ivy.jar drwxr-xr-x 2 root root 4096 Nov 7 11:56 . Installed Packages Name : ant Arch : x86_64 Version : 1.7.1 Release : 13.el6 Size : 7.5 M Repo : installed From repo : base Summary : Ant build tool for java URL : http://ant.apache.org/ [^] License : ASL 2.0 and W3C Description : Ant is a platform-independent build tool for java. It's used by apache : jakarta and xml projects. Installed Packages Name : apache-ivy Arch : noarch Version : 2.1.0 Release : 1.el6 Size : 986 k Repo : installed From repo : epel Summary : Java-based dependency manager URL : http://ant.apache.org/ivy/ [^] License : ASL 2.0 Description : Apache Ivy is a tool for managing (recording, tracking, resolving and : reporting) project dependencies. It is designed as process agnostic and is : not tied to any methodology or structure. while available as a standalone : tool, Apache Ivy works particularly well with Apache Ant providing a number : of powerful Ant tasks ranging from dependency resolution to dependency : reporting and publication. [root@localhost e1]# ant --execdebug exec "/usr/java/jdk1.7.0_17/bin/java" -classpath "/usr/share/java/ant.jar:/usr/share/java/ant-launcher.jar:/usr/share/java/jaxp_parser_impl.jar:/usr/share/java/xml-commons-apis.jar:/usr/share/java/ant/ant-nodeps.jar:/usr/share/java/jaxp_transform_impl.jar:/usr/share/java/ant/ant-trax.jar:/usr/share/java/xalan-j2-serializer.jar:/usr/java/jdk1.7.0_17/lib/tools.jar" -Dant.home="/usr/share/ant" -Dant.library.dir="/usr/share/ant/lib" org.apache.tools.ant.launch.Launcher -cp "" Buildfile: build.xml test: BUILD FAILED /root/ivy-workspace/e1/build.xml:3: Problem: failed to create task or type antlib:org.apache.ivy.ant:settings Cause: The name is undefined. Action: Check the spelling. Action: Check that any custom tasks/types have been declared. Action: Check that any <presetdef>/<macrodef> declarations have taken place. No types or tasks have been defined in this namespace yet This appears to be an antlib declaration. Action: Check that the implementing library exists in one of: -/usr/share/ant/lib -/root/.ant/lib -a directory added on the command line with the -lib argument Total time: 0 seconds [root@localhost e1]# ant --execdebug --noconfig exec "/usr/java/jdk1.7.0_17/jre/bin/java" -classpath "/usr/share/ant/lib/ant-launcher.jar" -Dant.home="/usr/share/ant" -Dant.library.dir="/usr/share/ant/lib" org.apache.tools.ant.launch.Launcher -cp "" Buildfile: build.xml test: BUILD SUCCESSFUL Total time: 0 seconds With --noconfig -classpath is resolved with "/usr/share/ant/lib/ant-launcher.jar". How reproducible: Always Steps to Reproduce: 1. Execute: yum install ant 2. Execute: yum install apache-ivy 3. Create build.xml with following content: <project name="test ivy" default="test" xmlns:ivy="antlib:org.apache.ivy.ant"> <target name="test" description="Test ivy installation"> <ivy:settings /> </target> </project> 4. Execute: ant Actual results: BUILD FAILED /root/ivy-workspace/e1/build.xml:3: Problem: failed to create task or type antlib:org.apache.ivy.ant:settings Cause: The name is undefined. Action: Check the spelling. Action: Check that any custom tasks/types have been declared. Action: Check that any <presetdef>/<macrodef> declarations have taken place. No types or tasks have been defined in this namespace yet This appears to be an antlib declaration. Action: Check that the implementing library exists in one of: -/usr/share/ant/lib -/root/.ant/lib -a directory added on the command line with the -lib argument Total time: 0 seconds Expected results: Build should be successful without additional configuration after installing ant and ivy and without using ant --noconfig.
This was fixed in Fedora with: $ git show fa4267fc3d8fe26664658401c7ae77670820cf27 commit fa4267fc3d8fe26664658401c7ae77670820cf27 Author: Alexander Kurtakov <akurtako> Date: Wed Jul 6 12:14:33 2011 +0300 Fix ant integration. diff --git a/apache-ivy.spec b/apache-ivy.spec index dc496e5..7492258 100644 --- a/apache-ivy.spec +++ b/apache-ivy.spec @@ -1,6 +1,6 @@ Name: apache-ivy Version: 2.2.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Java-based dependency manager Group: Development/Tools @@ -20,6 +20,7 @@ BuildRequires: jpackage-utils Requires: jpackage-utils Requires: jakarta-oro Requires: jsch +Requires: ant Requires: jakarta-commons-httpclient %description @@ -79,16 +80,22 @@ install -p -m644 build/artifact/jars/ivy.jar $RPM_BUILD_ROOT%{_javadir}/ivy. install -d $RPM_BUILD_ROOT%{_javadocdir}/%{name} cp -rp build/doc/reports/api/. $RPM_BUILD_ROOT%{_javadocdir}/%{name} +mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/ant.d +echo "ivy" > $RPM_BUILD_ROOT%{_sysconfdir}/ant.d/%{name} + %files -%defattr(-,root,root,-) %{_javadir}/* +%{_sysconfdir}/ant.d/%{name} %doc RELEASE_NOTES CHANGES.txt LICENSE NOTICE README %files javadoc -%defattr(-,root,root,-) %{_javadocdir}/* +%doc LICENSE %changelog +* Wed Jul 6 2011 Alexander Kurtakov <akurtako> 2.2.0-2 +- Fix ant integration. + * Fri Feb 25 2011 Alexander Kurtakov <akurtako> 2.2.0-1 - Update to 2.2.0. Would there be any problem with updating to ivy 2.3.0 from Fedora? Or should we just backport the fixes?
apache-ivy-2.3.0-1.el6 has been submitted as an update for Fedora EPEL 6. https://admin.fedoraproject.org/updates/apache-ivy-2.3.0-1.el6
Package apache-ivy-2.3.0-1.el6: * should fix your issue, * was pushed to the Fedora EPEL 6 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=epel-testing apache-ivy-2.3.0-1.el6' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-EPEL-2013-12072/apache-ivy-2.3.0-1.el6 then log in and leave karma (feedback).
(In reply to Fedora Update System from comment #3) > Package apache-ivy-2.3.0-1.el6: > * should fix your issue, > * was pushed to the Fedora EPEL 6 testing repository, > * should be available at your local mirror within two days. > Update it with: > # su -c 'yum update --enablerepo=epel-testing apache-ivy-2.3.0-1.el6' > as soon as you are able to. > Please go to the following url: > https://admin.fedoraproject.org/updates/FEDORA-EPEL-2013-12072/apache-ivy-2. > 3.0-1.el6 > then log in and leave karma (feedback). [root@localhost e1]# yum update --enablerepo=epel-testing apache-ivy-2.3.0-1.el6 Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile epel/metalink | 25 kB 00:00 epel-testing/metalink | 25 kB 00:00 * base: mirror.lihnidos.org * epel: mirror.slu.cz * epel-testing: mirror.slu.cz * extras: mirror.lihnidos.org * rpmforge: merlin.fit.vutbr.cz * updates: mirror.lihnidos.org base | 3.7 kB 00:00 epel | 4.2 kB 00:00 epel/primary_db | 5.7 MB 00:04 epel-testing | 4.2 kB 00:00 epel-testing/primary_db | 366 kB 00:00 extras | 3.4 kB 00:00 rpmforge | 1.9 kB 00:00 updates | 3.4 kB 00:00 Setting up Update Process Resolving Dependencies --> Running transaction check ---> Package apache-ivy.noarch 0:2.1.0-1.el6 will be updated ---> Package apache-ivy.noarch 0:2.3.0-1.el6 will be an update --> Processing Dependency: jsch for package: apache-ivy-2.3.0-1.el6.noarch --> Processing Dependency: jakarta-oro for package: apache-ivy-2.3.0-1.el6.noarch --> Processing Dependency: jakarta-commons-httpclient for package: apache-ivy-2.3.0-1.el6.noarch --> Running transaction check ---> Package jakarta-commons-httpclient.x86_64 1:3.1-0.7.el6_3 will be installed --> Processing Dependency: jakarta-commons-logging >= 1.0.3 for package: 1:jakarta-commons-httpclient-3.1-0.7.el6_3.x86_64 ---> Package jakarta-oro.x86_64 0:2.0.8-6.6.el6 will be installed ---> Package jsch.noarch 0:0.1.41-2.2.el6 will be installed --> Processing Dependency: jzlib >= 1.0.5 for package: jsch-0.1.41-2.2.el6.noarch --> Running transaction check ---> Package jakarta-commons-logging.noarch 0:1.0.4-10.el6 will be installed ---> Package jzlib.x86_64 0:1.0.7-7.5.el6 will be installed --> Finished Dependency Resolution Dependencies Resolved ======================================================================================================================================================================== Package Arch Version Repository Size ======================================================================================================================================================================== Updating: apache-ivy noarch 2.3.0-1.el6 epel-testing 1.1 M Installing for dependencies: jakarta-commons-httpclient x86_64 1:3.1-0.7.el6_3 updates 587 k jakarta-commons-logging noarch 1.0.4-10.el6 base 52 k jakarta-oro x86_64 2.0.8-6.6.el6 base 191 k jsch noarch 0.1.41-2.2.el6 base 203 k jzlib x86_64 1.0.7-7.5.el6 base 123 k Transaction Summary ======================================================================================================================================================================== Install 5 Package(s) Upgrade 1 Package(s) Total download size: 2.2 M Is this ok [y/N]: y Downloading Packages: (1/6): apache-ivy-2.3.0-1.el6.noarch.rpm | 1.1 MB 00:00 (2/6): jakarta-commons-httpclient-3.1-0.7.el6_3.x86_64.rpm | 587 kB 00:00 (3/6): jakarta-commons-logging-1.0.4-10.el6.noarch.rpm | 52 kB 00:00 (4/6): jakarta-oro-2.0.8-6.6.el6.x86_64.rpm | 191 kB 00:00 (5/6): jsch-0.1.41-2.2.el6.noarch.rpm | 203 kB 00:00 (6/6): jzlib-1.0.7-7.5.el6.x86_64.rpm | 123 kB 00:00 ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ Total 1.0 MB/s | 2.2 MB 00:02 Running rpm_check_debug Running Transaction Test Transaction Test Succeeded Running Transaction Installing : jzlib-1.0.7-7.5.el6.x86_64 1/7 Installing : jsch-0.1.41-2.2.el6.noarch 2/7 Installing : jakarta-commons-logging-1.0.4-10.el6.noarch 3/7 Installing : 1:jakarta-commons-httpclient-3.1-0.7.el6_3.x86_64 4/7 Installing : jakarta-oro-2.0.8-6.6.el6.x86_64 5/7 Updating : apache-ivy-2.3.0-1.el6.noarch 6/7 Cleanup : apache-ivy-2.1.0-1.el6.noarch 7/7 Verifying : jakarta-oro-2.0.8-6.6.el6.x86_64 1/7 Verifying : 1:jakarta-commons-httpclient-3.1-0.7.el6_3.x86_64 2/7 Verifying : apache-ivy-2.3.0-1.el6.noarch 3/7 Verifying : jakarta-commons-logging-1.0.4-10.el6.noarch 4/7 Verifying : jzlib-1.0.7-7.5.el6.x86_64 5/7 Verifying : jsch-0.1.41-2.2.el6.noarch 6/7 Verifying : apache-ivy-2.1.0-1.el6.noarch 7/7 Dependency Installed: jakarta-commons-httpclient.x86_64 1:3.1-0.7.el6_3 jakarta-commons-logging.noarch 0:1.0.4-10.el6 jakarta-oro.x86_64 0:2.0.8-6.6.el6 jsch.noarch 0:0.1.41-2.2.el6 jzlib.x86_64 0:1.0.7-7.5.el6 Updated: apache-ivy.noarch 0:2.3.0-1.el6 Complete! [root@localhost e1]# ant Buildfile: build.xml test: BUILD SUCCESSFUL Total time: 0 seconds Works like a charm. :)
apache-ivy-2.3.0-1.el6 has been pushed to the Fedora EPEL 6 stable repository. If problems still persist, please make note of it in this bug report.