[ 
http://jira.codehaus.org/browse/MGWT-211?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Olivier Lamy closed MGWT-211.
-----------------------------

    Resolution: Won't Fix
      Assignee: Olivier Lamy

you can certainly use a profile in your pom to defined and use -Pprod (by 
default use your dev env).

> Allow cmd line definitions to override systemProperties
> -------------------------------------------------------
>
>                 Key: MGWT-211
>                 URL: http://jira.codehaus.org/browse/MGWT-211
>             Project: Maven 2.x GWT Plugin
>          Issue Type: New Feature
>    Affects Versions: 1.2
>         Environment: All
>            Reporter: Søren Boisen
>            Assignee: Olivier Lamy
>         Attachments: gwt-maven-plugin-RunMojo.patch
>
>
> The gwt:run goal supports a systemProperties property, that allows a user to 
> define various system properties for the spawned JVM. But simply defining 
> such properties in the POM file is very static.
> It would be extremely useful to be able to override such definitions from the 
> command line with the usual -Dprop=val arguments.
> Use case:
> Whenever I can, I make my projects adapt to the environment they are deployed 
> to. I look for a system property "env". If this is set to the value "prod", 
> the project will connect to our production database server. Otherwise it will 
> connect to our development server. Our production application server has this 
> property set to "prod", so any projects deployed using these conventions will 
> automatically connect to the production database server. In testing, the 
> property will usually be undefined, causing the application to connect to the 
> development database.
> This setup alleviates the need for using Maven profiles and the inherent 
> dangers therein (accidentally deploying a project to the production app 
> server that connects to the development database).
> However, often during tests, I will want to connect to the production 
> database. A common case is when testing a bugfix has really solved a reported 
> problem. In these cases I find it very useful to simply be able to do "mvn 
> jetty:run-war -Denv=prod". Alas, this won't work with the Maven GWT plugins 
> gwt:run target, since it does not look at it's own runtime environment, when 
> setting up the environment for the execution.
> It is easy to solve this issue. I have attached a small patch, that does the 
> trick and do not break any of the tests.

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