Skip to content

shamrock-maven-plugin fails native-image when build goal wasn't run #684

@Sanne

Description

@Sanne

Obviously the native-image goal of the shamrock-maven-plugin will fail when the user forgot to also setup the build goal.

However the error message we provide is a bit misleading:

[ERROR] Failed to execute goal org.jboss.shamrock:shamrock-maven-plugin:1.0.0.Alpha1-SNAPSHOT:native-image (native-image) on project shamrock-integration-test-infinispan-cache-jpa-stress: Failed to generate a native image: Failed to copy the runnable jar and the lib to the docker project dir: /home/sanne/sources/shamrock/integration-tests/infinispan-cache-jpa-stress/target/lib -> [Help 1]

Internally Shamrock fails to find the target/lib directory - as it wasn't created.

I think we could at least improve the error message by suggesting that if this directory doesn't exist, the plugin is missing.

If we actually have use cases with an empty lib directory (do we?) we could have a special marker in that directory (something like "shamrock-maven-plugin:build was here"), to allow empty dirs.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions