Skip to content

ChromiaProject/rell-maven-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

332 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rell Maven Plugin

The rell maven plugin lets you compile rell code, run tests, generate docs or client stubs, from a local or remote repository.

Setup

<!-- pom.xml -->
<pluginRepositories>
    <pluginRepository>
        <id>rell-maven-plugin</id>
        <url>https://gitlab.com/api/v4/projects/37675750/packages/maven</url>
    </pluginRepository>
</pluginRepositories>
<build>
    <plugins>
        <plugin>
            <groupId>net.postchain.rell</groupId>
            <artifactId>rell-maven-plugin</artifactId>
            <version>${rell.version}</version>
        </plugin>
    </plugins>
</build>

Goals

Goal Phase Description
rell-compile compile Compile Rell source into blockchain configs
rell-test test Run Rell unit tests
rell-integration-test integration-test Run Rell integration tests
rell-docs site Generate documentation site
rell-generate-client generate-sources Generate Kotlin client stubs
rell-install generate-sources Install Rell libraries
rell-remote-repo initialize Clone a remote Rell repository

Configuration

rell-remote-repo

Clones a remote repository before other goals run.

<execution>
    <goals><goal>rell-remote-repo</goal></goals>
    <configuration>
        <repositoryUrl>https://gitlab.com/chromaway/core/directory-chain</repositoryUrl>
        <tagOrBranch>1.51.6</tagOrBranch>
    </configuration>
</execution>
Parameter Type Default Description
repositoryUrl String required Git repository URL to clone
tagOrBranch String null Tag or branch to checkout
configFile String ${basedir}/rell/chromia.yml Path to chromia.yml
target File ${project.build.directory}/rell-repo Clone target directory

rell-install

Installs Rell libraries declared in chromia.yml.

<execution>
    <goals><goal>rell-install</goal></goals>
    <configuration>
        <libs>
            <lib>com.chromia.ft4</lib>
        </libs>
        <forceInstall>true</forceInstall>
    </configuration>
</execution>
Parameter Type Default Description
libs List null (all from config) Libraries to install
forceInstall Boolean false Force reinstallation
source String ${basedir}/rell/src Source directory
target String ${project.build.directory}/rell Target directory for installed libraries
configFile String ${basedir}/rell/chromia.yml Path to chromia.yml

rell-compile

Compiles Rell source code into blockchain configuration files.

<execution>
    <goals><goal>rell-compile</goal></goals>
    <configuration>
        <blockchains>
            <blockchain>my-chain</blockchain>
        </blockchains>
        <hideLibWarnings>true</hideLibWarnings>
    </configuration>
</execution>
Parameter Type Default Description
blockchains List empty (all) Blockchains to compile
configFile String rell/chromia.yml Path to chromia.yml
source String null Source directory (overrides config)
target String null Output directory (overrides config)
hideLibWarnings Boolean false Suppress library warnings

rell-test

Runs Rell unit tests.

<execution>
    <goals><goal>rell-test</goal></goals>
    <configuration>
        <testModule>my_test_module</testModule>
        <source>${basedir}/rell/src</source>
        <dbUrl>jdbc:postgresql://localhost/test</dbUrl>
        <stopOnError>true</stopOnError>
    </configuration>
</execution>
Parameter Type Default Description
testModule String required Test module(s) to run
source File ${basedir}/rell/src Source directory
dbUrl String null Database URL for tests
skipTests Boolean false Compile but skip execution
stopOnError Boolean false Stop on first failure
tests String null Comma-separated test patterns
testReports File ${project.build.directory}/rell-reports Report output directory
hideLibWarnings Boolean false Suppress library warnings
sqlReport Boolean false Collect SQL statistics and generate an HTML report alongside the XML report

rell-integration-test

Runs Rell integration tests using chromia.yml configuration.

<execution>
    <goals><goal>rell-integration-test</goal></goals>
    <configuration>
        <stopOnError>true</stopOnError>
    </configuration>
</execution>
Parameter Type Default Description
configFile File ${basedir}/rell/chromia.yml Path to chromia.yml
skipTests Boolean false Compile but skip execution
stopOnError Boolean false Stop on first failure
tests String null Comma-separated test patterns
testReports File ${project.build.directory}/rell-reports Report output directory
hideLibWarnings Boolean false Suppress library warnings
sqlReport Boolean false Collect SQL statistics and generate an HTML report alongside the XML report

rell-docs

Generates a documentation site.

<execution>
    <goals><goal>rell-docs</goal></goals>
    <configuration>
        <hideLibWarnings>true</hideLibWarnings>
    </configuration>
</execution>
Parameter Type Default Description
configFile File ${basedir}/rell/chromia.yml Path to chromia.yml
target File ${project.build.directory}/rell-docs Output directory
hideLibWarnings Boolean false Suppress library warnings

rell-generate-client

Generates Kotlin client stubs from Rell smart contract definitions.

<execution>
    <goals><goal>rell-generate-client</goal></goals>
    <configuration>
        <packageName>com.example.generated</packageName>
        <mainModule>main</mainModule>
        <generateQueries>true</generateQueries>
        <generateOperations>true</generateOperations>
    </configuration>
</execution>
Parameter Type Default Description
packageName String required Package name for generated classes
mainModule String null Main module(s), comma-separated
mainModules List null Main modules (alternative to above)
source File ${basedir}/rell/src Source directory
target File ${project.build.directory}/generated-sources/rell-client Output directory
generateQueries Boolean true Generate query stubs
generateOperations Boolean true Generate operation stubs
hideLibWarnings Boolean false Suppress library warnings
force Boolean false Force regeneration

Global Parameters

All goals support these parameters:

Parameter Type Default Description
skip Boolean false Skip goal execution

Packages

 
 
 

Contributors

Languages