Skip to main content

Questions tagged [dependency-management]

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

dependency-management
Filter by
Sorted by
Tagged with
1909 votes
8 answers
332k views

What is the difference between Bower and npm?

What is the fundamental difference between bower and npm? Just want something plain and simple. I've seen some of my colleagues use bower and npm interchangeably in their projects.
Nafiul Islam's user avatar
  • 81.8k
1293 votes
12 answers
536k views

What's the difference between implementation, api and compile in Gradle?

After updating to Android Studio 3.0 and creating a new project, I noticed that in build.gradle there is a new way to add new dependencies instead of compile there is implementation and instead of ...
humazed's user avatar
  • 76.2k
1108 votes
15 answers
511k views

What exactly is a Maven Snapshot and why do we need it?

I am a bit confused about the meaning of a Maven Snapshot and why we build one?
meisam's user avatar
  • 11.7k
1079 votes
36 answers
791k views

Android Studio: Add jar as library?

I'm trying to use the new Android Studio but I can't seem to get it working correctly. I'm using the Gson library to serialize/deserialize JSON-objects. But the library somehow isn't included in the ...
Ozzie's user avatar
  • 11.7k
1078 votes
15 answers
446k views

Differences between dependencyManagement and dependencies in Maven

What is the difference between dependencyManagement and dependencies? I have seen the docs at Apache Maven web site. It seems that a dependency defined under the dependencyManagement can be used in ...
hguser's user avatar
  • 35.7k
1022 votes
26 answers
1.1m views

How can I force Gradle to redownload dependencies?

How can I tell Gradle to redownload dependencies from repositories?
fedor.belov's user avatar
919 votes
14 answers
1.3m views

