Maven Profiles and Properties

Maven Profiles and Properties

This page highlights the available profiles and system properties used to affect the Maven build. To invoke a maven target with a selected profile do the following:

Example:
mvn -P<profile>

It is possible as well to invoke multiple profiles, to do so separate each profile name by a comma.

Example:
mvn -P<profile1>,<profile2>,<profile3>, etc...

Profiles

dist Profile

The dist profile is used for binary distribution builds. It is typically mutually exclusive to the dev profile. It:

  • precompiles JSP pages.

dev Profile

The dev profile is used for development purposes, it builds the RHQ server in the specified dev-container. It also builds the agent. By default this profile builds the server to the /rhq/dev-container or whatever rhq.containerDir property specified in the settings.xml . More about the dev profile is available here.

enterprise Profile

The enterprise profile is used to build a full version of RHQ including the server container. More about the enterprise profile is available here.

agent Profile

The agent profile builds only the RHQ agent.

cli Profile

The cli profile builds the Command Line Interface (CLI). This requires that you build on JDK6 or higher - building on JDK5 with this profile enabled will produce build failures. It is disabled by default but it will automatically be activated when you build with JDK 6 or higher.

ojdbc-driver Profile

This profile indicates that the build should package the oracle jdbc driver as necessary in the server distribution and in the oracle plugin. If you have a repository configured that offerws the ojdbc driver, you are running against an Oracle db or want to manage an Oracle Server resource, then build with this flag. Note that Oracle licensing limits distribution of this driver.

System Properties

-Dpackage-connectors Property

If specified generate the connector-rtfilter.zip for download via the Server's download servlet (e.g. http://RHQServer:7080/downloads/connector-rtfilter.zip).

-Dexclude-webdav Property

When true the rhq-webdav.war will not be packaged in rhq.ear. By default the rhq-webdav.war will be included and deployed.

-Dplugin-api-javadoc Property

To generate the Plugin API Javadoc specify this property and execute the Maven "site" phase.

-Djava5.home=<path> Property

When building with Java6, setting this property will ensure only Java5 API's have been used in the code base (with the known exception of the CLI module which ignores the property).

  • set -Djava5.home to a Java 5 JRE directory (i.e. C:/opt/jdk-1.5.0_15/jre)
  • set JAVA_HOME to point at, for example, jdk6

Note that the build typically runs about 20% faster using Java6. You do not have to activate this property to build with later versions of Java, only if you want to validate the APIs.

-Dmaven.test.skip Property

If -Dmaven.test.skip is set to anything other than "true" we build & run the TestNG unit tests included in the project.

-Dtest.debug Property

For debugging unit tests. For more, see here.

-Dtest=<TestClass> Property

For debugging unit tests. For more, see here.

-Ddb=<DB> Property

This tells the dbutils module which DB it should use - the test db or the dev db. If the dev profile is activated the default value for this property is "dev", otherwise it is "test". The "dev" DB is the DB used by the dev-container, and the "test" DB is the DB used by the unit tests in the domain and server-jar modules.

Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.