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
156
votes
8 answers

composer: How to find the exact version of a package?

Suppose I'm writing a library A, that depends on another library, monolog for instance. I want to install the latest version of monolog, so I just put this inside composer.json: { "require": { "monolog/monolog": "*.*.*" } } Then I…
HappyDeveloper
  • 12,480
  • 22
  • 82
  • 117
155
votes
6 answers

Javascript require() function giving ReferenceError: require is not defined

Basically, I am using javascript to scrape data from Google Play store using: 1-Request 2-Cheerios 3-QueryString I used Google Market API from Github which uses require as following: var request = require('request'); var cheerio =…
Hunain Usman
  • 2,088
  • 5
  • 23
  • 32
151
votes
6 answers

How do I add a Maven dependency in Eclipse?

I don't know how to use Maven at all. I've been developing for a couple years with Eclipse and haven't yet needed to know about it. However, now I'm looking at some docs that suggest I do the following: "To include it within your project, just…
Riley Lark
  • 20,660
  • 15
  • 80
  • 128
138
votes
5 answers

Installing multiple versions of a package with pip

In my application I would like to use: packageA, which requires packageX==1.3 packageB, which requires packageX==1.4 packageX==1.5 How can I install multiple versions of packageX with pip to handle this situation?
limboy
  • 3,879
  • 7
  • 37
  • 53
130
votes
2 answers

When installing packages with Yarn, what does "incorrect peer dependency" mean?

I've just cloned a repo, which recommends the use of Yarn to install dependencies. When I run yarn install, it seems to be okay, but it provides this warning: yarn install v0.20.3 [1/4] Resolving packages... [2/4] Fetching packages... [3/4] …
126
votes
10 answers

In Gradle, how do I declare common dependencies in a single place?

In Maven there is a very useful feature where you can define a dependency in the section of the parent POM, and reference that dependency from child modules without specifying the version or scope or whatever. What are the…
113
votes
12 answers

Maven-like dependency management for C++?

Say I have a C++ project that is split in several subprojects. The subproject all produce a DLL and different teams of developers work on each of the subproject. Now if I want to build the main project, is there a way to avoid having to build all…
weberste
  • 1,884
  • 2
  • 17
  • 12
109
votes
3 answers

composer.lock: how does it work?

I'm trying to understand this part: http://getcomposer.org/doc/02-libraries.md#lock-file this lock file will not have any effect on other projects that depend on it. It only has an effect on the main project" Does that mean that if project P…
HappyDeveloper
  • 12,480
  • 22
  • 82
  • 117
104
votes
1 answer

What is the meaning of type "bundle" in a maven dependency?

What is the meaning of "bundle" e.g in this dependency: org.apache.abdera abdera-core 1.1.2 bundle compile
Zeemee
  • 10,486
  • 14
  • 51
  • 81
99
votes
10 answers

How to clean old dependencies from maven repositories?

I have too many files in .m2 folder where maven stores downloaded dependencies. Is there a way to clean all old dependencies? For example, if there is a dependency with 3 different versions: 1, 2 and 3, after cleaning there must be only 3rd. How I…
Cherry
  • 31,309
  • 66
  • 224
  • 364
98
votes
9 answers

Combining DI with constructor parameters?

How do I combine constructor injection with "manual" constructor parameters? ie. public class SomeObject { public SomeObject(IService service, float someValue) { } } Where IService should be resolved/injected by my DI container, and…
George R
  • 3,784
  • 3
  • 34
  • 38
97
votes
5 answers

dependencyManagement and scope

I usually put a section in parent-project/pom.xml. This section contains declaration and version for all dependencies of my children modules like this (i.e. without the
ben75
  • 29,217
  • 10
  • 88
  • 134
96
votes
16 answers

How can I manage client-side JavaScript dependencies?

Although there are great solutions to manage dependencies on the server side, I could not find any that satisfies all my needs to have a coherent client side JavaScript dependency management workflow. I want to satisfy these five…
pathikrit
  • 32,469
  • 37
  • 142
  • 221
93
votes
5 answers

What is the purpose of Mavens dependency declarations classifier property?

I have a pom.xml file and in that i see that their are 3 dependencies referenced for same the difference are in tags sources javadoc I have deleted the dependencies that had the…
pushya
  • 4,338
  • 10
  • 45
  • 54
87
votes
10 answers

How do I define a variable for the dependency version in Gradle

I am currently trying to migrate a Maven project to Gradle In my Maven version I have the dependency versions all listed out like this in my parent pom: 4.2.3.RELEASE
Rodrigo Sasaki
  • 7,048
  • 4
  • 34
  • 49