Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [orbit-dev] Bug with automated bundle creation process?

On Thu, 2020-08-13 at 16:13 +0100, Sina Madani wrote:
> Hi again,
> It seems every library I want to add that isn’t Apache Commons has
> this issue. I spent a whole afternoon manually chasing dependencies
> for and ended up with the mess in [1] and still the
> build is failing. I’m wondering if it’s supposed to be this
> difficult, or if I’m just trying to put extremely complex libraries
> on Orbit? For example, the library we have in our local repo is in
> [2] and all I wanted to do is put it on Orbit (so we can delete it
> from our repo) but I can’t figure out why it’s such a pain, and why I
> have to manually chase down every single transitive dependency. Any
> further clarification on the process would be appreciated!

The library seems to have various dependencies not already in Orbit and
you may need to also include them. You might be able to avoid some if
they're optional, or only needed for tests but if they're required at
compile-time, you would generally need them.

You can use mvn dependency:tree or even dependency:copy-dependencies to
get the transitive closure for some dependency :

[INFO] \-
[INFO]    +-
[INFO]    +-
[INFO]    |  +-
[INFO]    |  |  \-
[INFO]    |  |     \-
[INFO]    |  |        +- org.apache.httpcomponents:httpclient:jar:4.0.3:compile
[INFO]    |  |        |  +- org.apache.httpcomponents:httpcore:jar:4.0.1:compile
[INFO]    |  |        |  +- commons-logging:commons-logging:jar:1.1.1:compile
[INFO]    |  |        |  \- commons-codec:commons-codec:jar:1.3:compile
[INFO]    |  |        \- xpp3:xpp3:jar:1.1.4c:compile
[INFO]    |  \- org.mortbay.jetty:jetty:jar:6.1.26:compile
[INFO]    |     +- org.mortbay.jetty:jetty-util:jar:6.1.26:compile
[INFO]    |     \- org.mortbay.jetty:servlet-api:jar:2.5-20081211:compile
[INFO]    +-
[INFO]    \- javax.mail:mail:jar:1.4:compile
[INFO]       \- javax.activation:activation:jar:1.1:compile

Anytime someone plans to add a new library and if it has a pom with a
fair amount of dependencies, it's a good idea to do something like this
so you get an idea of how much work will be required.

Other dependencies, you'll notice might already exist in Orbit at a
similar version and if close enough, might be compatible. For example,
we have 1.34.2 in Orbit, so I
would consider going with that if possible.

Roland Grunberg

Back to the top