Maven modules

<groupId>org.openhubframework</groupId>
<artifactId>openhub</artifactId>


OpenHub framework consists of the following Maven modules:

See Reference implementation how to use dependencies in a specific project.


			<dependency>
                <groupId>org.openhubframework</groupId>
                <artifactId>openhub-common</artifactId>
            </dependency>
            <dependency>
                <groupId>org.openhubframework</groupId>
                <artifactId>openhub-core-api</artifactId>
            </dependency>
            <dependency>
                <groupId>org.openhubframework</groupId>
                <artifactId>openhub-core-spi</artifactId>
            </dependency>
            <dependency>
                <groupId>org.openhubframework</groupId>
                <artifactId>openhub-core</artifactId>
            </dependency>
            <dependency>
                <groupId>org.openhubframework</groupId>
                <artifactId>openhub-components</artifactId>
            </dependency>
            <dependency>
                <groupId>org.openhubframework</groupId>
                <artifactId>openhub-test</artifactId>
            </dependency>
            <dependency>
                <groupId>org.openhubframework</groupId>
                <artifactId>openhub-examples</artifactId>
            </dependency>
            <dependency>
                <groupId>org.openhubframework</groupId>
                <artifactId>openhub-web</artifactId>
            </dependency>
            <dependency>
                <groupId>org.openhubframework</groupId>
                <artifactId>openhub-admin-console</artifactId>
            </dependency>
            <dependency>
                <groupId>org.openhubframework</groupId>
                <artifactId>openhub-war</artifactId>
            </dependency>


OpenHub framework depends on several Camel components and if you want to use another Camel component with same Camel's version then you can do it:

  1. import dependencies from OpenHub framework

    <dependency>
     <groupId>org.openhubframework</groupId>
     <artifactId>openhub</artifactId>
     <version>2.0.0-SNAPSHOT</version>
     <scope>import</scope>
     <type>pom</type>
    </dependency>


  2. use specific component which you want

    <dependency>
     <groupId>org.apache.camel</groupId>
     <artifactId>camel-crypto</artifactId>
    </dependency>


Spring contexts

OpenHub framework uses and is configured by Spring framework.

There are the following Spring contexts hierarchy:

Spring profiles

OpenHub framework uses Spring profiles to simplify configuration for different target environments (profiles ar defined in org.openhubframework.openhub.common.Profiles):

Next Spring profiles are used for switching between databases:

There is profile cluster for cluster environment. 

Apart from these profiles it's good practice to define Spring profile for each module and use it for configuration all beans in this module.

Defaults Spring profiles are set in application.properties, it's possible to override them by Environment parameter spring.profiles.active.

Maven profiles

There are also Maven profiles which correspond to Spring profiles. Maven profiles solve dependency to third-party libraries for specific target environment and settings of folders, logs etc. See pom.xml in module web-admin.

 

OpenHub framework compilation with Maven for local use (=dev) with PostgreSQL database:

mvn clean && mvn -DskipTests -Pesb.psSql package

Application server starts with the following system parameter spring.profiles.active:

postgreSql,dev



mvn clean && mvn -DskipTests -Pesb.psSql package -P !'full-build',!'full-clean' -Dmaven.javadoc.skip=true

where full-build and full-clean maven profiles are deactivated