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
4
votes
1 answer

grails is unable to download jar from maven repo

I'm trying to do grails clean on my grails project on centoOS server ... It starts downloading dependencies but gets stuck on a particular jar, if I try downloading the jar directly from the browser it working but hangs when I do grails…
Hussain Fakhruddin
  • 3,054
  • 3
  • 22
  • 34
4
votes
2 answers

Byte-buddy and cglib not available in Spock test

I started playing around with Spock testing framework and my build.gradle dependencies section looks like this: dependencies { testCompile "org.spockframework:spock-core:1.3-groovy-2.5" } I have a (useless) Spock test that requires creation of…
user2340612
  • 8,484
  • 4
  • 35
  • 61
4
votes
1 answer

Difference between bindAsContract and bind in HK2

I am working to implement a dependency injection of a constructor in a J2EE jersey project. I am using HK2. I create a class class MyServiceImpl implements MyService{ @Inject public MyServiceImpl(String test){ // do something } } Now, my…
4
votes
0 answers

Is there a way to automatically check that `api` and `implementation` dependencies are correct in Gradle build scripts?

Gradle deprecated the compile configuration and replaced it with api and implementation. I already understand the difference between the two, and I'd like to err on the conservative side of assuming that something is implementation unless it can be…
Trejkaz
  • 10,264
  • 6
  • 52
  • 106
4
votes
1 answer

Is there a way to find missing .m files of referenced functions?

A runtime error occurs when the Matlab interpreter interprets a function that isn't implemented in an .m - file. Is there a way to find these errors at "compile time", i.e., is there a script that parses my matlab code, checks all called functions…
secr
  • 2,293
  • 3
  • 18
  • 18
4
votes
9 answers

Do you define an interface for every public class in your domain model? Pros and Cons?

Do you implement an interface for every public class in your domain model? Pros and Cons? Update: If Repositories interfaces and domain model classes are defined in separate assemblies, wouldn't there be circular dependency if we do not define…
StackUnderflow
  • 20,450
  • 13
  • 52
  • 77
4
votes
1 answer

Difference between sun.* vs com.sun.*

I have recently migrated from Java 8 to Java 11. for jax.ws I had to add following external dependency to my pom.xml as it's no longer available in Java 11. However, I came across some argument that com.sun.* package classes should not be used and…
Sagar
  • 4,474
  • 4
  • 29
  • 57
4
votes
3 answers

Dagger/MissingBinding java.util.Map,Provider> cannot be provided without an @Provides-annotated method

This is how I'm trying to provide my ViewModelFactory: @Suppress("UNCHECKED_CAST") @Singleton class ViewModelFactory @Inject constructor( private val viewModels: MutableMap, Provider> ) : ViewModelProvider.Factory…
Luca Nicoletti
  • 2,067
  • 2
  • 17
  • 29
4
votes
1 answer

Can't add a dynamic feature module because of build flavor problems

I wanted to implement a new dynamic feature module in an existing app but had to give up due to product flavor problems. The example code can be found here. https://github.com/henningBunk/dynamic_feature_problem I have three modules: app. The main…
Henning
  • 1,263
  • 9
  • 25
4
votes
1 answer

Stack insists on building Cabal package

I am working on a Haskell project using Stack. Recently, we started using the lens package which requires the Cabal package as a dependency, but we switched to lens-simple because building the Cabal package was too resource intensive for some older…
1000000000
  • 632
  • 4
  • 16
4
votes
4 answers

Unresolved DataBinding dependency after latest Android Studio Update 3.3.2

After the latest update to Android Studio, the DataBinding dependency is missing. I get this error message: ERROR: Failed to resolve: androidx.databinding:databinding-runtime:3.3.2 Show in Project Structure dialog Affected Modules: app ERROR:…
4
votes
3 answers

Makefile with Jar and Package Dependencies

I have been trying all day to get this thing to work. Basically I need to create a makefile to build my project from its sources. I know a little about Linux but not much and I am a complete makefile newbie. I have tried loads of examples from all…
feldoh
  • 650
  • 2
  • 6
  • 17
4
votes
2 answers

I want to call it side-effect programming, but there's gotta be a better term for this

What is the name of the following programming paradigm: Code is executed based on a set of logical tests resolving to true (the clause). The clause is comprised of operators and operands. Each operand is a value/object. Instead of evaluating the…
Hanoixan
  • 419
  • 2
  • 12
4
votes
3 answers

Android and maven: problem with maven dependencies in apk

I'm currently working on an Android project using Maven as the build tool. However I'm having a problem with including dependencies, to be more specific: none of the dependencies listed in my pom file are packed in the apk. This results in…
thomaux
  • 17,387
  • 9
  • 71
  • 94
4
votes
2 answers

How to find all node's ancestors in NetworkX?

I have a large DiGraph that consists of dependent jobs. For example, for the graph a>b>c, job c can run only once job b is completed. I tried to find a function that gets all c's upstream jobs (that is (a, b)). I used DiGraph.predecessors, but it…
lemon
  • 89
  • 1
  • 8