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

Ivy Project template not compatible with other build solutions then ant

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • ivy-plugin
    • None
    • Windows, .NET, C#

    Description

      Hi!

      We use ivy (stand-alone) with NAnt to build our solutions.
      And now we want to use the benitifts of the Modules part of the Ivy project (which is very neat!).

      When looking at the command output. I can see that the Ivy project tries to invoke ant.bat by default.

      cmd.exe /C '"ant.bat -file component.build && exit %%ERRORLEVEL%%"'

      Therefore i thought that then i might create a ant.bat which contains "nant build", just a passthru / redirect to what we realy want to use.
      And that ofcourse works fine.

      Thought the issue becomes when we are trying to get the enviroment properties that the freestyle projects sets as invoking time.

      The vars that we use is SVN_REVISION AND BUILD_NUMBER.
      When using NAnt we can se the following in the console output.

      Executing command: hudson.util.ArgumentListBuilder@78dd3dc4
      [local] $ cmd.exe /C '"NAnt.exe -buildfile:BuildTool\Component.build milestone release && exit %%ERRORLEVEL%%"'

      Either the values are not passed to the ant.bat file or I can't just referrer them as i'v been doing before.
      Is there a reason for the values not to follow? How should i solve this instead? Do you have an idea of how this could be solved? I'm open minded!

      Thanks alot for the great work!

      Looking forward to using the Ivy Project template and just not the plugin.

      Tomas

      Attachments

        Activity

          troos troos created issue -
          troos troos added a comment -

          Forgot to say that be able to use NAnt with the solution would probebly be the best solution and depending on the work pass the arguments thru an batch script ant.bat would be the second best solution i guess.

          Thanks again!

          troos troos added a comment - Forgot to say that be able to use NAnt with the solution would probebly be the best solution and depending on the work pass the arguments thru an batch script ant.bat would be the second best solution i guess. Thanks again!

          Should be doable.

          I can lookup in Hudson if you have the "nant" plugin installed (I assume you are using this right?) and if it is, then I can provide an option to use Ant or NAnt.

          It'll take me a while though... this is along side my day job so I don't get a ton of time to work on it.

          tbingaman Timothy Bingaman added a comment - Should be doable. I can lookup in Hudson if you have the "nant" plugin installed (I assume you are using this right?) and if it is, then I can provide an option to use Ant or NAnt. It'll take me a while though... this is along side my day job so I don't get a ton of time to work on it.
          troos troos added a comment -

          Hi!

          Correct! We use the nant plugin.

          I'm aware of that it is free time and I'm realy aprichiate the work you have done. Would mean alot to me since i want to use the ivy project template as described above.

          Do you think it's alot of work to accomplish it? I actually have no idea of the complexity in creating this hudson.

          troos troos added a comment - Hi! Correct! We use the nant plugin. I'm aware of that it is free time and I'm realy aprichiate the work you have done. Would mean alot to me since i want to use the ivy project template as described above. Do you think it's alot of work to accomplish it? I actually have no idea of the complexity in creating this hudson.

          I've had a preliminary look at this and it doesn't look too hard.

          I already have made a decent start on it and it's going well, but I'm off on vacation for 3 1/2 days now, so it won't be getting done till next week.

          tbingaman Timothy Bingaman added a comment - I've had a preliminary look at this and it doesn't look too hard. I already have made a decent start on it and it's going well, but I'm off on vacation for 3 1/2 days now, so it won't be getting done till next week.
          troos troos added a comment -

          Good news!

          Have a great vacation! Hopefully we can keep in touch in the next week too see if you had a chance to work anything on it!

          Best regards, Tomas

          troos troos added a comment - Good news! Have a great vacation! Hopefully we can keep in touch in the next week too see if you had a chance to work anything on it! Best regards, Tomas
          troos troos added a comment -

          Hey!

          Got any news to share?

          Tomas

          troos troos added a comment - Hey! Got any news to share? Tomas

          not too much to report at the moment, having to catch up on work a bunch so haven't had much time to put into this.

          I'm almost done abstracting the builder logic with an Ant builder proxy (this is the most complicated part), then I need to write a little NAnt builder proxy (that part should be quick), then I'll need to write the upgrade logic so that when people install the new version it will transparently convert their old config into the new Ant builder config (shouldn't be too much work, but will involve a decent amount of testing time).

          The reason it needs to be so complicated is that the plugin still needs to work even if the NAnt plugin isn't installed, yet I need to refer to NAant plugin classes. For that reason I'm having to abstract it all out into isolated classes so that I don't get a ClassNotFoundException when running it without the NAnt plugin.

          Hope that all makes sense

          Once I get it a bit closer I can give you a pre-release version to try out while I finish up my full release testing.

          tbingaman Timothy Bingaman added a comment - not too much to report at the moment, having to catch up on work a bunch so haven't had much time to put into this. I'm almost done abstracting the builder logic with an Ant builder proxy (this is the most complicated part), then I need to write a little NAnt builder proxy (that part should be quick), then I'll need to write the upgrade logic so that when people install the new version it will transparently convert their old config into the new Ant builder config (shouldn't be too much work, but will involve a decent amount of testing time). The reason it needs to be so complicated is that the plugin still needs to work even if the NAnt plugin isn't installed, yet I need to refer to NAant plugin classes. For that reason I'm having to abstract it all out into isolated classes so that I don't get a ClassNotFoundException when running it without the NAnt plugin. Hope that all makes sense Once I get it a bit closer I can give you a pre-release version to try out while I finish up my full release testing.

          Code changed in hudson
          User: : tbingaman
          Path:
          trunk/hudson/plugins/ivy/pom.xml
          trunk/hudson/plugins/ivy/src/main/java/hudson/ivy/IvyBuild.java
          trunk/hudson/plugins/ivy/src/main/java/hudson/ivy/IvyModule.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/java/hudson/ivy/builder/AntIvyBuilderType.java
          trunk/hudson/plugins/ivy/src/main/java/hudson/ivy/builder/IvyBuilderType.java
          trunk/hudson/plugins/ivy/src/main/java/hudson/ivy/builder/IvyBuilderTypeDescriptor.java
          trunk/hudson/plugins/ivy/src/main/java/hudson/ivy/builder/NAntIvyBuilderType.java
          trunk/hudson/plugins/ivy/src/main/resources/hudson/ivy/IvyModuleSet/configure-entries.jelly
          trunk/hudson/plugins/ivy/src/main/resources/hudson/ivy/builder/AntIvyBuilderType/config.jelly
          trunk/hudson/plugins/ivy/src/main/resources/hudson/ivy/builder/NAntIvyBuilderType/config.jelly
          http://jenkins-ci.org/commit/32494
          Log:
          JENKINS-6802 refactored builder logic for Ivy Projects so that the builder is configurable. Added an option to use NAnt as the builder instead of Ant. Added upgrade logic to convert old data to an Ant builder config (the default).

          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in hudson User: : tbingaman Path: trunk/hudson/plugins/ivy/pom.xml trunk/hudson/plugins/ivy/src/main/java/hudson/ivy/IvyBuild.java trunk/hudson/plugins/ivy/src/main/java/hudson/ivy/IvyModule.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/java/hudson/ivy/builder/AntIvyBuilderType.java trunk/hudson/plugins/ivy/src/main/java/hudson/ivy/builder/IvyBuilderType.java trunk/hudson/plugins/ivy/src/main/java/hudson/ivy/builder/IvyBuilderTypeDescriptor.java trunk/hudson/plugins/ivy/src/main/java/hudson/ivy/builder/NAntIvyBuilderType.java trunk/hudson/plugins/ivy/src/main/resources/hudson/ivy/IvyModuleSet/configure-entries.jelly trunk/hudson/plugins/ivy/src/main/resources/hudson/ivy/builder/AntIvyBuilderType/config.jelly trunk/hudson/plugins/ivy/src/main/resources/hudson/ivy/builder/NAntIvyBuilderType/config.jelly http://jenkins-ci.org/commit/32494 Log: JENKINS-6802 refactored builder logic for Ivy Projects so that the builder is configurable. Added an option to use NAnt as the builder instead of Ant. Added upgrade logic to convert old data to an Ant builder config (the default).

          Code changed in hudson
          User: : tbingaman
          Path:
          trunk/hudson/plugins/ivy/src/main/java/hudson/ivy/SplittableBuildListener.java
          http://jenkins-ci.org/commit/32495
          Log:
          JENKINS-6802 added implementation of a new method that I must have missed seeing.

          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in hudson User: : tbingaman Path: trunk/hudson/plugins/ivy/src/main/java/hudson/ivy/SplittableBuildListener.java http://jenkins-ci.org/commit/32495 Log: JENKINS-6802 added implementation of a new method that I must have missed seeing.
          troos troos added a comment -

          Hey!

          Sounds like you have made alot progress!

          troos troos added a comment - Hey! Sounds like you have made alot progress!

          Hi, yes, a decent amount

          Still a couple issues to work out... but I think it could be usable for you.

          If you have a non-production Hudson instance you could try it out on, you can get the latest builds from here:
          http://ci.hudson-labs.org/job/hudson_all_plugins/org.jvnet.hudson.plugins$ivy/

          I say non-production because it might have some bugs in it and I wouldn't want you to break your main builds.

          Just download the ivy.hpi file and install it either by copying it manually into your plugins dir, or via the file upload on the advanced tab of the hudson plugin management page.

          tbingaman Timothy Bingaman added a comment - Hi, yes, a decent amount Still a couple issues to work out... but I think it could be usable for you. If you have a non-production Hudson instance you could try it out on, you can get the latest builds from here: http://ci.hudson-labs.org/job/hudson_all_plugins/org.jvnet.hudson.plugins$ivy/ I say non-production because it might have some bugs in it and I wouldn't want you to break your main builds. Just download the ivy.hpi file and install it either by copying it manually into your plugins dir, or via the file upload on the advanced tab of the hudson plugin management page.

          Code changed in hudson
          User: : tbingaman
          Path:
          trunk/hudson/plugins/ivy/src/main/java/hudson/ivy/builder/IvyBuilderType.java
          http://jenkins-ci.org/commit/32755
          Log:
          JENKINS-6802 marked IvyBuilderType as an extension point.

          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in hudson User: : tbingaman Path: trunk/hudson/plugins/ivy/src/main/java/hudson/ivy/builder/IvyBuilderType.java http://jenkins-ci.org/commit/32755 Log: JENKINS-6802 marked IvyBuilderType as an extension point.

          Hi Tomas, have you had a chance to try this out? I don't have a NAnt build example to test it on here. It looks like it should all be working, but I'd like a confirmation before I actually release it.

          Thanks,
          Timo

          tbingaman Timothy Bingaman added a comment - Hi Tomas, have you had a chance to try this out? I don't have a NAnt build example to test it on here. It looks like it should all be working, but I'd like a confirmation before I actually release it. Thanks, Timo

          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/IvyModule.java
          trunk/hudson/plugins/ivy/src/main/java/hudson/ivy/IvyModuleSetBuild.java
          trunk/hudson/plugins/ivy/src/main/java/hudson/ivy/builder/AntIvyBuilderType.java
          trunk/hudson/plugins/ivy/src/main/java/hudson/ivy/builder/IvyBuilderType.java
          trunk/hudson/plugins/ivy/src/main/java/hudson/ivy/builder/NAntIvyBuilderType.java
          trunk/hudson/plugins/ivy/src/main/resources/hudson/ivy/IvyModule/configure-entries.jelly
          http://jenkins-ci.org/commit/33064
          Log:
          JENKINS-6802 Fixing some fallout from adding this new feature. Restored ability to override targets on a per-module basis.

          scm_issue_link 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/IvyModule.java trunk/hudson/plugins/ivy/src/main/java/hudson/ivy/IvyModuleSetBuild.java trunk/hudson/plugins/ivy/src/main/java/hudson/ivy/builder/AntIvyBuilderType.java trunk/hudson/plugins/ivy/src/main/java/hudson/ivy/builder/IvyBuilderType.java trunk/hudson/plugins/ivy/src/main/java/hudson/ivy/builder/NAntIvyBuilderType.java trunk/hudson/plugins/ivy/src/main/resources/hudson/ivy/IvyModule/configure-entries.jelly http://jenkins-ci.org/commit/33064 Log: JENKINS-6802 Fixing some fallout from adding this new feature. Restored ability to override targets on a per-module basis.

          Added in release 1.8

          tbingaman Timothy Bingaman added a comment - Added in release 1.8
          tbingaman Timothy Bingaman made changes -
          Field Original Value New Value
          Resolution Fixed [ 1 ]
          Status Open [ 1 ] Resolved [ 5 ]
          troos troos added a comment -

          Hey!

          Thanks for the work, i'v been on vaccation and there fore been unable to test this. I will get on it next week.
          Thanks again.

          troos troos added a comment - Hey! Thanks for the work, i'v been on vaccation and there fore been unable to test this. I will get on it next week. Thanks again.
          abayer Andrew Bayer made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          rtyler R. Tyler Croy made changes -
          Workflow JNJira [ 136897 ] JNJira + In-Review [ 204272 ]

          People

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

            Dates

              Created:
              Updated:
              Resolved: