Here the execution of previous example:
Code:
roo> script --file clinic.roo
roo> ...
~.web roo> configuration create --name dev
Updated SRC_MAIN_RESOURCES/dynamic-configuration.xml
Configuration created with currently available properties
Updated SRC_MAIN_RESOURCES/dynamic-configuration.xml
First created configuration set as default
(use 'configuration property add' to make a property available for all configurations
~.web roo> configuration property add --name database.url
Updated SRC_MAIN_RESOURCES/dynamic-configuration.xml
Updated SRC_MAIN_RESOURCES/dynamic-configuration.xml
Property available for all configurations
(use 'configuration property value' to set property new values)
~.web roo> configuration property add --name hibernate.hbm2ddl.auto
Updated SRC_MAIN_RESOURCES/dynamic-configuration.xml
Updated SRC_MAIN_RESOURCES/dynamic-configuration.xml
Property available for all configurations
(use 'configuration property value' to set property new values)
~.web roo> configuration property add --name log4j.rootLogger
Updated SRC_MAIN_RESOURCES/dynamic-configuration.xml
Updated SRC_MAIN_RESOURCES/dynamic-configuration.xml
Property available for all configurations
(use 'configuration property value' to set property new values)
~.web roo> configuration property value --configuration dev --property database.url --value jdbc:hsqldb:mem:mydevdb
Updated SRC_MAIN_RESOURCES/dynamic-configuration.xml
Property value seted
(use 'configuration list' to show configurations and their properties)
~.web roo> configuration list
(Active) dev
----------------------------------------
* Database Connection Properties
- database.url = jdbc:hsqldb:mem:mydevdb
* Persistence Property Attributes XML
- hibernate.hbm2ddl.auto = create
* Logging Service Properties
- log4j.rootLogger = INFO, stdout
(use 'configuration export' to write configurations into the project)
~.web roo> configuration export
Updated ROOT/pom.xml
Updated SRC_MAIN_RESOURCES/META-INF/spring/database.properties
Updated SRC_MAIN_RESOURCES/META-INF/persistence.xml
Updated SRC_MAIN_RESOURCES/log4j.properties
Configurations exported into project
(use '-P name' on maven commands to use a configuration)
(use 'configuration create' to define a new configuration)
~.web roo> configuration create --name pro
Updated SRC_MAIN_RESOURCES/dynamic-configuration.xml
Configuration created with currently available properties
* Database Connection Properties
- database.url = jdbc:hsqldb:mem:petclinic
* Persistence Property Attributes XML
- hibernate.hbm2ddl.auto = create
* Logging Service Properties
- log4j.rootLogger = INFO, stdout
(use 'configuration property add' to make a property available for all configurations
~.web roo> configuration property value --configuration pro --property database.url --value jdbc:hsqldb:file:myprodb
Updated SRC_MAIN_RESOURCES/dynamic-configuration.xml
Property value seted
(use 'configuration list' to show configurations and their properties)
~.web roo> configuration property value --configuration pro --property hibernate.hbm2ddl.auto --value update
Updated SRC_MAIN_RESOURCES/dynamic-configuration.xml
Property value seted
(use 'configuration list' to show configurations and their properties)
~.web roo> configuration property value --configuration pro --property log4j.rootLogger --value "ERROR, stdout"
Updated SRC_MAIN_RESOURCES/dynamic-configuration.xml
Property value seted
(use 'configuration list' to show configurations and their properties)
~.web roo> configuration export
Updated ROOT/pom.xml
Updated ROOT/pom.xml
Updated SRC_MAIN_RESOURCES/META-INF/spring/database.properties
Updated SRC_MAIN_RESOURCES/META-INF/persistence.xml
Updated SRC_MAIN_RESOURCES/log4j.properties
Updated SRC_MAIN_RESOURCES/META-INF/spring/database.properties
Updated SRC_MAIN_RESOURCES/META-INF/persistence.xml
Updated SRC_MAIN_RESOURCES/log4j.properties
Configurations exported into project
(use '-P name' on maven commands to use a configuration)
(use 'configuration create' to define a new configuration)