[ 
http://jira.codehaus.org/browse/MGWT-111?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=190096#action_190096
 ] 

nicolas de loof commented on MGWT-111:
--------------------------------------

Can you please provide a (simplified) demonstrating project to expose your use 
case ?

> gwt:run - Multi-module projects with custom start page not well supported
> -------------------------------------------------------------------------
>
>                 Key: MGWT-111
>                 URL: http://jira.codehaus.org/browse/MGWT-111
>             Project: Maven 2.x GWT Plugin
>          Issue Type: Bug
>    Affects Versions: 1.0, 1.1, 2.0, 1.2
>            Reporter: Yons Jongkind
>         Attachments: patch.txt
>
>
> We have a project with 3 modules. Then we have a file called /login.html that 
> imports stuff from a GWT module.
> However, when we do GWT run, it wants to parse the module name from the file 
> to load. Our appropriate behaviour is that we list the modules and point to 
> the file we want it to load.
> Patch (may not be the best solution, but seems to work and be backward 
> compatible)
> +++ src/main/java/org/codehaus/mojo/gwt/shell/RunMojo.java      (working copy)
> @@ -202,6 +202,12 @@
>          {
>              return runTarget;
>          }
> +
> +        if (getModules().length > 1) {
> +               return runTarget;
> +        }
> +
> +
>          int dash = runTarget.indexOf( '/' );
>          String module = getRunModule();
>          if ( dash > 0 )
> @@ -209,8 +215,13 @@
>              String prefix = runTarget.substring( 0, dash );
>              if ( prefix.equals( module ) )
>              {
> -                // runTarget includes the GWT module full path. Lets apply 
> the rename-to directive
> -                return readModule( module ).getPath() + '/' + 
> runTarget.substring( dash + 1 );
> +               try {
> +                       // runTarget includes the GWT module full path. Lets 
> apply the rename-to directive
> +                       return readModule( module ).getPath() + '/' + 
> runTarget.substring( dash + 1 );
> +               } catch (org.apache.maven.plugin.MojoExecutionException x) {
> +                       // Might not be a standard module path. Maybe they 
> have their own HTML start point(s).
> +                       return runTarget;
> +               }
>              }
>          }
>          return runTarget;
> @@ -271,8 +282,15 @@
>              default:
>                  setupExplodedWar();
>                  cmd.arg( "-startupUrl" )
> -                    .arg( quote( getStartupUrl() ) )
> -                    .arg( getRunModule() );
> +                    .arg( quote( getStartupUrl() ) );
> +
> +                if (getModules().length > 0) {
> +                       for (String module:getModules()) {
> +                           cmd.arg( module );
> +                       }
> +                } else {
> +                        cmd.arg( getRunModule() );
> +                }
>                  break;
>          }

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


Reply via email to