[jira] Updated: (MNG-1945) project.getBuild().setSourceDirectory() should modify the compile source roots automatically

2010-04-07 Thread Brett Porter (JIRA)

 [ 
http://jira.codehaus.org/browse/MNG-1945?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Brett Porter updated MNG-1945:
--

Fix Version/s: (was: 2.2.x (to be reviewed))
   Issues to be reviewed for 3.x

> project.getBuild().setSourceDirectory() should modify the compile source 
> roots automatically
> 
>
> Key: MNG-1945
> URL: http://jira.codehaus.org/browse/MNG-1945
> Project: Maven 2 & 3
>  Issue Type: Improvement
>  Components: POM
>Affects Versions: 2.0.1
>Reporter: Vincent Massol
>Assignee: Jason van Zyl
> Fix For: Issues to be reviewed for 3.x
>
>
> Here's the code that I have in the clover plugin right now:
> private void redirectSourceDirectories()
> {
> String oldSourceDirectory = 
> this.project.getBuild().getSourceDirectory();
> this.project.getBuild().setSourceDirectory( 
> this.cloverOutputSourceDirectory );
> 
> // Maven2 limitation: changing the source directory doesn't change 
> the compile source roots
> Iterator sourceRoots = 
> this.project.getCompileSourceRoots().iterator();
> for (int i = 0; sourceRoots.hasNext(); i++)
> {
> String sourceRoot = (String) 
> this.project.getCompileSourceRoots().get( i );
> if (sourceRoot.equals(oldSourceDirectory))
> {
> this.project.getCompileSourceRoots().remove( i );
> // Note: Ideally we should add the new compile source root at 
> the same place as the
> // one we're removing but there's no API for this...
> this.project.addCompileSourceRoot( 
> this.project.getBuild().getSourceDirectory() );
> }
> }
> }
> I believe this could be put in Maven core.

-- 
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




[jira] Updated: (MNG-1945) project.getBuild().setSourceDirectory() should modify the compile source roots automatically

2007-06-15 Thread Brett Porter (JIRA)

 [ 
http://jira.codehaus.org/browse/MNG-1945?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Brett Porter updated MNG-1945:
--

Component/s: POM

> project.getBuild().setSourceDirectory() should modify the compile source 
> roots automatically
> 
>
> Key: MNG-1945
> URL: http://jira.codehaus.org/browse/MNG-1945
> Project: Maven 2
>  Issue Type: Improvement
>  Components: POM
>Affects Versions: 2.0.1
>Reporter: Vincent Massol
>Assignee: Jason van Zyl
> Fix For: 2.0.x
>
>
> Here's the code that I have in the clover plugin right now:
> private void redirectSourceDirectories()
> {
> String oldSourceDirectory = 
> this.project.getBuild().getSourceDirectory();
> this.project.getBuild().setSourceDirectory( 
> this.cloverOutputSourceDirectory );
> 
> // Maven2 limitation: changing the source directory doesn't change 
> the compile source roots
> Iterator sourceRoots = 
> this.project.getCompileSourceRoots().iterator();
> for (int i = 0; sourceRoots.hasNext(); i++)
> {
> String sourceRoot = (String) 
> this.project.getCompileSourceRoots().get( i );
> if (sourceRoot.equals(oldSourceDirectory))
> {
> this.project.getCompileSourceRoots().remove( i );
> // Note: Ideally we should add the new compile source root at 
> the same place as the
> // one we're removing but there's no API for this...
> this.project.addCompileSourceRoot( 
> this.project.getBuild().getSourceDirectory() );
> }
> }
> }
> I believe this could be put in Maven core.

-- 
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




[jira] Updated: (MNG-1945) project.getBuild().setSourceDirectory() should modify the compile source roots automatically

2006-11-02 Thread Kenney Westerhof (JIRA)
 [ http://jira.codehaus.org/browse/MNG-1945?page=all ]

Kenney Westerhof updated MNG-1945:
--

Fix Version/s: (was: 2.0.5)
   2.0.6

> project.getBuild().setSourceDirectory() should modify the compile source 
> roots automatically
> 
>
> Key: MNG-1945
> URL: http://jira.codehaus.org/browse/MNG-1945
> Project: Maven 2
>  Issue Type: Improvement
>Affects Versions: 2.0.1
>Reporter: Vincent Massol
> Fix For: 2.0.6
>
>
> Here's the code that I have in the clover plugin right now:
> private void redirectSourceDirectories()
> {
> String oldSourceDirectory = 
> this.project.getBuild().getSourceDirectory();
> this.project.getBuild().setSourceDirectory( 
> this.cloverOutputSourceDirectory );
> 
> // Maven2 limitation: changing the source directory doesn't change 
> the compile source roots
> Iterator sourceRoots = 
> this.project.getCompileSourceRoots().iterator();
> for (int i = 0; sourceRoots.hasNext(); i++)
> {
> String sourceRoot = (String) 
> this.project.getCompileSourceRoots().get( i );
> if (sourceRoot.equals(oldSourceDirectory))
> {
> this.project.getCompileSourceRoots().remove( i );
> // Note: Ideally we should add the new compile source root at 
> the same place as the
> // one we're removing but there's no API for this...
> this.project.addCompileSourceRoot( 
> this.project.getBuild().getSourceDirectory() );
> }
> }
> }
> I believe this could be put in Maven core.

-- 
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




[jira] Updated: (MNG-1945) project.getBuild().setSourceDirectory() should modify the compile source roots automatically

2006-05-24 Thread John Casey (JIRA)
 [ http://jira.codehaus.org/browse/MNG-1945?page=all ]

John Casey updated MNG-1945:


Fix Version: 2.0.5

> project.getBuild().setSourceDirectory() should modify the compile source 
> roots automatically
> 
>
>  Key: MNG-1945
>  URL: http://jira.codehaus.org/browse/MNG-1945
>  Project: Maven 2
> Type: Improvement

> Versions: 2.0.1
> Reporter: Vincent Massol
>  Fix For: 2.0.5

>
>
> Here's the code that I have in the clover plugin right now:
> private void redirectSourceDirectories()
> {
> String oldSourceDirectory = 
> this.project.getBuild().getSourceDirectory();
> this.project.getBuild().setSourceDirectory( 
> this.cloverOutputSourceDirectory );
> 
> // Maven2 limitation: changing the source directory doesn't change 
> the compile source roots
> Iterator sourceRoots = 
> this.project.getCompileSourceRoots().iterator();
> for (int i = 0; sourceRoots.hasNext(); i++)
> {
> String sourceRoot = (String) 
> this.project.getCompileSourceRoots().get( i );
> if (sourceRoot.equals(oldSourceDirectory))
> {
> this.project.getCompileSourceRoots().remove( i );
> // Note: Ideally we should add the new compile source root at 
> the same place as the
> // one we're removing but there's no API for this...
> this.project.addCompileSourceRoot( 
> this.project.getBuild().getSourceDirectory() );
> }
> }
> }
> I believe this could be put in Maven core.

-- 
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