Correct way to add external jars (lib/*.jar) to an IntelliJ IDEA project

When creating a new Java project in IntelliJ IDEA, the following directories and files are created: ./projectname.iml ./projectname.ipr ./projectname.iws ./src/ I want to configure IntelliJ IDEA to ...
knorv's user avatar
  • 49.7k
830 votes
32 answers
654k views

How do I add a library project to Android Studio?

How do I add a library project (such as Sherlock ABS) to Android Studio? (Not to the old ADT Eclipse-based bundle, but to the new Android Studio.)
Alexander's user avatar
  • 48.1k
824 votes
22 answers
953k views

How to add local .jar file dependency to build.gradle file?

I have tried to add my local .jar file dependency to my build.gradle file: apply plugin: 'java' sourceSets { main { java { srcDir 'src/model' } } } dependencies { ...
letter Q's user avatar
  • 15.1k
817 votes
11 answers
164k views

Dealing with "Xerces hell" in Java/Maven?

In my office, the mere mention of the word Xerces is enough to incite murderous rage from developers. A cursory glance at the other Xerces questions on SO seem to indicate that almost all Maven users ...
Justin Garrick's user avatar
678 votes
7 answers
779k views

How to install a specific version of package using Composer?

I am trying to install a specific version of a package using Composer. I tried composer install and composer require but they are installing the latest version of the package. What if I want an older ...
gdaras's user avatar
  • 9,909
449 votes
14 answers
162k views

Does it make sense to use Require.js with Angular.js? [closed]

I'm a newbie to Angular.js and trying to understand how it's different from Backbone.js... We used to manage our packages dependencies with Require.js while using Backbone. Does it make sense to do ...
Franck's user avatar
  • 4,565
277 votes
7 answers
68k views

What do square brackets mean in pip install?

I see more and more commands like this: $ pip install "splinter[django]" What do these square brackets do?
Babken Vardanyan's user avatar
200 votes
7 answers
97k views

How to find/remove unused dependencies in Gradle

I wanted to find unused dependencies in my project. Is there a feature for this in Gradle, like in Maven?
Alexander Bezrodniy's user avatar
197 votes
5 answers
93k views

Easy way to have Homebrew list all package dependencies

Is there anyway to have the command brew show all the installed or optional dependencies for any given package? It would also be helpful to see which of the install packages are themselves the ...
oliver's user avatar
  • 2,723
197 votes
13 answers
352k views

Force re-download of release dependency using Maven

I'm working on a project with dependency X. X, in turn, depends on Y. I used to explicitly include Y in my project's pom. However, it was not used and to make things cleaner, I instead added it to X'...
volni's user avatar
  • 5,286
168 votes
5 answers
133k views

Maven equivalent for python [closed]

I'm a java developer/python beginner, and I'm missing my maven features, particularly dependency management and build automation (I mean you don't build, but how to create a package for deployment?) ...
Enno Shioji's user avatar
  • 26.7k
163 votes
8 answers
222k views

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": { ...
HappyDeveloper's user avatar
163 votes
6 answers
785k views

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 = ...
Hunain Usman's user avatar
  • 2,178
151 votes
6 answers
432k views

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 ...
Riley Lark's user avatar
  • 20.8k
149 votes
5 answers
89k views

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 ...
limboy's user avatar
  • 4,039
137 votes
3 answers
86k views

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 ...
shrewdbeans's user avatar
  • 12.3k
127 votes
10 answers
57k views

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 <dependencyManagement> section of the parent POM, and reference that dependency from child modules without ...
Stanislav Bashkyrtsev's user avatar
114 votes
12 answers
75k views

Maven-like dependency management for C++? [closed]

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 ...
weberste's user avatar
  • 1,884
111 votes
4 answers
168k views

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 ...
HappyDeveloper's user avatar
107 votes
1 answer
51k views

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

What is the meaning of "bundle" e.g in this dependency: <dependency> <groupId>org.apache.abdera</groupId> <artifactId>abdera-core</artifactId> <version>...
Zeemee's user avatar
  • 10.7k
102 votes
10 answers
232k views

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 ...
Cherry's user avatar
  • 32.8k
102 votes
5 answers
37k views

dependencyManagement and scope

I usually put a <dependencyManagement> section in parent-project/pom.xml. This <dependencyManagement> section contains declaration and version for all dependencies of my children modules ...
ben75's user avatar
  • 29.6k
99 votes
9 answers
71k views

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 ...
George R's user avatar
  • 3,824
96 votes
16 answers
46k views

How can I manage client-side JavaScript dependencies? [closed]

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. ...
pathikrit's user avatar
  • 33.4k
96 votes
5 answers
105k views

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 <artifactId> the difference are in tags <classifier>sources</classifier> <classifier>...
pushya's user avatar
  • 4,388
90 votes
2 answers
37k views

When to use "optional" dependencies and when to use "provided" scope?

Dependencies decorated by <optional>true</optional> or <scope>provided</scope> will be ignored when they are dependent transitively. I have read this, and my understanding is ...
qining.shi's user avatar
89 votes
11 answers
88k views

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: <properties> <spring.version>...
Rodrigo Sasaki's user avatar
87 votes
7 answers
82k views

How can I version bump all my dependencies?

Having yarn outdated is quite informative but I'd like to avoid running over package by package doing yarn upgrade. From yarn's documentation, just yarn upgrade without arguments is said to upgrade ...
tutuca's user avatar
  • 3,613
86 votes
9 answers
70k views

Gradle Test Dependency

I have two projects, project A and Project B. Both are written in groovy and use gradle as their build system. Project A requires project B. This holds for both the compile and test code. How can ...
Dr. Simon Harrer's user avatar
82 votes
6 answers
127k views

How do I prevent Maven from downloading artifacts every time?

I’m using Maven 3.1.1. In one of my projects, I reference another one of my projects … <dependencies> <dependency> <groupId>org.mainco.subco</groupId> <...
Dave's user avatar
  • 17.2k
81 votes
3 answers
150k views

How to set order of repositories in Maven settings.xml

I have 3 repositories in my settings.xml because I need artifacts from all of them. Whenever a dependency is not found, Maven tries Downloading: http://some.server/mvn2repo/releases/org/apache/lucene/...
Peter Kofler's user avatar
  • 9,390
80 votes
7 answers
23k views

Sort maven dependencies in Eclipse

Just wanted to know if it is possible in Eclipse to sort Maven dependencies by alphabetical order? It's bothering me to have a list of 200 jars not ordered... :(
Sebastien Lorber's user avatar
79 votes
20 answers
117k views

Correct way to check Java version from BASH script

How can I check whether Java is available (in the PATH or via JAVA_HOME) from a bash script and make sure the version is at least 1.5?
Aaron Digulla's user avatar
78 votes
6 answers
135k views

Do you know the Maven profile for mvnrepository.com?

I am trying to include some dependencies in my Maven project. These dependencies are not available in the default Maven 2 repository http://repo1.maven.org/maven2/. They are available at http://...
user786045's user avatar
  • 2,538
72 votes
12 answers
232k views

LoggerFactory is not a Logback LoggerContext but Logback is on the classpath

I think some module in spring-boot-starter-security is conflict with log4j, but I don't know which one. my gradle dependence is as following: compile("org.springframework.boot:spring-boot-starter-...
newbie's user avatar
  • 1,317
72 votes
1 answer
59k views

How to specify a classifier in a gradle dependency's dependency?

Say I want to add guice-assistedinject as a dependency in my project. It specifies the guice artifact as a dependency itself. How do I tell it to use the no_aop version of guice? I know I can do the ...
jgrowl's user avatar
  • 2,167
70 votes
9 answers
91k views

Gradle: Override transitive dependency by version classifier

One of the dependencies declared in my project has a transitive dependency on 'com.google.guava:guava:15.0'. But my application deployed on WAS/Weblogic doesn't work due to a CDI issue which has been ...
dinup24's user avatar
  • 1,722
66 votes
4 answers
34k views

How to check pom.xml for updated dependencies

I am fairly new to Maven and pom.xml. Is there a way I can find out which of my dependencies that are outdated, so that I can update version numbers in my pom.xml. In other languages, for instance, ...
Jesper Rønn-Jensen's user avatar
62 votes
2 answers
51k views

How to install / update package with pipenv without updating the rest of packages?

With pipenv, how do I add or update only one package without changing versions of other packages? I've tried both: pipenv update --selective-upgrade requests and pipenv update --keep-outdated ...
jozo's user avatar
  • 4,612
59 votes
4 answers
29k views

What is CocoaPods?

What is CocoaPods? I've seen that a lot of developers have been using Pods when developing apps to install APIs, but I'm not grasping why you couldn't just import the files manually. What is their ...
James's user avatar
  • 765
58 votes
2 answers
22k views

How to resolve NuGet dependency hell

I develop a library with some functional named CompanyName.SDK which must be integrated in company project CompanyName.SomeSolution CompanyName.SDK.dll must be deployed via NuGet package. And ...
v.karbovnichy's user avatar
57 votes
2 answers
32k views

In a Maven multi-module project, how can I disable a plugin in one child?

I have a maven multi-module project (boy, I've written that opening way too many times on this site). Almost all the modules (that is, the ones that have code in them) should run the maven-site-...
Coderer's user avatar
  • 26.8k
56 votes
7 answers
23k views

How can I make Heroku install devDependencies?

I would like to have Heroku build my app after I push it so that I don't have to push the build folder up every time I make a change. However Heroku only installs the dependencies from the package....
ionox0's user avatar
  • 1,101
55 votes
4 answers
63k views

Missing artifact com.sun.jdmk:jmxtools:jar:1.2.1

I have created simple project from maven-achetype-quickstart under Eclipse Indigo, then I went to pom.xml gui editor and in dependencies tab added dependency log4j by search in appropriate dialog. Now ...
Suzan Cioc's user avatar
  • 29.8k

1
2 3 4 5
61