Questions tagged [dependency-management]

The management of dependencies, for example third party libraries, that are used by a software project.

The management of dependencies, for example third party libraries, that are used by a software project. This handles storage and distribution of these dependency artifacts, as well as version management for them.

2928 questions
31
votes
2 answers

Maven : Should I keep or remove declared dependencies that are also transitives dependencies?

Do you think it is a good practice to remove every transitive dependencies that can be found in a maven pom? Example: My project depends on A and B. B is also a transitive dependency of A. Should I keep B in my pom or remove it ? What is the…
Guillaume
  • 5,488
  • 11
  • 47
  • 83
31
votes
1 answer

Algorithm for dependency resolution

I'm in the process of writing a package manager, and for that I want the dependency resolution to be as powerful as possible. Each package has a list of versions, and each version contains the following information: A comparable ID Dependencies (a…
Jan
  • 993
  • 1
  • 13
  • 28
31
votes
8 answers

How is JavaScript library bloat mitigated with Web Components?

As someone who has tried to find a way to help content authors develop and maintain big web sites by creating (HTML) components for years, I'm really excited to see web components gaining tracction at w3c, google and mozilla. But it seems to me…
31
votes
2 answers

Phing and Composer, which way around?

I want to use both Phing and Composer for my applications. Phing as the build system and Composer to manage dependencies. But which way around should they be used? Currently we're installing Phing globally on all servers. Phing is supposed to…
28
votes
3 answers

How to deploy OSGi apps and dependencies?

OSGi seems to have an excellent benefit of having small deployable artifacts by not wrapping dozens of JAR dependencies into a lib directory. However, I can't find anything that tells me an easy, reliable way to deploy dependencies to a container.…
jcalvert
  • 3,628
  • 2
  • 19
  • 13
28
votes
3 answers

Why doesn't Gradle include transitive dependencies in compile / runtime classpath?

I'm learning how Gradle works, and I can't understand how it resolves a project transitive dependencies. For now, I have two projects : projectA : which has a couple of dependencies on external libraries projectB : which has only one dependency on…
Francis Toth
  • 1,595
  • 1
  • 11
  • 23
27
votes
2 answers

Use dependencies from Eclipse p2 repository in a regular Maven build?

I'd like to use dependencies from a remote Eclipse p2 repository in a "regular" Maven 3 build (e.g. JAR or WAR packaging) - all without converting the p2 repo to a local Maven repo (which is what osgi-to-maven2 and m4e seem to do). Ideally, I'd just…
otto.poellath
  • 4,129
  • 6
  • 45
  • 60
27
votes
2 answers

Package Manager vs. Git Submodule/Subtree

Are there any reasons to use a package manager rather than git submodules/subtrees, or vice versa? The git solutions seem to be a lot more hassle than a simple package manager. Assume that the space-saving benefit of git submodules is not important.
27
votes
4 answers

Maven/Gradle way to calculate the total size of a dependency with all its transitive dependencies included

I would like to be able to perform an analysis on each of my project POMs to determine how many bytes each direct dependency introduces to the resulting package based on the sum of all of its transitive dependencies. For example, if dependency A…
Shawn Sherwood
  • 1,968
  • 2
  • 19
  • 30
27
votes
2 answers

How to override the dependency of an sbt plugin?

I've written an sbt plugin called sbt-jumi which implements sbt integration for Jumi. Right now the sbt-jumi plugin depends on the current Jumi release. Here is the relevant line from the plugin's build.sbt: libraryDependencies += "fi.jumi" %…
Esko Luontola
  • 73,184
  • 17
  • 117
  • 128
26
votes
2 answers

Can you have an interface be dependent on a class?

I'm studying SOLID principles and have a question about dependency management in relation to interfaces. An example from the book I'm reading (Adaptive Code via C# by Gary McLean Hall) shows a TradeProcessor class that will get the trade data,…
Lews Therin
  • 3,707
  • 2
  • 27
  • 53
26
votes
6 answers

JavaScript dependency management

I am currently maintaining a large number of JS files and the dependency issue is growing over my head. Right now I have each function in a separate file and I manually maintain a database to work out the dependencies between functions. This I would…
user386508
  • 261
  • 1
  • 3
  • 4
26
votes
7 answers

Gradle equivalent to Maven's "copy-dependencies"?

In Maven-land, anytime I want to simply pull down the transitive dependencies for a particular POM file, I just open a shell, navigate to where the POM is located, and run: mvn dependency:copy-dependencies And boom, Maven creates a target/…
smeeb
  • 27,777
  • 57
  • 250
  • 447
26
votes
3 answers

Can you set conditional dependencies for Python 2 and 3 in setuptools?

When releasing a Python egg with support for both Python 2 and 3, can you specify dependencies that change depending on which version you're using? For example, if you use dnspython for Python 2, there is a Python 3 version that is called…
Michael Herold
  • 1,292
  • 1
  • 13
  • 22
25
votes
3 answers

How to use poetry with docker?

How do I install poetry in my image? (should I use pip?) Which version of poetry should I use? Do I need a virtual environment? There are many examples and opinions in the wild which offer different solutions.
Soof Golan
  • 1,090
  • 2
  • 9
  • 13