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?
11076 questions
233
votes
3 answers

How do I install package.json dependencies in the current directory using npm

I have a web app: fooapp. I have a package.json in the root. I want to install all the dependencies in a specific node_modules directory. How do I do this? What I want Lets say I have two widget dependencies. I want to end up with a directory…
Daniel Beardsley
  • 18,289
  • 20
  • 62
  • 76
233
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
  • 13,426
  • 18
  • 41
  • 38
191
votes
14 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
  • 98,226
  • 29
  • 187
  • 285
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,428
  • 3
  • 11
  • 17
177
votes
6 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
  • 1,783
  • 2
  • 11
  • 5
176
votes
14 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!…
173
votes
16 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,035
  • 2
  • 15
  • 8
157
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
  • 22,372
  • 9
  • 43
  • 47
149
votes
15 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
  • 4,962
  • 13
  • 39
  • 69
145
votes
8 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
  • 25,561
  • 25
  • 109
  • 173
142
votes
11 answers

Unit testing code with a file system dependency

I am writing a component that, given a ZIP file, needs to: Unzip the file. Find a specific dll among the unzipped files. Load that dll through reflection and invoke a method on it. I'd like to unit test this component. I'm tempted to write code…
Judah Gabriel Himango
  • 55,559
  • 37
  • 152
  • 206
141
votes
5 answers

Downloading all maven dependencies to a directory NOT in repository?

I started to convert my project to maven because I needed to use a library that was distributed in binary form over maven only, but after banging my head against the wall on it for far too long I've decided to stop hurting myself and just use Ant. …
chubbsondubs
  • 34,812
  • 24
  • 97
  • 134
140
votes
8 answers

What is the difference in maven between dependency and plugin tags in pom xml?

I'm new to the maven tool, I have made a project with Spring and Hibernate and they are configured in pom.xml as plugins, but JUnit is tagged under dependency. My question is what is the logic behind one as a plugin and one as dependency ?
Soumyaansh
  • 7,482
  • 6
  • 36
  • 43
139
votes
17 answers

Dependency graph of Visual Studio projects

I'm currently migrating a big solution (~70 projects) from VS 2005 + .NET 2.0 to VS 2008 + .NET 3.5. Currently I have VS 2008 + .NET 2.0. The problem is that I need to move projects one by one to new .NET framework ensuring that no .NET 2.0 project…
Migol
  • 7,465
  • 8
  • 44
  • 68
137
votes
5 answers

Add a dependency in Maven

How do I take a jar file that I have and add it to the dependency system in maven 2? I will be the maintainer of this dependency and my code needs this jar in the class path so that it will compile.
Milhous
  • 14,003
  • 16
  • 60
  • 80