IvyDE
  1. IvyDE
  2. IVYDE-80

ant-build triggers cause ivyde build exception

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.0.alpha1
    • Fix Version/s: 2.0.0.alpha1
    • Component/s: None
    • Labels:
      None
    • Environment:

      eclipse 3.3.1.1, openSuse 10.3

      Description

      If I have an ant-build trigger in my settings file, ivyde causes a parse error and tries to throw an ant BuildException inside of eclipse.
      If I have an ant-call trigger, the parsing is fine, however it breaks my trigger (needs to use ant-build)

        Issue Links

          Activity

          Jonathan Doklovic created issue -
          Jonathan Doklovic made changes -
          Field Original Value New Value
          Link This issue relates to IVYDE-79 [ IVYDE-79 ]
          Hide
          Nicolas Lalevée added a comment -

          I don't understand what is the issue here. Why it is different from the IVYDE-79 ?

          Show
          Nicolas Lalevée added a comment - I don't understand what is the issue here. Why it is different from the IVYDE-79 ?
          Hide
          Xavier Hanin added a comment -

          I think the problem comes from the packaging of Ivy. Indeed until recently we were using ivy-core.jar in the classpath of IvyDE, to avoid a classloader problem when contributing Ivy to eclipse ant classpath using corresponding extension point. But I've discussed this last december, and we agreed to drop ivy-core packaging and use OSGi dependencies to load Ivy from IvyDE, using only one jar for Ivy packaging, which should fix this issue. See http://markmail.org/message/cikmytnkyxdig7xb

          Show
          Xavier Hanin added a comment - I think the problem comes from the packaging of Ivy. Indeed until recently we were using ivy-core.jar in the classpath of IvyDE, to avoid a classloader problem when contributing Ivy to eclipse ant classpath using corresponding extension point. But I've discussed this last december, and we agreed to drop ivy-core packaging and use OSGi dependencies to load Ivy from IvyDE, using only one jar for Ivy packaging, which should fix this issue. See http://markmail.org/message/cikmytnkyxdig7xb
          Hide
          Nicolas Lalevée added a comment -

          Yep there is a classloader issue which is raised in IVYDE-79.
          But I don't see the purpose of this second issue.

          Show
          Nicolas Lalevée added a comment - Yep there is a classloader issue which is raised in IVYDE-79 . But I don't see the purpose of this second issue.
          Hide
          Xavier Hanin added a comment -

          Not sure if this is what this particular issue, but the classloading issue I'm talking about is different from the one reported in IVYDE-79: the problem is due to the use of ivy-core.jar which doesn't contain the classes for Ant triggers (both ant build and ant call). In IVYDE-79 the classloading issue reports a problem loading Ant classes, which is different. But I'm not even sure this issue relates to what I'm saying, since we lack some information such as the exact exception thrown. Jonathan, could you provide this kind of details? And tell use more about which version of IvyDE you use - the bug state 1.3, which isn't released so I assume you use a trunk build, but from which revision? And how did you package Ivy itself?

          Show
          Xavier Hanin added a comment - Not sure if this is what this particular issue, but the classloading issue I'm talking about is different from the one reported in IVYDE-79 : the problem is due to the use of ivy-core.jar which doesn't contain the classes for Ant triggers (both ant build and ant call). In IVYDE-79 the classloading issue reports a problem loading Ant classes, which is different. But I'm not even sure this issue relates to what I'm saying, since we lack some information such as the exact exception thrown. Jonathan, could you provide this kind of details? And tell use more about which version of IvyDE you use - the bug state 1.3, which isn't released so I assume you use a trunk build, but from which revision? And how did you package Ivy itself?
          Hide
          Jonathan Doklovic added a comment -

          I put in IVYDE-79 to capture the fact that the BuildException class can't be found on the classpath in general.
          This issue (ivdyde-80) is specific to triggers not working properly.

          I'm using org.apache.ivyde.eclipse_1.3.0.20071009160600 which i built from source.
          in the lib folder i have:
          ant > ivy.jar (2.0.0-beta1)
          default > ivy-core.jar (2.0.0-beta1)

          I have an ant-build trigger in my settings file. When I use this, I just get an error in eclipse saying it can't find BuildException. (no real details about the actual error).
          If I use a copy of the same settings file with the trigger commented out, ivyde works properly.

          Show
          Jonathan Doklovic added a comment - I put in IVYDE-79 to capture the fact that the BuildException class can't be found on the classpath in general. This issue (ivdyde-80) is specific to triggers not working properly. I'm using org.apache.ivyde.eclipse_1.3.0.20071009160600 which i built from source. in the lib folder i have: ant > ivy.jar (2.0.0-beta1) default > ivy-core.jar (2.0.0-beta1) I have an ant-build trigger in my settings file. When I use this, I just get an error in eclipse saying it can't find BuildException. (no real details about the actual error). If I use a copy of the same settings file with the trigger commented out, ivyde works properly.
          Hide
          Jonathan Doklovic added a comment -

          I checked out the latest from trunk and see that it's now using an ivy plugin bundle instead of including the ivy jars.
          Any instructions on how to build this? My plugin xml shows org.apache.ivy as a broken dependency.
          Where/how do i add the base ivy bundle?

          Show
          Jonathan Doklovic added a comment - I checked out the latest from trunk and see that it's now using an ivy plugin bundle instead of including the ivy jars. Any instructions on how to build this? My plugin xml shows org.apache.ivy as a broken dependency. Where/how do i add the base ivy bundle?
          Hide
          Xavier Hanin added a comment -

          OK, so I think this confirms this issue is related to ivy-core packaging, and should thus be fixed in current trunk, where no Ivy version is packaged with IvyDE, which instead rely on an OSGi dependency to find Ivy, which itself is provided as an OSGi bundle (Ivy releases are actually OSGi bundles since recently). If you wish to test on your own, this requires some more knowledge on eclipse, but shouldn't be too hard though. You just need to put Ivy jar in your eclipse plugins directory, and IvyDE built from current trunk as well.

          Show
          Xavier Hanin added a comment - OK, so I think this confirms this issue is related to ivy-core packaging, and should thus be fixed in current trunk, where no Ivy version is packaged with IvyDE, which instead rely on an OSGi dependency to find Ivy, which itself is provided as an OSGi bundle (Ivy releases are actually OSGi bundles since recently). If you wish to test on your own, this requires some more knowledge on eclipse, but shouldn't be too hard though. You just need to put Ivy jar in your eclipse plugins directory, and IvyDE built from current trunk as well.
          Hide
          Jonathan Doklovic added a comment -

          tried putting the ivy 2.0.0.beta1 jar in the plugins folder.
          eclipse sees it as a bundle, however, it seems some classes have been added since the b1 release that ivyde needs.
          example: org.apache.ivy.core.cache.DefaultRepositoryCacheManager;

          so it looks like i'll need to build ivy from latest source and then build ivyde.

          I'm a little hesitant just because I'm not sure if doing this will introduce different issues with the source build of ivy.

          Show
          Jonathan Doklovic added a comment - tried putting the ivy 2.0.0.beta1 jar in the plugins folder. eclipse sees it as a bundle, however, it seems some classes have been added since the b1 release that ivyde needs. example: org.apache.ivy.core.cache.DefaultRepositoryCacheManager; so it looks like i'll need to build ivy from latest source and then build ivyde. I'm a little hesitant just because I'm not sure if doing this will introduce different issues with the source build of ivy.
          Hide
          Xavier Hanin added a comment -

          A new release of Ivy is currently waiting a vote approval, but you can already use it without needing to build from source:
          http://people.apache.org/~xavier/m2-staging-repo/org/apache/ivy/ivy/2.0.0-beta2/

          Alternatively, you can also checkout Ivy trunk, run "ant eclipse-default", and import the project in eclipse. You will get a development environment for debugging IvyDE with the dependency on Ivy resolved as a plugin dependency.

          Show
          Xavier Hanin added a comment - A new release of Ivy is currently waiting a vote approval, but you can already use it without needing to build from source: http://people.apache.org/~xavier/m2-staging-repo/org/apache/ivy/ivy/2.0.0-beta2/ Alternatively, you can also checkout Ivy trunk, run "ant eclipse-default", and import the project in eclipse. You will get a development environment for debugging IvyDE with the dependency on Ivy resolved as a plugin dependency.
          Hide
          Jonathan Doklovic added a comment -

          just added the beta2 jar to the plugins folder.
          Now i'm down to 1 error...

          line 313 of org.apache.ivyde.eclipse.ui.search.FixedJavaSearchPage complains with:

          The method getProjectScopeDescription(String[], int) in the type JavaSearchScopeFactory is not applicable for the arguments (String[], boolean)

          Show
          Jonathan Doklovic added a comment - just added the beta2 jar to the plugins folder. Now i'm down to 1 error... line 313 of org.apache.ivyde.eclipse.ui.search.FixedJavaSearchPage complains with: The method getProjectScopeDescription(String[], int) in the type JavaSearchScopeFactory is not applicable for the arguments (String[], boolean)
          Hide
          Xavier Hanin added a comment -

          OK, you can simply delete this class. We have already discussed about deleting it in svn too, I guess we'll soon end up with its actual deletion.

          Show
          Xavier Hanin added a comment - OK, you can simply delete this class. We have already discussed about deleting it in svn too, I guess we'll soon end up with its actual deletion.
          Hide
          Jonathan Doklovic added a comment -

          ok, deleted the class and also had to remove it's package from the manifest.
          once i did that, i was able to build and test, and everything seems to work properly now.
          i.e. ant-build trigger is working via ivyde now.

          thanks for the help.

          Show
          Jonathan Doklovic added a comment - ok, deleted the class and also had to remove it's package from the manifest. once i did that, i was able to build and test, and everything seems to work properly now. i.e. ant-build trigger is working via ivyde now. thanks for the help.
          Hide
          Xavier Hanin added a comment -

          Allright, so I mark this issue as resolved. Thanks for taking time to investigate with us. And now that you have a working development environment feel free to submit patches if you make any improvement.

          Show
          Xavier Hanin added a comment - Allright, so I mark this issue as resolved. Thanks for taking time to investigate with us. And now that you have a working development environment feel free to submit patches if you make any improvement.
          Xavier Hanin made changes -
          Fix Version/s 1.3.0 [ 12312463 ]
          Resolution Fixed [ 1 ]
          Status Open [ 1 ] Resolved [ 5 ]

            People

            • Assignee:
              Unassigned
              Reporter:
              Jonathan Doklovic
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development