On Tue, Mar 7, 2017 at 11:59 AM Tushar Kapila <tgkp...@gmail.com> wrote:

> hello
>
> I would like to get  output binaries -how many/ name and output paths,
> of an arbitrary maven project. It could have multiple ways / profiles
> of being built (for example client jar, service app and front end war
> file, the way to build these will be with me, provided in a build.json
> file with in my own format, by the project maintainer.
>
> Is there a way, to not build the project, nor make a plugin, but some
> how query maven, giving it the profile and the pom.xml as input, and
> getting the list of project artifacts of the package step? In some it
> could be the default jar, in others a war file but not with the
> artifact's name (over ridden output file name).
>
> A project can have many profiles, if it has any, I will have
> information on one or more profile names I'm interested in.
>
> Even if a plugin changes the exact name or path of a output binary,
> will the maven API still know the new path? Let's assume its a well
> behaved standard plugin like the jar plugin?
>

Due to the way Maven is designed, it has no knowledge of the outputs (nor
even the inputs!) of a plugin, including whether and which artifact(s) will
be attached, without actually running the mojo.
You could possibly infer it, but it would require precise knowledge of all
the plugins used in the build and how they use their configurations
(including parsing plugin-specific files such as assembly descriptors for
the maven-assembly-plugin).

Reply via email to