[ http://jira.codehaus.org/browse/MNG-2838?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Vincent Siveton moved MANT-26 to MNG-2838: ------------------------------------------ Complexity: Intermediate Key: MNG-2838 (was: MANT-26) Project: Maven 2 (was: Maven 2.x Ant Plugin) > The Dependencies task of Maven Antlib should override an existing path > reference instead of failing > ---------------------------------------------------------------------------------------------------- > > Key: MNG-2838 > URL: http://jira.codehaus.org/browse/MNG-2838 > Project: Maven 2 > Issue Type: Wish > Environment: Solaris 10, Ant 1.7.0, Maven Antlib 2.0.4 > Reporter: Loïc Jay > > In the Maven Antlib 2.0.4 with Ant 1.7.0 when using the <dependencies> task > with the pathId attribute: > <dependencies pathId="compile.path"> > ... > <dependencies> > The following error is raised if a "compile.path" reference already exists: > [maven:dependencies] An error has occurred while processing the Maven > artifact tasks. > [maven:dependencies] Diagnosis: > [maven:dependencies] > [maven:dependencies] Reference ID compile.path already exists > In fact the error is raised even if the "compile.path" reference is defiend > in another target whcih is not executed at runtime. This is due to Ant > 1.7.0 which resolves references at parsing time so when the <dependencies> > task get executed the "compile.path" reference already exists and the Maven > <dependencies> task fails. > Other Ant tasks like the <path> task do not fail when a reference is already > defined. They simply override the reference. > The maven :dependencies task should mimic the Ant <path> behaviour and accept > to override a reference which is already defined. > This could be implemented by removing the following code from the > DependenciesTask.doExecute() method: > if ( pathId != null && getProject().getReference( pathId ) != null ) > { > throw new BuildException( "Reference ID " + pathId + " already > exists" ); > } > } -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira