Announcement Announcement Module
Collapse
No announcement yet.
Distinguish dev and production databases Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

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

    Comment


    • #3
      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

      Comment


      • #4
        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.

        Comment


        • #5
          It's just another (convenience) option.

          Comment

          Working...
          X