Questions tagged [dependencies]

A dependency exists between two elements if changes to the definition of one element may cause changes to the other.

A dependency exists between two elements if changes to the definition of one element may cause changes to the other.

To quote from the 3rd edition of UML Distilled:

An element C (the client) depends on an element S (the supplier) if and only if changes to the definition of S may cause changes to C.

If the elements are classes, only the direct cause for change (i.e. not through a ripple effect) is called a dependency, i.e. the relation is not transitive.

For packages, C depends on S if a class in C depends on a class in S. Sometimes, the transitive closure is taken, i.e. the dependency of C on a package T can be caused by C depending on S depending on T via class dependencies.

References:

  1. Understanding Dependencies
  2. What is the difference between dependency and association?
12826 questions
292
votes
16 answers

Make Maven to copy dependencies into target/lib

How do I get my project's runtime dependencies copied into the target/lib folder? As it is right now, after mvn clean install the target folder contains only my project's jar, but none of the runtime dependencies.
Michael
  • 3,049
  • 3
  • 19
  • 5
285
votes
13 answers

npm install private github repositories by dependency in package.json

I'm trying to install github private repository by npm that includes other private github repositories as dependency. Have tried a lot of ways and posts but none is working. Here is what i'm doing : npm install…
vashishatashu
  • 7,720
  • 7
  • 29
  • 34
275
votes
9 answers

How to get a dependency tree for an artifact?

dependency:tree can be used to see the dependency tree for a given project. But what I need is to see the dependency tree for a 3rd party artifact. I guess I can create an empty project, but I'm looking for something easier (I need to do this for…
IttayD
  • 28,271
  • 28
  • 124
  • 178
270
votes
10 answers

Maven: add a dependency to a jar by relative path

I have a proprietary jar that I want to add to my pom as a dependency. But I don't want to add it to a repository. The reason is that I want my usual maven commands such as mvn compile, etc, to work out of the box. (Without demanding from the…
flybywire
  • 261,858
  • 191
  • 397
  • 503
262
votes
12 answers

Exclude all transitive dependencies of a single dependency

In Maven2, to exclude a single transitive dependency, I have to do something like this: sample.group sample-artifactB 1
pbreault
  • 14,176
  • 18
  • 45
  • 38
259
votes
12 answers

How to check for DLL dependency?

Sometimes when I'm doing a little project I'm not careful enough and accidentally add a dependency for a DLL that I am not aware of. When I ship this program to a friend or other people, "it doesn't work" because "some DLL" is missing. This is of…
orlp
  • 112,504
  • 36
  • 218
  • 315
219
votes
17 answers

node.js TypeError: path must be absolute or specify root to res.sendFile [failed to parse JSON]

[add] So my next problem is that when i try adding a new dependence (npm install --save socket.io). The JSON file is also valid. I get this error: Failed to parse json npm ERR! Unexpected string npm ERR! File: /Users/John/package.json npm ERR!…
216
votes
15 answers

Fix the upstream dependency conflict installing NPM packages

I am trying to npm install vue-mapbox mapbox-gl, and I'm getting a dependency tree error. I'm running Nuxt.js SSR with Vuetify and haven't installed anything related to Mapbox prior to running this install and am getting this error. 38 error code…
connorcode
  • 2,341
  • 2
  • 8
  • 13
208
votes
17 answers

Multi-project test dependencies with gradle

I have a multi-project configuration and I want to use gradle. My projects are like this: Project A -> src/main/java -> src/test/java Project B -> src/main/java (depends on src/main/java on Project A) -> src/test/java (depends on…
mathd
  • 2,415
  • 2
  • 17
  • 8
207
votes
8 answers

Maven check for updated dependencies in repository

Is there a Maven plugin that allows you to check if there are newer versions of dependencies available in the repository? Say, you are using dependency X with version 1.2. Now a new version of X is released with version 1.3. I'd like to know, based…
froethen
  • 2,083
  • 2
  • 13
  • 5
190
votes
19 answers

How to set compileJava' task ( 11) and 'compileKotlin' task (1.8) jvm target compatibility to the same Java version in build.gradle.kts?

Build.gradle.kts buildscript { repositories { google() mavenCentral() gradlePluginPortal() } dependencies { classpath ("com.android.tools.build:gradle:7.0.2") classpath…
186
votes
35 answers

Failed to load c++ bson extension

A total node noob here. I've been trying to set up a sample node app but the following error keeps popping up every time I try to run: node app Failed to load c++ bson extension, using pure JS version events.js:72 throw er; // Unhandled…
Theja
  • 2,448
  • 3
  • 14
  • 18
181
votes
1 answer

How can I have linked dependencies in a git repo?

In my scripts, I often use libraries (mine or others') that have their own repos. I don't want to duplicate those in my repo and get stuck with updating them every time a new version comes out. However, when somebody clones the repo, it should…
Lea Verou
  • 23,618
  • 9
  • 46
  • 48
179
votes
18 answers

scipy.misc module has no attribute imread?

I am trying to read an image with scipy. However it does not accept the scipy.misc.imread part. What could be the cause of this? >>> import scipy >>> scipy.misc >>>…
ustroetz
  • 5,802
  • 16
  • 47
  • 74
175
votes
5 answers

Maven: how to override the dependency added by a library

Here's my generic problem: My project P depends on A which depends on B which depends on C which depends on version 1.0.1 of D. There's a problem with version 1.0.1 of D and I want to force the use of another module. I don't know how to declare this…
wishihadabettername
  • 14,231
  • 21
  • 68
  • 85