Page tree
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Overview

 

YC uses Maven as its primary build tool, therefore all builds are done solely by Maven.

Depending on the target environment the settings of course will be different and in some cases not only settings but even dependencies. In order to tackle this problem YC heavily utilises Maven profiles functionality in conjunction with filtering.

As described in installation guide some profiles are built in to provide a framework for configuring environment specific builds. Some of these profiles are used to manipulate Maven build variables, some are used for provision of extra dependencies such as DB drivers and optional modules.

For example by specifying derby profile we accomplish two things: 

  • add the derby driver dependency
  • modify env.db variable which is used to include the appropriate filter file config-db-${env.db}.properties resulting in config-db-derby.properties being used to provide DB settings

Depending on the environment of course we could have different configuration, such as different connection properties for DB thus all environment specific settings are grouped into directories under YC_HOME/env/maven

Each directory represents a complete set of configuration files necessary for building artefacts for that environment. The selection of the environment directory is also controlled by a variable env which is set via profile. So if we use -Pdev we use configuration files from YC_HOME/env/maven/dev and if we use -PdevIntellijIDEA we use configuration files from YC_HOME/env/maven/dev-idea

Note that some profiles set multiple variable that are optimal for creating build for that specific environment. For example dev and devIntellijIDEA apart from setting basic environment variables also configure npm goals, modules and target directories. This is because jam-jsclient is built in two modes: development (where deployment consists of compiled source files) and prod (bundled and minified version). 

Developers are advised to examine the example configuration files to gain full understanding what configuration file is used for which functionality and configure it correctly for ciuat and prod environments, which are specifically left empty.

  • No labels