The Ant-based buildomatic scripts contain support files for setting up and configuring a number of databases and application servers. This section describes the locations and content of some of these files and how to change the content.
Regenerating Buildomatic Settings
Whenever you change your default_master.properties file and re-run the js-install scripts (or any other buildomatic target), your generated configuration settings are automatically updated. The generated settings are in this location:
<js-install>/buildomatic/build_conf/default
The settings are automatically regenerated based on the new timestamp found on the properties file.
If you want to explicitly cause your generated configuration to be regenerated, you can run the following buildomatic targets:
cd <js-install>/buildomatic
js-ant clean-config
js-ant gen-config
The first target clears the configuration template files in buildomatic/build_conf/default directory. The second re-builds the configuration settings.
These commands exist as a convenience. Whenever default_master.properties is edited, the resulting configuration templates are regenerated automatically based on the updated time-stamp associated with the edited file. |
Locating Buildomatic-Generated Property Files
After you set your database and application server property values, you initiate buildomatic which automatically generates the database and application server configuration files needed to prepare for a JasperReports Server installation.
The generated property files are in this location:
<js-install>/buildomatic/build_conf/default
Some of the key configuration files are:
js.jdbc.properties
js.quartz.properties
js-glassfish-ds.xml
js-jboss-ds.xml
maven_settings.xml - (used for source code build)
More generated property files are:
<js-install>/buildomatic/build_conf/default/webapp
Included in the /webapp directory are configuration files, such as:
META-INF/context.xml
WEB-INF/hibernate.properties
WEB-INF/js.quartz.properties
These autogenerated files are removed if you run the buildomatic target: clean-config. You can then regenerate the files by running the target: gen-config. (Also, after running clean-config, any subsequent target will regenerate the configuration files.)
Buildomatic Location for JasperReports Server WAR File
Buildomatic takes the JasperReports Server WAR file from the root of the <js-install> directory:
<js-install>/jasperserver.war
When you run the deploy-webapp-ce target, buildomatic takes the war archive and unpacks it into your application server. Next, the database configuration files needed by the application server are copied to the appropriate locations. For instance, in the case of Tomcat:
• | <js-install>/jasperserver.war |
Unpacked and copied to <tomcat>/webapps/jasperserver/*
• | <js-install>/buildomatic/build_conf/default/webapp/META-INF/context.xml |
Copied to <tomcat>/webapps/jasperserver/META-INF/context.xml
• | <js-install>/buildomatic/build_conf/default/webapp/WEB-INF/hibernate.properties |
Copied to <tomcat>/webapps/jasperserver/WEB-INF/hibernate.properties
• | <js-install>/buildomatic/build_conf/default/webapp/WEB-INF/js.quartz.properties |
Copied to <tomcat>/webapps/jasperserver/WEB-INF/js.quartz.properties
• | <js-install>/buildomatic/build_conf/db/postgres/jdbc/postgresql-9.2-1002.jdbc4.jar |
Copied to <tomcat>/lib
Buildomatic Location for SQL Scripts
Buildomatic comes with SQL scripts and other utilities that support a number of databases. These files are in:
<js-install>/buildomatic/install_resources/sql/
For example, some key files are (same pattern for additional databases):
<js-install>/buildomatic/install_resources/sql/postgresql/js-create.ddl
<js-install>/buildomatic/install_resources/sql/postgresql/quartz.ddl
<js-install>/buildomatic/install_resources/sql/postgresql/upgrade-postgresql-5.6.0-6.0.0-ce.sql
<js-install>/buildomatic/install_resources/sql/postgresql/js-drop.ddl
<js-install>/buildomatic/install_resources/sql/postgresql/drop-quartz.ddl
You can run these scripts manually by copying them to a location where your database client software is located. |
Buildomatic Location for Database Creation Scripts
For most databases the buildomatic scripts are able to create the metadata repository database used by JasperReports Server. This is the database where the data defining users, roles, data sources, reports, OLAP views, domains, and other data are stored. This database is normally named jasperserver.
Buildomatic attempts to create the jasperserver database via JDBC when the create-js-db target is executed.
The scripts and property files used to create the jasperserver database are here:
<js-install>/buildomatic/conf_source/db/
postgresql/scripts.properties
mysql/scripts.properties
Buildomatic Location for Sample Data Catalog ZIP Files
Buildomatic includes export files which hold the JasperReports Server sample data (that have examples of new features). This sample data is loaded when you run the buildomatic target import-sample-data-ce, for instance. These export files along with other important export files are located here:
<js-install>/buildomatic/install_resources/export/
Here are some key files:
js-catalog-postgresql-minimal-ce.zip
js-catalog-postgresql-ce.zip
js-catalog-mysql-minimal-ce.zip
js-catalog-mysql-ce.zip
Hibernate Properties Settings
Your hibernate.properties settings are in the following directory after buildomatic has been run to automatically generate your configuration files:
<js-install>/buildomatic/build_conf/default/webapp/WEB-INF/hibernate.properties
Within the jasperserver WAR file the hibernate.properties file is found at the following location:
<appserver-path>/jasperserver/WEB-INF/hibernate.properties
The buildomatic scripts automatically create this configuration file. When you run the buildomatic target deploy-webapp-ce this file is copied to JasperReports Server in your application server.
Hibernate property values are:
PostgreSQL: | |
MySQL 5.1: | |
MySQL 5.5: |
Database Connection Configuration Files
Tomcat
After setting up the buildomatic configuration for your database, the Tomcat context.xml will be automatically created with the appropriate settings for JasperReports Server.
When the buildomatic target deploy-webapp-ce is run, the context.xml will be automatically copied into the jasperserver WAR set of files.
You can view the automatically generated context.xml at the following location:
<js-install>/buildomatic/build_conf/default/webapp/META-INF/context.xml
The final location of the context.xml is:
<tomcat>/webapps/jasperserver/META-INF/context.xml
In older versions of Tomcat, Tomcat will create a copy of the context.xml file with a changed name that will be read instead of the one found in the jasperserver war file. This is often a source of confusion for Tomcat users who attempt change their database settings. If you change your settings, delete the file in this location:
<tomcat>/conf/Catalina/localhost/jasperserver.xml
JBoss
After setting up the buildomatic configuration for your database, the JBoss data source definition file will be automatically created with the appropriate settings for JasperReports Server.
When the buildomatic target deploy-webapp-ce is run, the js-jboss-ds.xml will be automatically copied into the JBoss instance.
You can view the automatically generated js-jboss-ds.xml at the following location:
<js-install>/buildomatic/build_conf/default/js-jboss-ds.xml (JBoss 5.1)
<js-install>/buildomatic/build_conf/default/js-jboss7-ds.xml (JBoss 7.1)
The final location of the js-jboss-ds.xml is:
<jboss>/server/default/deploy/js-jboss-ds.xml (JBoss 5.1)
<jboss>/standalone/deployments/jasperserver.war/WEB-INF/js-jboss7-ds.xml
When JasperReports Server is running under JBoss, there are a couple of INFO log messages and an XML/A connection error that might occur depending on the version of JBoss you are running with.
For more information, refer to troubleshooting section JBoss Modifications.
Glassfish
After setting up the buildomatic configuration for your database, the Glassfish data source definition file js-glassfish-ds.xml will be automatically created with the appropriate settings. When the buildomatic target deploy-webapp-ce is run, the file is automatically deployed to the Glassfish instance.
You can view the automatically generated js-glassfish-ds.xml at the following location:
<js-install>/buildomatic/build_conf/default/js-glassfish-ds.xml
To deploy the data source definition manually, you can run a command similar to the following:
asadmin add-resources "<js-install>/buildomatic/build_conf/default/js-glassfish-ds.xml"[/code]
Recommended Comments
There are no comments to display.