Skip to content

Latest commit

 

History

History

run-tests-with-build-kogito-runtimes-parent

Kogito Runtimes Parent

Description

This module serves as an invocation point for tests of kogito-runtimes repository.

Usage

Project pom defines profiles that can invoke tests for a particular delivery option. Download of artifacts is provided by means described in Module structure.

Project-sources testing

mvn clean verify \
-Dtest.type=project-sources \
-Dproject.sources.artifact=kogito-runtimes \
-Ddownload.sources.version=<VERSION>

Sources-zip testing

mvn clean verify \
-Dtest.type=sources-zip \
-Ddownload.sources.url=http://link.to/source.zip

Local-repo testing

mvn clean verify \
-Dtest.type=local-repo \
-Dsources.directory.local.repo=/path/to/cloned/repo

Passing system properties

Static

Any system properties that needs to be passed to particular invoked project, and are known in advance, they can be configured to invoker-maven-plugin directly in its configuration. An example is using the -Dproductized property by default in the configuration:

<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-invoker-plugin</artifactId>
  <configuration>
    <properties>
      <productized>true</productized>
    </properties>
  </configuration>
</plugin>

Dynamic and optional system properties

If more variability is needed in terms of setting system properties for invoked build - there's an optional step that can be added to the *-test maven module build section. The following step will make sure that system properties are passed to invoked project using invoker-maven-plugin's configuration option <testPropertiesFile>.

<plugin>
  <groupId>org.codehaus.gmavenplus</groupId>
  <artifactId>gmavenplus-plugin</artifactId>
  <executions>
    <execution>
      <id>write-test-properties-file-for-invoker</id>
      <phase>generate-resources</phase>
      <goals>
        <goal>execute</goal>
      </goals>
    </execution>
  </executions>
</plugin>

By default, all properties passed to run-tests-with-build are passed - this can be changed by the configuration property invoker.test.properties.list, which is a comma-separated list of system properties that are passed (but only if they are actally passed to overall run-tests-with-build maven build). This will help you to filter out run-tests-with-build internally used properties (e.g. -Dtest.type).

<properties>
  <invoker.test.properties.list>quarkus.platform.group-id</invoker.test.properties.list>
</properties>

Module structure

Each of sub-modules contains configuration for Maven Invoker related settings.

Download configuration of particular deliverable is provided by modules