On Wed, 27 Jul 2005, Brett Porter wrote: > It's just critical as a new feature. It may not be implemented :)
Aha so that's how it works :) > > what is strange about the compile source roots? Well, it seems all the other getters are delegates to the Build object, like getCompileClasspathElements(): it constructs a list each time it's called (no caching?) using the Build. The SourceRoots however have add methods, but they add them to MavenProject fields, not Build fields. The getters (getCompileSourceRoots) return the MavenProject field, which is not initialized in the class itself, contrary to the other getters mentioned above. So the MavenProject is a facade for both Model and Build. I would have expected the get*SourceRoots methods to delegate to the Build too, but instead initialization is done in DefaultMavenProjectBuilder like so: Build build = project.getBuild(); project.addCompileSourceRoot( build.getSourceDirectory() ); project.addScriptSourceRoot( build.getScriptSourceDirectory() ); project.addTestCompileSourceRoot( build.getTestSourceDirectory() ); And that's weird. :) -- Kenney > - Brett > > Kenney Westerhof wrote: > > >On Wed, 27 Jul 2005, Brett Porter (JIRA) wrote: > > > >I thought this was already possible using > >project.getBuild().getResources().add(...), so why is it critical? > >Will this be just a simple api added to MavenProject or will it use the > >strange approach used for compilesourceroots et al.? > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > -- Kenney Westerhof http://www.neonics.com GPG public key: http://www.gods.nl/~forge/kenneyw.key --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]