You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ivy-commits@incubator.apache.org by "Jeffrey Blatttman (JIRA)" <ji...@apache.org> on 2007/04/16 16:43:15 UTC

[jira] Created: (IVY-475) ivy:install ant task does not fail on error

ivy:install ant task does not fail on error
-------------------------------------------

                 Key: IVY-475
                 URL: https://issues.apache.org/jira/browse/IVY-475
             Project: Ivy
          Issue Type: Bug
          Components: Ant
    Affects Versions: 1.4.1
         Environment: jdk 1.5
            Reporter: Jeffrey Blatttman


install ant task does not fail on error. looking at the code, it looks like IvyInstall does not capture and inspect the ResolveReport object that is returned from the Ivy.install() method ...

...
        try {
            ivy.install(mrid, _from, _to, _transitive, doValidate(settings), _overwrite, FilterHelper.getArtifactTypeFilter(_type), _cache, _matcher);
        } catch (Exception e) {
            throw new BuildException("impossible to install "+ mrid +": "+e, e);
        }
...

looking at the IvyResolve task, it appears this pattern should be followed ...

...
                    report = ivy.resolve(
                            _file.toURL(),
                            getResolveOptions(confs, settings));
            }
            if (report.hasError()) {
                    if (_failureProperty != null) {
                        getProject().setProperty(_failureProperty, "true");
                    }
                    if (isHaltonfailure()) {
                        throw new BuildException("resolve failed - see output for details");
                    }
...

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (IVY-475) ivy:install ant task does not fail on error

Posted by "Jeffrey Blatttman (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/IVY-475?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jeffrey Blatttman updated IVY-475:
----------------------------------

    Attachment: ivy-475.patch

> ivy:install ant task does not fail on error
> -------------------------------------------
>
>                 Key: IVY-475
>                 URL: https://issues.apache.org/jira/browse/IVY-475
>             Project: Ivy
>          Issue Type: Bug
>          Components: Ant
>    Affects Versions: 1.4.1
>         Environment: jdk 1.5
>            Reporter: Jeffrey Blatttman
>         Attachments: ivy-475.patch, ivy-475.patch
>
>
> install ant task does not fail on error. looking at the code, it looks like IvyInstall does not capture and inspect the ResolveReport object that is returned from the Ivy.install() method ...
> ...
>         try {
>             ivy.install(mrid, _from, _to, _transitive, doValidate(settings), _overwrite, FilterHelper.getArtifactTypeFilter(_type), _cache, _matcher);
>         } catch (Exception e) {
>             throw new BuildException("impossible to install "+ mrid +": "+e, e);
>         }
> ...
> looking at the IvyResolve task, it appears this pattern should be followed ...
> ...
>                     report = ivy.resolve(
>                             _file.toURL(),
>                             getResolveOptions(confs, settings));
>             }
>             if (report.hasError()) {
>                     if (_failureProperty != null) {
>                         getProject().setProperty(_failureProperty, "true");
>                     }
>                     if (isHaltonfailure()) {
>                         throw new BuildException("resolve failed - see output for details");
>                     }
> ...

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (IVY-475) ivy:install ant task does not fail on error

Posted by "Xavier Hanin (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/IVY-475?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Xavier Hanin updated IVY-475:
-----------------------------

    Fix Version/s:     (was: 2.0)
                   2.0.0-alpha-2

> ivy:install ant task does not fail on error
> -------------------------------------------
>
>                 Key: IVY-475
>                 URL: https://issues.apache.org/jira/browse/IVY-475
>             Project: Ivy
>          Issue Type: Bug
>          Components: Ant
>    Affects Versions: 1.4.1
>         Environment: jdk 1.5
>            Reporter: Jeffrey Blatttman
>         Assigned To: Xavier Hanin
>             Fix For: 2.0.0-alpha-2
>
>         Attachments: ivy-475.patch, ivy-475.patch
>
>
> install ant task does not fail on error. looking at the code, it looks like IvyInstall does not capture and inspect the ResolveReport object that is returned from the Ivy.install() method ...
> ...
>         try {
>             ivy.install(mrid, _from, _to, _transitive, doValidate(settings), _overwrite, FilterHelper.getArtifactTypeFilter(_type), _cache, _matcher);
>         } catch (Exception e) {
>             throw new BuildException("impossible to install "+ mrid +": "+e, e);
>         }
> ...
> looking at the IvyResolve task, it appears this pattern should be followed ...
> ...
>                     report = ivy.resolve(
>                             _file.toURL(),
>                             getResolveOptions(confs, settings));
>             }
>             if (report.hasError()) {
>                     if (_failureProperty != null) {
>                         getProject().setProperty(_failureProperty, "true");
>                     }
>                     if (isHaltonfailure()) {
>                         throw new BuildException("resolve failed - see output for details");
>                     }
> ...

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (IVY-475) ivy:install ant task does not fail on error

Posted by "Xavier Hanin (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/IVY-475?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Xavier Hanin reassigned IVY-475:
--------------------------------

    Assignee: Xavier Hanin

> ivy:install ant task does not fail on error
> -------------------------------------------
>
>                 Key: IVY-475
>                 URL: https://issues.apache.org/jira/browse/IVY-475
>             Project: Ivy
>          Issue Type: Bug
>          Components: Ant
>    Affects Versions: 1.4.1
>         Environment: jdk 1.5
>            Reporter: Jeffrey Blatttman
>         Assigned To: Xavier Hanin
>         Attachments: ivy-475.patch, ivy-475.patch
>
>
> install ant task does not fail on error. looking at the code, it looks like IvyInstall does not capture and inspect the ResolveReport object that is returned from the Ivy.install() method ...
> ...
>         try {
>             ivy.install(mrid, _from, _to, _transitive, doValidate(settings), _overwrite, FilterHelper.getArtifactTypeFilter(_type), _cache, _matcher);
>         } catch (Exception e) {
>             throw new BuildException("impossible to install "+ mrid +": "+e, e);
>         }
> ...
> looking at the IvyResolve task, it appears this pattern should be followed ...
> ...
>                     report = ivy.resolve(
>                             _file.toURL(),
>                             getResolveOptions(confs, settings));
>             }
>             if (report.hasError()) {
>                     if (_failureProperty != null) {
>                         getProject().setProperty(_failureProperty, "true");
>                     }
>                     if (isHaltonfailure()) {
>                         throw new BuildException("resolve failed - see output for details");
>                     }
> ...

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (IVY-475) ivy:install ant task does not fail on error

Posted by "Jeffrey Blatttman (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/IVY-475?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jeffrey Blatttman updated IVY-475:
----------------------------------

    Attachment: ivy-475.patch

> ivy:install ant task does not fail on error
> -------------------------------------------
>
>                 Key: IVY-475
>                 URL: https://issues.apache.org/jira/browse/IVY-475
>             Project: Ivy
>          Issue Type: Bug
>          Components: Ant
>    Affects Versions: 1.4.1
>         Environment: jdk 1.5
>            Reporter: Jeffrey Blatttman
>         Attachments: ivy-475.patch, ivy-475.patch
>
>
> install ant task does not fail on error. looking at the code, it looks like IvyInstall does not capture and inspect the ResolveReport object that is returned from the Ivy.install() method ...
> ...
>         try {
>             ivy.install(mrid, _from, _to, _transitive, doValidate(settings), _overwrite, FilterHelper.getArtifactTypeFilter(_type), _cache, _matcher);
>         } catch (Exception e) {
>             throw new BuildException("impossible to install "+ mrid +": "+e, e);
>         }
> ...
> looking at the IvyResolve task, it appears this pattern should be followed ...
> ...
>                     report = ivy.resolve(
>                             _file.toURL(),
>                             getResolveOptions(confs, settings));
>             }
>             if (report.hasError()) {
>                     if (_failureProperty != null) {
>                         getProject().setProperty(_failureProperty, "true");
>                     }
>                     if (isHaltonfailure()) {
>                         throw new BuildException("resolve failed - see output for details");
>                     }
> ...

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (IVY-475) ivy:install ant task does not fail on error

Posted by "Xavier Hanin (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/IVY-475?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Xavier Hanin resolved IVY-475.
------------------------------

       Resolution: Fixed
    Fix Version/s: 2.0

I've applied your patch with minor modifications, thanks a lot for your contribution!

> ivy:install ant task does not fail on error
> -------------------------------------------
>
>                 Key: IVY-475
>                 URL: https://issues.apache.org/jira/browse/IVY-475
>             Project: Ivy
>          Issue Type: Bug
>          Components: Ant
>    Affects Versions: 1.4.1
>         Environment: jdk 1.5
>            Reporter: Jeffrey Blatttman
>         Assigned To: Xavier Hanin
>             Fix For: 2.0
>
>         Attachments: ivy-475.patch, ivy-475.patch
>
>
> install ant task does not fail on error. looking at the code, it looks like IvyInstall does not capture and inspect the ResolveReport object that is returned from the Ivy.install() method ...
> ...
>         try {
>             ivy.install(mrid, _from, _to, _transitive, doValidate(settings), _overwrite, FilterHelper.getArtifactTypeFilter(_type), _cache, _matcher);
>         } catch (Exception e) {
>             throw new BuildException("impossible to install "+ mrid +": "+e, e);
>         }
> ...
> looking at the IvyResolve task, it appears this pattern should be followed ...
> ...
>                     report = ivy.resolve(
>                             _file.toURL(),
>                             getResolveOptions(confs, settings));
>             }
>             if (report.hasError()) {
>                     if (_failureProperty != null) {
>                         getProject().setProperty(_failureProperty, "true");
>                     }
>                     if (isHaltonfailure()) {
>                         throw new BuildException("resolve failed - see output for details");
>                     }
> ...

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.