Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-5961

Ivy project type seems to ignore custom setting of build file

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • ivy-plugin
    • None
    • SUSE Linux
      Hudson 1.351
      Ivy plugin 1.2

      I am using Clearcase snapshot views in Hudson and this seems to cause problems with the Ivy project type when it comes to finding build.xml and possibly also ivy.xml (have not come that far though).

      An example:

      The workspace root for the project is /home/abc/HudsonSlave/workspace/SC_Util_Delta. The snapshot ends up in /home/abc/HudsonSlave/workspace/SC_Util_Delta/hudson_sc_util_delta_view and the build.xml is located in /home/abc/HudsonSlave/workspace/SC_Util_Delta/hudson_sc_util_delta_view/vobs/xyz/scn/sc/util.

      I set 'Relative path to descriptor from module root' to vobs/xyz/scn/sc/util/ivy.xml and 'Build File' to vobs/xyz/scn/sc/util/build.xml.

      When running the build, the console output says:

      Parsing Ivy Descriptor Files
      FATAL: Unable to find build script at /home/abc/HudsonSlave/workspace/SC_Util_Delta/hudson_sc_util_delta_view/build.xml

      So it seems to ignore the 'Build File' setting as it looks for build.xml in module root. For my non-Ivy projects, I use the same setting and it works fine. I have also tried to prefix the settings with hudson_sc_util_delta_view/ in case the module root is the same as workspace root but this gives the same result. Judging from other command prompts in the console output, the working directory is /home/abc/HudsonSlave/workspace/SC_Util_Delta/hudson_sc_util_delta_view. For non-Ivy projects, the working directory would be /home/abc/HudsonSlave/workspace/SC_Util_Delta/hudson_sc_util_delta_view/vobs/xyz/scn/sc/util.

      Am I doing something wrong?

      Also, the Ivy plugin seems to require that 'Ant Version' is set to a specific version and not default although that works fine for non-Ivy projects. But that should perhaps be in a separate bug report?

          [JENKINS-5961] Ivy project type seems to ignore custom setting of build file

          Ah ok, I see where I went wrong. Will have a fix for this soon. Sorry about that

          Just a question though, is the root of your ivy module actually at "vobs" or at "util"? I only ask because the way the Ivy project type works could be somewhat confusing as it's quite different than freestyle projects. If your ivy module is actually "util", then you can set the relative path to ivy descriptor as "ivy.xml" and the build file to "build.xml" (or just leave those fields blank since those are the default values). Hudson will then find the ivy.xml file automatically, determine the module root to be hudson_sc_util_delta_view/vobs/xyz/scn/sc/util and then find the build.xml file relative to there. (And in fact your build should work if you do it this way if you don't want to wait for the fix). It all depends on which folder you consider your Ivy module ownership to begin.

          Timothy Bingaman added a comment - Ah ok, I see where I went wrong. Will have a fix for this soon. Sorry about that Just a question though, is the root of your ivy module actually at "vobs" or at "util"? I only ask because the way the Ivy project type works could be somewhat confusing as it's quite different than freestyle projects. If your ivy module is actually "util", then you can set the relative path to ivy descriptor as "ivy.xml" and the build file to "build.xml" (or just leave those fields blank since those are the default values). Hudson will then find the ivy.xml file automatically, determine the module root to be hudson_sc_util_delta_view/vobs/xyz/scn/sc/util and then find the build.xml file relative to there. (And in fact your build should work if you do it this way if you don't want to wait for the fix). It all depends on which folder you consider your Ivy module ownership to begin.

          As for the ant version issue, yah, I copied that code from the maven plugin and modified it to apply to ant builds. A specific Maven install was required for the maven plugin to work, but I really don't need that for Ant so I can remove it. Thanks for bringing these bugs to my attention

          Timothy Bingaman added a comment - As for the ant version issue, yah, I copied that code from the maven plugin and modified it to apply to ant builds. A specific Maven install was required for the maven plugin to work, but I really don't need that for Ant so I can remove it. Thanks for bringing these bugs to my attention

          Code changed in hudson
          User: : tbingaman
          Path:
          trunk/hudson/plugins/ivy/src/main/java/hudson/ivy/IvyBuild.java
          trunk/hudson/plugins/ivy/src/main/java/hudson/ivy/IvyModuleSet.java
          trunk/hudson/plugins/ivy/src/main/java/hudson/ivy/IvyModuleSetBuild.java
          trunk/hudson/plugins/ivy/src/main/resources/hudson/ivy/IvyModuleSet/configure-entries.jelly
          trunk/hudson/plugins/ivy/src/main/resources/hudson/ivy/IvyModuleSet/configure-entries.properties
          http://jenkins-ci.org/commit/28805
          Log:
          [FIXED JENKINS-5961] Fixed thinko resulting in relative paths to ant build files not working. Also removed need to have a specific Ant installation configured.

          SCM/JIRA link daemon added a comment - Code changed in hudson User: : tbingaman Path: trunk/hudson/plugins/ivy/src/main/java/hudson/ivy/IvyBuild.java trunk/hudson/plugins/ivy/src/main/java/hudson/ivy/IvyModuleSet.java trunk/hudson/plugins/ivy/src/main/java/hudson/ivy/IvyModuleSetBuild.java trunk/hudson/plugins/ivy/src/main/resources/hudson/ivy/IvyModuleSet/configure-entries.jelly trunk/hudson/plugins/ivy/src/main/resources/hudson/ivy/IvyModuleSet/configure-entries.properties http://jenkins-ci.org/commit/28805 Log: [FIXED JENKINS-5961] Fixed thinko resulting in relative paths to ant build files not working. Also removed need to have a specific Ant installation configured.

          I'll run with these fixes in our Hudson for a day to make sure everything is good. You can expect a new release with the fixes to go out sometime tomorrow.

          Timothy Bingaman added a comment - I'll run with these fixes in our Hudson for a day to make sure everything is good. You can expect a new release with the fixes to go out sometime tomorrow.

          bloomper added a comment -

          Thanks for the quick response! Really impressive.

          Regarding your question about the root of the ivy module, the root is at util. I will try your suggestion while waiting for the next release.

          bloomper added a comment - Thanks for the quick response! Really impressive. Regarding your question about the root of the ivy module, the root is at util. I will try your suggestion while waiting for the next release.

          Just pushed out the release with this fix in it (Version 1.3)

          Timothy Bingaman added a comment - Just pushed out the release with this fix in it (Version 1.3)

          bloomper added a comment -

          Works beautifully!

          bloomper added a comment - Works beautifully!

            tbingaman Timothy Bingaman
            bloomper bloomper
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: