The configuration of the FC TIBCO Factory is divided in two parts as any other Maven plugin:

  • environment-dependent settings, which will basically be stored in the Maven ‘settings.xml’ file. These settings are specific for each environment where the FC TIBCO Factory is installed.

  • project-dependent settings, which will be stored in the POM of the projects. These settings define how to build the projects.

For these both kinds, settings can be:

  • profile-specific, meaning that only settings in active profiles will be used during builds.

Environment-dependent settings

All plugins of the FC TIBCO Factory can share a common Maven ‘settings.xml’ file.

Project-dependent settings (root POM)

For standard Maven projects, there is a super POM which defines default properties.

In FC TIBCO Factory there is a need for a custom super POM with custom properties called the root POM. The latter can either be created by inheritance from the FC TIBCO Factory super POM or defined in extenso with all required properties by using a Maven archetype.

FC TIBCO Factory plugins can’t be used normally if no root POM is defined.

  • By inheritance

    • The default properties are defined in the FC TIBCO Factory super POM
    • This root POM doesn’t have to be created (adding inheritance is enough)
    • The projects must inherit directly or indirectly from this root POM
    • All projects inherit from default behaviour of the FC TIBCO Factory super POM (good for most cases)
  • By archetype

    • The default properties are defined in an independent root POM
    • This root POM is created with a Maven archetype
    • The projects must inherit directly or indirectly from this root POM
    • All projects inherit only from the behaviour defined in this independent root POM (full customization)
 

Inheritance can be done by adding this snippet to any POM (making it the root POM):

<parent>
	<groupId>fr.fastconnect.factory.tibco</groupId>
	<artifactId>fc-tibco-factory</artifactId>
	<version>2.4.1</version>
</parent>

NB: the inheritance can be used with any Maven packaging (including pom, bw-ear, projlib…) so it can be used to quickly set up a stand-alone project while the archetype method is more suited to bigger projects where custom additional behaviours are to be defined.

 

The independent root POM is created by a Maven archetype with the following command:

mvn archetype:generate -DarchetypeGroupId=fr.fastconnect.factory.tibco \
                       -DarchetypeArtifactId=archetype-default-pom \
                       -DarchetypeVersion=2.4.1 \
                       -DgroupId=com.company.project \
                       -DartifactId=project-root \
                       -Dversion=1.0.0-SNAPSHOT \
                       -DprojectName=ProjectName \
                       -DbwMavenPluginVersion=2.4.1 \
                       -DcodeReviewPluginVersion=2.0.0 \
                       -DfcUnitPluginVersion=2.0.0 \
                       [-DinteractiveMode=false] 

Back to top

Version: 2.4.1. Last Published: 2016-01-22.