ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nicolas Lalevée (JIRA) <j...@apache.org>
Subject [jira] [Resolved] (IVYDE-348) Error on retrieving artitfacts to project root
Date Sat, 02 Nov 2013 16:35:20 GMT

     [ https://issues.apache.org/jira/browse/IVYDE-348?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Nicolas Lalevée resolved IVYDE-348.
-----------------------------------

       Resolution: Fixed
    Fix Version/s: trunk
         Assignee: Nicolas Lalevée

Fixed, thanks for the report.

> Error on retrieving artitfacts to project root
> ----------------------------------------------
>
>                 Key: IVYDE-348
>                 URL: https://issues.apache.org/jira/browse/IVYDE-348
>             Project: IvyDE
>          Issue Type: Bug
>          Components: workspace resolver
>    Affects Versions: 2.2.0.beta1
>            Reporter: Kieran Shanley
>            Assignee: Nicolas Lalevée
>            Priority: Minor
>             Fix For: trunk
>
>
> I have a retrieve pattern to retrieve a WAR file to the root of my EAR project. (JBOSS7
wants all sub modules to be in the root of the EAR). ivyDE correctly retrieves the artifact
but when it attempts to refresh the eclipse work space an error is reported:
> Path must include project and resource name :/EarProject <= this is the project name.
> I looked at the source code and the error appears to be in IvyResolver.java
>         int numberOfItemsRetrieved = ivy.retrieve(md.getModuleRevisionId(), pattern,
options);
>         if (numberOfItemsRetrieved > 0) {
>             // Only refresh if we actually retrieved a file.
>             IFolder retrieveFolder = project.getFolder(refreshPath);                
           
>             RefreshFolderJob refreshFolderJob = new RefreshFolderJob(retrieveFolder);
>             refreshFolderJob.schedule();
>         }
> Error is caused by the call to project.getFolder(); In the case where the artifact has
been resolved to the root dir shouldnt the code attempt to refresh the project ?
> Here is my suggested fix:
> if (numberOfItemsRetrieved > 0) {
>         // Only refresh if we actually retrieved a file.
>         if (refreshPath.length() > 0) {
>             // refresh folder into which artifact was retrieved
>             IFolder retrieveFolder = project.getFolder(refreshPath) 
> ;
>             IvyDEMessage.verbose("Refreshing Eclipse folder " + retrieveFolder); 
>             RefreshFolderJob refreshFolderJob = new RefreshFolderJob(retrieveFolder);
>             refreshFolderJob.schedule();
>         } else {
>            // refresh the project if the artifact is in the root dir
>            project.refreshLocal();
>         }    
>  }



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Mime
View raw message