User defined configuration parameters with OpenPetra.build.config
Jump to navigation
Jump to search
You can create your own configuration file, which will not be committed to bazaar, because the contents will be different for each developer.
Just create a file called OpenPetra.build.config in your OpenPetra root directory, besides OpenPetra.build.
You can overwrite every property, that you find in the NAnt build files, in OpenPetra.build or any of the xml files in inc\nant\. The properties usually have the attribute overwrite="false" which means your values from OpenPetra.build.config will overrule.
An example:
<?xml version="1.0"?> <project name="OpenPetra-userconfig"> <property name="DBMS.Type" value="postgresql"/> <property name="PostgreSQL.exe" value="C:\Program Files/PostgreSQL/9.0/bin/psql.exe"/> <property name="pgdump.exe" value="C:\Program Files/PostgreSQL/9.0/bin/pg_dump.exe" overwrite="false"/> <property name="DBMS.DBName" value="myopenpetradb"/> <property name="DBMS.Password" value="secret" /> </project>
Explanation of this example:
- this developer wants to work with PostgreSQL instead of the default SQLite. Therefore you must set the DBMS.Type property.
- Usually, the psql.exe and pg_dump.exe are located by default in the Program Files directory, but in the case of 64bit Windows, the default Program Files directory for nant is "Program Files (x86)", where Postgresql is not installed in my case.
- You have the option to define a different database, and also a different database password