Results 1 to 5 of 5

Thread: Distinguish dev and production databases

  1. #1
    Join Date
    Oct 2009
    Location
    Munich, Germany
    Posts
    103

    Default Distinguish dev and production databases

    What is the easiest way to distinguish between dev and production databases and to not accidently use the production database for development and develpment database in the production .war?

    We former used an environment variable in the tomcat context XML configuration file for this purpose, but this is not suitable anymore.

    Thanks
    Fireball

  2. #2
    Join Date
    Jan 2010
    Location
    Mislata - Valencia - Spain
    Posts
    162

    Default Use maven profiles

    Roo creates Maven based projects. In Maven the established method to distinguish between environments is to use profiles. Profiles can define different values for all maven configuration: properties, dependencies, plugins, etc. Each profile have a unique identificator that can be invoke on every maven executed goal with de -P modificator:

    mvn test -P production

    One enhancement on Roo console could be add commands to manage profiles and add support on perform package to select some profile.
    Mario Martínez Sánchez
    Project Manager & Software Architect
    --------------------------
    Disid Technologies S.L.
    http://www.disid.com
    --------------------------
    gvNIX
    http://gvnix.googlecode.com
    http://www.gvnix.org

  3. #3
    Join Date
    Oct 2009
    Location
    Munich, Germany
    Posts
    103

    Default

    Thank you. Another hint I found in the maven book is to use defferend settings at all.

    http://www.sonatype.com/books/maven-...ps-tricks.html

  4. #4
    Join Date
    Jan 2010
    Location
    Mislata - Valencia - Spain
    Posts
    162

    Default Use activation property instead of -P

    Yeah ! , this maven book recommends activate profiles by a activation property instead of use the -P command-line argument.
    Mario Martínez Sánchez
    Project Manager & Software Architect
    --------------------------
    Disid Technologies S.L.
    http://www.disid.com
    --------------------------
    gvNIX
    http://gvnix.googlecode.com
    http://www.gvnix.org

  5. #5
    Join Date
    Oct 2009
    Location
    Munich, Germany
    Posts
    103

    Default

    It's just another (convenience) option.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •