[
http://jira.codehaus.org/browse/MGWT-76?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=177321#action_177321
]
nicolas de loof commented on MGWT-76:
-------------------------------------
There is multiple issues with your patch
1. you set a list of project path. The user will have to manually configure all
the project to get considered, not just the workspace location. Using a
DirectoryScanner to find projects POM would be better
2. you must check the candidate project to match groupId + artifactId + version
+ type of the artifacts to be replaced
3. To avoid hand-made DI you should construct the mavenProject list in the Mojo
and pass it to ClassPathBuilder
4. transformClassPathUsingOptionalDevPath uses getCompileSourceRoots that will
not include code generation folders (that are only attached when a
generate-source phase is ran)
5. Using ProjectBuilder is resource consumer just to check POM for groupID /
artifactID
I just committed an alternative solution based on a single workspace parameter
(to be set in settings.xml) pointing to the user workspace (where he put
projects sources, beeing an eclipse user this will match the
maven-eclispe-plugin eclipse.workspace parameter)
The plugin scan this path for **/pom.xml, use a quick xpp3Reader to identify
maven projects (groupId+artifactId+version+type). For all project dependency
that match one of those projects, the artifact File is replaced bu project
outputDirectory
Please note I make here the assumption the other modules are configured as GWT
libraries, that copy the required .java files as resources in target/classes
Please test this (you will need to build the plugin, I've not deployed a
SNAPSHOT yet to not break existing users)
IT test still pass but they allready demonstrated to be not enough to ensure no
regression ;)
> Solution for multi module builds and hosted mode
> ------------------------------------------------
>
> Key: MGWT-76
> URL: http://jira.codehaus.org/browse/MGWT-76
> Project: Maven 2.x GWT Plugin
> Issue Type: Improvement
> Affects Versions: 1.1, 2.0
> Reporter: Stefan Raubal
> Attachments: gwt-maven-plugin-MGWT-76.rev9744.patch
>
>
> The suggested improvement would ease rapid application development for multi
> module environments:
> The sources of referenced modules should be added to the hosted mode
> classpath instead of the JAR dependency (if the projects are referenced in a
> reactor build).
> The totsp plugin was preparing a solution for multi module builds that share
> the source folders directly. This sounded very promising and was discussed
> here:
> http://code.google.com/p/gwt-maven/issues/detail?id=149
> Nicolas stated correctly in a discussion that the manual configuration step
> used in the totsp patch has drawbacks and proposed a different solution:
> <quote>
> The use of some external XML file to setup "artifact" path as a project path
> is not very maven-compliant, as Maven likes all the config to be in POM. Such
> a feature could be nice but should be supported at maven-core level, not just
> inside a plugin.
> An better option COULD be to reuse code from maven-eclipse-plugin that scans
> the workspace for other maven project and automagically replaces artifacts
> reference with project references. This is a stronger approach : user don't
> have to configure it's path in some XML (that is user dependent, so it SHOULD
> not be stored in SVN and refered from POM) and the plugin code will check the
> candidate project matches the expected version to avoid missconfiguration.
> </quote>
--
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 from this list, please visit:
http://xircles.codehaus.org/manage_email