DAML Maven plugin

Plugin for DAML compilation and codegen

Лицензия

Лицензия

Категории

Категории

Maven Компиляция и сборка
Группа

Группа

com.digitalasset
Идентификатор

Идентификатор

daml-maven-plugin
Последняя версия

Последняя версия

0.1.4
Дата

Дата

Тип

Тип

maven-plugin
Описание

Описание

DAML Maven plugin
Plugin for DAML compilation and codegen
Ссылка на сайт

Ссылка на сайт

https://daml.com
Система контроля версий

Система контроля версий

https://github.com/digital-asset/daml-maven-plugin

Скачать daml-maven-plugin

Как подключить последнюю версию

<plugin>
    <groupId>com.digitalasset</groupId>
    <artifactId>daml-maven-plugin</artifactId>
    <version>0.1.4</version>
</plugin>

Зависимости

compile (3)

Идентификатор библиотеки Тип Версия
org.apache.maven : maven-plugin-api jar 3.0
org.apache.maven : maven-project jar 2.2.1
org.apache.maven.shared : maven-artifact-transfer jar 0.11.0

provided (1)

Идентификатор библиотеки Тип Версия
org.apache.maven.plugin-tools : maven-plugin-annotations jar 3.5

test (1)

Идентификатор библиотеки Тип Версия
junit : junit jar 4.12

Модули Проекта

Данный проект не имеет модулей.

Maven plugin for DAML compilation and codegen

Usage

In your DAML project define the usual daml.yaml and import the Java bindings in your pom.xml:

<dependency>
    <groupId>com.daml.ledger</groupId>
    <artifactId>bindings-rxjava</artifactId>
    <version>${daml-sdk.version}</version>
</dependency>

Then add this plugin:

<plugin>
    <groupId>com.digitalasset</groupId>
    <artifactId>daml-maven-plugin</artifactId>
    <version>${daml-plugin.version}</version>
    <executions>
        <execution>
            <id>daml-compile-codegen</id>
            <goals>
                <goal>damlcompile</goal>
                <goal>codegen</goal>
            </goals>
        </execution>
    </executions>
</plugin>

When using the codegen goal it will fetch the codegen version corresponding to the Java binding version and use it to generate the java sources.

The project also fails to build if the SDK version in your daml.yaml doesn't match the version of Java bindings in pom.xml.

Optional configuration elements:

  • darName: the generated dar file. Default: ${project.build.directory}/${project.artifactId}.dar.
  • decoderClass: defines the -d option of the codegen. Default: daml.Decorder.
  • output: the target directory where the classes are generated to. Default: ${project.build.directory}/generated-sources/main/java.

By default these goals are bound to generate-sources phase.

DAML doc gen

To generate damldocs at verify phase include this execution:

<execution>
    <id>daml-docs</id>
    <goals>
        <goal>docsgen</goal>
    </goals>
    <configuration>
        <docsOutput>damldocs.md</docsOutput>
        <combined>true</combined>
        <damlFiles>
            <param>src/main/daml/your_main_daml.daml</param>
        </damlFiles>
    </configuration>
</execution>

Configuration:

  • docsOutput: the output parameter of the generator. Default: damldocs.
  • combined: if true a single file is generated (--combine option of the generator). Default is false.
  • format: the --format option of the generator. Default: markdown.

By default this goal is bound to verify phase.

CONFIDENTIAL © 2019 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved. Any unauthorized use, duplication or distribution is strictly prohibited.

com.digitalasset

Digital Asset

Версии библиотеки

Версия
0.1.4
0.1.3
0.1.1
0.1