vlfig
vlfig

Reputation: 365

How can a maven plugin provide a file to another?

We have a maven plugin that's basically a wrapper around the maven-assembly-plugin. We do things like:

    executeMojo(
            assemblyPlugin,
            goal("single"),
            configuration(
                    element(name("descriptor"), descriptor),
                    element(name("formats"), element(name("format"), "tar.gz")),
            ),
            executionEnvironment(mavenProject, mavenSession, pluginManager)
    )

(Yes, it's groovy.)

The location of the descriptor is still passed as a parameter from the project that includes this plugin. However, we'd like to provide at least a default file and pass that reference to the maven-assembly-plugin.

If we package a descriptor file with our plugin, where does it end up? What kind of path can we give to the assembly plugin?

Thanks in advance.

Upvotes: 0

Views: 46

Answers (1)

khmarbaise
khmarbaise

Reputation: 97527

You can use the concept of shared descriptors which is supported by the maven-assembly-plugin.

Upvotes: 1

Related Questions