Skip to content

Update archetype:integration-test to execute the CLI for generating test projects #1135

@romain-grecourt

Description

@romain-grecourt

Description

Update the helidon-archetype-maven-plugin:integration-test to actually execute helidon init to generate the test projects.

It currently supports two modes:

  • Embedded using org.apache.maven.archetype (mavenArchetypeCompatible=true)
  • Embedded using io.helidon.build.archetype.engine.v2.ArchetypeEngineV2

This task complements the compiler work done in #1134, where we can validate that the compiler output is compatible with older releases of the CLI.

The current target is to use Helidon CLI v3.0.6 which is the latest CLI release.

We will support a new mode that will:

  • download a CLI zip distribution from Maven configured via GAV in the plugin configuration
  • generate the test projects by executing helidon init in a separate process

We can also formalize the modes in configuration to make it more explicit.
E.g.

<plugin>
    <groupId>io.helidon.build-tools</groupId>
    <artifactId>helidon-archetype-maven-plugin</artifactId>
    <configuration>
        <testInitializer>maven-embedded</testInitializer>
        <testInitializer>helidon-embedded</testInitializer>
        <testInitializer>exec:io.helidon.build-tools.cli:helidon-cli-impl:3.0.6:zip</testInitializer>
    </configuration>
</plugin>

The above snippet implies removing mavenArchetypeCompatible from integration-test, it would however remain in jar.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions