You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Mark Raynsford <or...@io7m.com.INVALID> on 2022/05/07 16:48:58 UTC

Splitting a dependency tree with the assembly plugin

Hello!

I'm running into a problem when trying to produce an application
distribution.

This is the pom.xml file:

https://github.com/io7m/eigion/blob/develop/com.io7m.eigion.distribution.example/pom.xml

The module essentially represents two isolated applications that have
been combined into one Maven module for the purposes of producing a
distribution zip file. The first application is represented by the
com.io7m.eigion.launcher.main dependency, and the other is represented
by the com.io7m.eigion.gui dependency.

I have the following assembly descriptor:

https://github.com/io7m/eigion/blob/develop/com.io7m.eigion.distribution.example/src/main/assembly/distribution.xml

What I'm trying to do is:

  * Put com.io7m.eigion.gui and all dependencies of com.io7m.eigion.gui
    into "workbench/modules" in the assembly.
  * Put all dependencies of com.io7m.eigion.launcher.main into
    "launcher/modules" in the assembly.

This is _mostly_ working, except that it seems that at least one
transitive dependency of com.io7m.eigion.launcher.main is being left
out. Specifically, for example, it seems that com.io7m.junreachable.core
is being left out of "launcher/modules". I _think_ what's happening is
that because com.io7m.junreachable.core is also transitive dependency
of com.io7m.eigion.gui, it's being excluded.

Is there perhaps a more intelligent way to achieve what I'm trying to
achieve?

-- 
Mark Raynsford | https://www.io7m.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Splitting a dependency tree with the assembly plugin

Posted by Mark Raynsford <or...@io7m.com.INVALID>.
> On 2022-05-07T20:42:51 +0200
> Thomas Broyer <t....@gmail.com> wrote:
> 
> How about first building a distribution for each module separately (each in
> its own Maven module) and then assemble them into a single distribution?  

I eventually went with this model. One application produces a
distribution zip, and the distribution model unpacks the distribution
and re-packs it with the contents of the other application. I've had to
introduce profiles in order to avoid breaking the build if assemblies
are skipped.

-- 
Mark Raynsford | https://www.io7m.com


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Splitting a dependency tree with the assembly plugin

Posted by Mark Raynsford <or...@io7m.com.INVALID>.
On 2022-05-07T20:42:51 +0200
Thomas Broyer <t....@gmail.com> wrote:

> How about first building a distribution for each module separately (each in
> its own Maven module) and then assemble them into a single distribution?

Hello!

That might be an option, although I'm not sure how the modules and
dependencies would need to be arranged.

-- 
Mark Raynsford | https://www.io7m.com


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Splitting a dependency tree with the assembly plugin

Posted by Thomas Broyer <t....@gmail.com>.
How about first building a distribution for each module separately (each in
its own Maven module) and then assemble them into a single distribution?

Le sam. 7 mai 2022 à 18:49, Mark Raynsford
<or...@io7m.com.invalid> a écrit :

> Hello!
>
> I'm running into a problem when trying to produce an application
> distribution.
>
> This is the pom.xml file:
>
>
> https://github.com/io7m/eigion/blob/develop/com.io7m.eigion.distribution.example/pom.xml
>
> The module essentially represents two isolated applications that have
> been combined into one Maven module for the purposes of producing a
> distribution zip file. The first application is represented by the
> com.io7m.eigion.launcher.main dependency, and the other is represented
> by the com.io7m.eigion.gui dependency.
>
> I have the following assembly descriptor:
>
>
> https://github.com/io7m/eigion/blob/develop/com.io7m.eigion.distribution.example/src/main/assembly/distribution.xml
>
> What I'm trying to do is:
>
>   * Put com.io7m.eigion.gui and all dependencies of com.io7m.eigion.gui
>     into "workbench/modules" in the assembly.
>   * Put all dependencies of com.io7m.eigion.launcher.main into
>     "launcher/modules" in the assembly.
>
> This is _mostly_ working, except that it seems that at least one
> transitive dependency of com.io7m.eigion.launcher.main is being left
> out. Specifically, for example, it seems that com.io7m.junreachable.core
> is being left out of "launcher/modules". I _think_ what's happening is
> that because com.io7m.junreachable.core is also transitive dependency
> of com.io7m.eigion.gui, it's being excluded.
>
> Is there perhaps a more intelligent way to achieve what I'm trying to
> achieve?
>
> --
> Mark Raynsford | https://www.io7m.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>