[ http://jira.codehaus.org/browse/MECLIPSE-37?page=comments#action_58151 ]
Kenney Westerhof commented on MECLIPSE-37: ------------------------------------------ Yup.. ;) but probably the most flexible one. There are tons of other solutions, like adding a MojoConfigurator class for each mojo (optionally ofcourse), or add a configure()/updateProject() method to each mojo that will update the sourceroots. Depending on the dry run parameter either execute() or configure()/updateProject() would be called. To be backwards compatible a simple solution like this might work: - add a mode parameter to the execute tag: @execute phase="..." mode="configureProject" - don't call execute() on the mojo but a final method in the AbstractMojo, depending on the value of the mode parameter: - either public final void executeMojo for normal executions, that will just call the abstract method execute() - or public void configureProject() that will by default also call execute() but can be overridden in the mojo's to update the project with sourceroots etc.. I think this will ensure backwards compatibility and allow for future expansions on mojo execution to extract other metadata, like ant code snippets for the Ant plugin. > eclipse:eclipse should execute in a later phase than "generate-sources" > ----------------------------------------------------------------------- > > Key: MECLIPSE-37 > URL: http://jira.codehaus.org/browse/MECLIPSE-37 > Project: Maven 2.x Eclipse Plugin > Type: Bug > Versions: 2.0 > Reporter: Mark Donszelmann > Assignee: fabrizio giustina > Fix For: 2.1 > > > the eclipse:eclipse goal should run in a later phase than it currently does > (generate-sources) > as user defined plugins may add to the compileSourceRoots and > testCompileSourceRoots. > If it runs later, added paths will be written correctly to the .classpath. > Suggested phase is "test" -- 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 --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]