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

Nant executable invocation issues on Linux platform

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • nant-plugin
    • None
    • Platform: PC, OS: Linux

      I am work on a debian lenny linux distribution, In order to get work the nant
      plugin I have to create a symbolic link under /usr/bin (by this way: ln -s nant
      NAnt.exe) and set, at the section (manage hudson), subsection nant, attribute
      NANT_HOME -> /usr/ as the path way.

      Of course, I have installed the nant package from debian who setup the binary
      under /usr/bin, but I don't know why, the nant expands the path adding the bin
      directory. This is the reason to set /usr/ as the path instead of /usr/bin/.

      Greats.

      Summarying:

      Two problems; one related to case insensitive and the last one for the path way.

          [JENKINS-4504] Nant executable invocation issues on Linux platform

          mdonohue added a comment -

          .

          mdonohue added a comment - .

          jholzer added a comment -

          The issue is in the Descriptor implementation for the plugin. When it verifies the NAnt installation location, it looks for the existence of [NANT_HOME]/bin/NAnt.exe as this is the default location on Windows. I will have to update this to work in both a Windows and Unix-based environment.

          However, some conventions must be established, and there is not going to be any way to satisfy 100% of NAnt installation scenarios. For instance, on Windows the plugin will continue to assume that the NAnt executable is located at "[NANT_HOME]/bin/NAnt.exe", as this is the default location if you download the NAnt binary package. I am not sure what the convention on Unix-based platforms will be yet, because I am not familiar with NAnt outside of Windows. Whatever the convention eventually is, I can tell you it will be based on the relative location of the NAnt binary that is installed when running "make install" from the NAnt sources pacakge. If a Debian/Ubuntu or RPM binary package installs the NAnt binary at a different relative path from the NANT_HOME directory, then symbolic links will need to be used.

          Once the fix is in place, I will update the documentation on the plugin wiki page.

          jholzer added a comment - The issue is in the Descriptor implementation for the plugin. When it verifies the NAnt installation location, it looks for the existence of [NANT_HOME] /bin/NAnt.exe as this is the default location on Windows. I will have to update this to work in both a Windows and Unix-based environment. However, some conventions must be established, and there is not going to be any way to satisfy 100% of NAnt installation scenarios. For instance, on Windows the plugin will continue to assume that the NAnt executable is located at " [NANT_HOME] /bin/NAnt.exe", as this is the default location if you download the NAnt binary package. I am not sure what the convention on Unix-based platforms will be yet, because I am not familiar with NAnt outside of Windows. Whatever the convention eventually is, I can tell you it will be based on the relative location of the NAnt binary that is installed when running "make install" from the NAnt sources pacakge. If a Debian/Ubuntu or RPM binary package installs the NAnt binary at a different relative path from the NANT_HOME directory, then symbolic links will need to be used. Once the fix is in place, I will update the documentation on the plugin wiki page.

          joansava added a comment -

          >The issue is in the Descriptor implementation for the plugin. When it verifies the NAnt installation location, it >looks for the existence of [NANT_HOME]/bin/NAnt.exe as this is the default location on Windows. I will have to >update this to work in both a Windows and Unix-based environment.

          Thanks and I apologize so I didn't see [NANT_HOME]/bin/NAnt.exe in the Descriptor implementation. I'm so sorry.

          >However, some conventions must be established, and there is not going to be any way to satisfy 100% of NAnt >installation scenarios. For instance, on Windows the plugin will continue to assume that the NAnt executable is >located at "[NANT_HOME]/bin/NAnt.exe", as this is the default location if you download the NAnt binary package. I >am not sure what the convention on Unix-based platforms will be yet, because I am not familiar with NAnt outside >of Windows. Whatever the convention eventually is, I can tell you it will be based on the relative location of >the NAnt binary that is installed when running "make install" from the NAnt sources pacakge. If a Debian/Ubuntu >or RPM binary package installs the NAnt binary at a different relative path from the NANT_HOME directory, then >symbolic links will need to be used.

          I totally agree, anyway, there is a minor enhacement you could do to improve the windows/linux support. Windows is case insensitive, Linux is case sensitive so if you can code the plugin to search for nant.exe instead of NAnt.Exe, this fix will work under both operating systems (with the right path setup, of course (via plugin, via symlink...)).

          Greats.

          joansava added a comment - >The issue is in the Descriptor implementation for the plugin. When it verifies the NAnt installation location, it >looks for the existence of [NANT_HOME] /bin/NAnt.exe as this is the default location on Windows. I will have to >update this to work in both a Windows and Unix-based environment. Thanks and I apologize so I didn't see [NANT_HOME] /bin/NAnt.exe in the Descriptor implementation. I'm so sorry. >However, some conventions must be established, and there is not going to be any way to satisfy 100% of NAnt >installation scenarios. For instance, on Windows the plugin will continue to assume that the NAnt executable is >located at " [NANT_HOME] /bin/NAnt.exe", as this is the default location if you download the NAnt binary package. I >am not sure what the convention on Unix-based platforms will be yet, because I am not familiar with NAnt outside >of Windows. Whatever the convention eventually is, I can tell you it will be based on the relative location of >the NAnt binary that is installed when running "make install" from the NAnt sources pacakge. If a Debian/Ubuntu >or RPM binary package installs the NAnt binary at a different relative path from the NANT_HOME directory, then >symbolic links will need to be used. I totally agree, anyway, there is a minor enhacement you could do to improve the windows/linux support. Windows is case insensitive, Linux is case sensitive so if you can code the plugin to search for nant.exe instead of NAnt.Exe, this fix will work under both operating systems (with the right path setup, of course (via plugin, via symlink...)). Greats.

          jholzer added a comment -

          The fix will be tested against NAnt running in Linux (via mono). If the default location for the NAnt binary is /usr/bin/nant then I will make sure that if the platform is Unix-based the Descriptor will do a case-sensitive search for [NANT_HOME]/bin/nant. I should hopefully have a fix ready in the next few days, time premitting.

          jholzer added a comment - The fix will be tested against NAnt running in Linux (via mono). If the default location for the NAnt binary is /usr/bin/nant then I will make sure that if the platform is Unix-based the Descriptor will do a case-sensitive search for [NANT_HOME] /bin/nant. I should hopefully have a fix ready in the next few days, time premitting.

          jholzer added a comment -

          I am changing the priority of this issue to "Major". There is a workaround for this issue, creating a symbolic link, that is described in the original ticket summary. Therefore, this issue is not blocking the use of the plugin on Unix-based systems, just making it inconvenient.

          jholzer added a comment - I am changing the priority of this issue to "Major". There is a workaround for this issue, creating a symbolic link, that is described in the original ticket summary. Therefore, this issue is not blocking the use of the plugin on Unix-based systems, just making it inconvenient.

          jholzer added a comment -

          The plugin should now look for the proper executable in Linux (and other Unix-based OS's) when validating the configuration of a NAnt installation. In the case of Linux, the plugin will look for the executable "bin/nant" relative to the NANT_HOME directory. However, it is recommended, if possible, that you put the NAnt executable in your path and just use the default installation, which requires no configuration.

          Please verify that the plugin is now working as you expect.

          jholzer added a comment - The plugin should now look for the proper executable in Linux (and other Unix-based OS's) when validating the configuration of a NAnt installation. In the case of Linux, the plugin will look for the executable "bin/nant" relative to the NANT_HOME directory. However, it is recommended, if possible, that you put the NAnt executable in your path and just use the default installation, which requires no configuration. Please verify that the plugin is now working as you expect.

          joansava added a comment -

          Hi jholzer,

          I have verified the new behaviour of your plugin. It's working perfect for me. :-D

          It is not necessary now to add the symlinks I did before.

          One thing more: I know you told me that the nant plugin documentation talking about the nant path searching: NANT_HOME/bin/Nant. However I like to read this info in the Hudson integrated help. I mean, in the hudson management section, nant builder subsection, NANT_HOME property, the integrated help says "Specify the path to your nant installation directory." I think this would be a perfect place where you could put that note. As you know, I use debian wich installs nant at /usr/bin so I must have to put /usr in the NANT_HOME property to get nant plugin working perfectly for me.

          Thank you very much for your excellent work.

          joansava added a comment - Hi jholzer, I have verified the new behaviour of your plugin. It's working perfect for me. :-D It is not necessary now to add the symlinks I did before. One thing more: I know you told me that the nant plugin documentation talking about the nant path searching: NANT_HOME/bin/Nant. However I like to read this info in the Hudson integrated help. I mean, in the hudson management section, nant builder subsection, NANT_HOME property, the integrated help says "Specify the path to your nant installation directory." I think this would be a perfect place where you could put that note. As you know, I use debian wich installs nant at /usr/bin so I must have to put /usr in the NANT_HOME property to get nant plugin working perfectly for me. Thank you very much for your excellent work.

            joansava joansava
            joansava joansava
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: