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 "Maarten Coene (JIRA)" <ji...@apache.org> on 2007/04/02 20:55:32 UTC

[jira] Commented: (IVY-461) IvyPostResolve Task unnecessarily performs a resolve

    [ https://issues.apache.org/jira/browse/IVY-461?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12486122 ] 

Maarten Coene commented on IVY-461:
-----------------------------------

The following junit test illustrates the problem (add to IvyPostResolveTaskTest.java):

{code:java}
    public void testWithThreeResolves() throws Exception {
    	IvyResolve resolve = new IvyResolve();
    	resolve.setProject(_project);
    	resolve.setCache(_cache);
    	resolve.setFile(new File("test/java/org/apache/ivy/ant/ivy-multiconf.xml"));
    	resolve.setConf("compile");
    	resolve.execute();
        
    	ResolveReport reportBefore = (ResolveReport) _project.getReference("ivy.resolved.report");
        
    	_task.setConf("default");
    	_task.execute();

    	ResolveReport reportBetween = (ResolveReport) _project.getReference("ivy.resolved.report");
    	
        _task = new IvyPostResolveTask() {
        	public void execute() throws BuildException {
        		prepareAndCheck();
        	}
        };
        _task.setProject(_project);
        _task.setCache(_cache);
    	_task.setConf("compile,default");
    	_task.execute();

    	ResolveReport reportAfter = (ResolveReport) _project.getReference("ivy.resolved.report");
    	
    	assertNotSame("IvyPostResolveTask hasn't performed a resolve where it should have", reportBefore, reportBetween);
    	assertSame("IvyPostResolveTask has performed a resolve where it shouldn't", reportBetween, reportAfter);
    }
{code}

> IvyPostResolve Task unnecessarily performs a resolve
> ----------------------------------------------------
>
>                 Key: IVY-461
>                 URL: https://issues.apache.org/jira/browse/IVY-461
>             Project: Ivy
>          Issue Type: Bug
>          Components: Ant
>    Affects Versions: 1.4.1
>            Reporter: Maarten Coene
>
> If you call an IvyPostResolve Task more than once with different configurations, a resolve is performed from the second post-resolve task.
> For instance:
> <ivy:resolve conf="compile" />
> <ivy:post-resolve conf="default" />  --> triggers a resolve of the 'default' conf. OK!
> <ivy:post-resolve conf="compile" />  --> triggers a resolve of the 'compile' conf. NOK!

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