[
http://jira.codehaus.org/browse/MGWT-120?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=194626#action_194626
]
Jesper Terkelsen commented on MGWT-120:
---------------------------------------
While i fully respect the decision not to include such a feature in the plugin.
I have tested a bit on how to do it with the build-helper-maven-plugin.
And i think this ticket might be a good place to share those results in.
Consider the following project setup
* api (jar) - GWT library
* gui (war) - GWT gui with endpoint that uses the library.
If you add a source path with the build-helper-maven-plugin directly in the
gui's pom you will possibly have problems because of 2 issues.
# At least my IDE (Netbeans) cannot have two open projects that share the same
source path. The api module will loose its src/java in the user interface, and
the gui will get one ekstra "generated sources" path, this is quite annoying.
# Because there is no guarantee on how the developer will checkout the code,
the gui's pom cannot guess where the api's src/java is on the disk.
The solution to those two issues is to create a local profile in your
settings.xml which is only activated when you run the gwt:run target.
You can then test in development mode and edit files in multible projects by
running:
{{mvn gwt:run -Prun-mode}}
if you have this profile in your local settings.xml
{code:xml}
<profile>
<id>run-mode</id>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>1.4</version>
<executions>
<execution>
<id>add-source</id>
<phase>generate-sources</phase>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>../api/src/main/java</source>
</sources>
</configuration>
</execution>
<execution>
<id>add-resource</id>
<phase>generate-sources</phase>
<goals>
<goal>add-resource</goal>
</goals>
<configuration>
<resources>
<resource>
<directory>../api/src/main/resources</directory>
<targetPath>resources</targetPath>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
{code}
In Netbeans it is possible to save such a run target in the user interface.
> Allow to add custom classpath
> ------------------------------
>
> Key: MGWT-120
> URL: http://jira.codehaus.org/browse/MGWT-120
> Project: Maven 2.x GWT Plugin
> Issue Type: New Feature
> Affects Versions: 1.1
> Environment: When using the plugin in a multi-projects application
> (ie with the reactor and multi gwt artifacts), we need to use the java source
> folder of the other artifacts into the hosted browser.
> Reporter: pkernevez
> Assignee: nicolas de loof
> Attachments: additionnalDirs.patch
>
>
> We have a multiproject gwt application.
> Like :
> {code}
> Root
> |
> |--> project A (GUI framework)
> |--> project B ( customer gwt module)
> |--> project C ( contract gwt module)
> |--> project Final (packaging of the webapp)
> {code}
> I would like to be able to launch the hosted browser on my Final module and
> work on the source of the project A, B and C.
> We can simply do that with GWT by add the project source folder to the
> classpath, and we only have to click on the Refresh button of the hosted
> browser to see the last modifications.
> I take a look on the plugin code, I saw a mechanism for doing that in the
> class : ClasspathBuilder.addSourcesWithActiveProjects() but that don't seems
> to my request.
> This is due to the fact that it's done for compiling only (not for the hosted
> browser) and it need to be in the reactor mode.
> The full build (reactor) is a good way for a full compilation but it doesn't
> have sens for the hosted browser.
> ( I tried to have information about this feature, but I didn't have any
> response
> http://www.nabble.com/gwt-maven-plugin-Using-multiproject-with-gwt-to25508253.html#a25508253
> )
--
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