dependency-management

Maven 2 - define dependency version from transitive dependency version

百般思念 提交于 2019-11-29 04:47:24
I'll explain the question with my real situation. I use logback 1.0.1 for logging, and it includes SLF4J 1.6.4 as a dependency. I also use the SLF4J API bridges for legacy logging API's (java.util.logging, log4j and commons-logging), which are not explicit dependencies. These must also (preferrably) be version 1.6.4. Trying to make my pom.xml as neat and error-free as possible, I'd like to enforce that these API bridges be the same version as SLF4J. The only way I know is to manually define them as dependencies in my pom.xml using version 1.6.4. If I ever update logback and the required SLF4J

Specifying Maven dependencies in build.gradle doesn't work

瘦欲@ 提交于 2019-11-29 01:53:05
I tried to add a Maven dependency to my project, which uses Gradle, by adding these lines to the build.gradle file in Android Studio: repositories { mavenCentral() } dependencies { compile files('libs/android-support-v4.jar') compile 'org.roboguice:roboguice:2.0' } The project seems to compile well, but there's no way to reference Roboguice classes inside my project's code. I feel like I'm missing something, namely, how does Gradle download the dependency and where will it store it? How should I fix my project? Using the command line, in the root of your project, run : ./gradlew clean && .

How to override the dependency of an sbt plugin?

江枫思渺然 提交于 2019-11-28 22:53:09
I've written an sbt plugin called sbt-jumi which implements sbt integration for Jumi . Right now the sbt-jumi plugin depends on the current Jumi release. Here is the relevant line from the plugin's build.sbt : libraryDependencies += "fi.jumi" % "jumi-launcher" % "0.5.376" And a user of the plugin would add this to his project/plugins.sbt file: addSbtPlugin("fi.jumi.sbt" % "sbt-jumi" % "0.1.0") Now let's say that Jumi 0.6.400 is released and it's backward compatible. How can a user of the sbt-jumi plugin configure it to use Jumi 0.6.400, without me having to release a new version of the plugin?

How does Maven resolve SNAPSHOT dependencies when there are SNAPSHOTS with different timestamps in the local and the remote repository?

时光总嘲笑我的痴心妄想 提交于 2019-11-28 21:21:44
问题 Say I have a project A in development that depends on project B - which is also currently in development and not yet released. So, in A 's POM file, I have the following section: <dependency> <groupId>com.example</groupId> <artifactId>project-b</artifactId> <version>1.0.0-SNAPSHOT</version> <\dependency> At work, we have a remote repo (Nexus) and a CI box (running Jenkins). When my colleague makes a change to B and commits to SVN, Jenkins will pick that change up, compile it and put it into

Update multiple dependencies with Bower

↘锁芯ラ 提交于 2019-11-28 20:48:14
问题 I listed (and/or installed) several dependencies with Bower inside the bower.json file and/or with bower install https://github.com/username/project.git That worked fine. Now I can list all them with bower list and then I can pick the name of each dependency of my project and run bower update dependency-name Question: How can I bulk update all of them? Or do I have to write a shell script to loop through and update them? 回答1: You can update all by running bower update . Use the -h flag on any

Add a compile time only dependency in sbt

烂漫一生 提交于 2019-11-28 19:29:35
I would like to add a dependency to an sbt project which is only used for compilation. Neither should it be on the runtime class path, nor should it be visible in any form in the published POM. The idea is to add a stub only library ( OrangeExtensions ) so that the project can be compiled on any platform not just OS X. Is it possible like this somehow: libraryDependencies += "com.yuvimasory" % "orange-extensions" % "1.3.0" % ??? ? gourlaysama You can create a custom dependency configuration for this (actually, this is getting so common when you use private macros in your project, I wish SBT

'Provided' dependency in Gradle

只愿长相守 提交于 2019-11-28 18:56:00
I have build.gradle in front of me and there are some dependencies declared as provided but in documentation I do not see this dependency scope. dependencies { compile("org.springframework.boot:spring-boot-starter-web:1.2.4.RELEASE") .... provided 'backport-util-concurrent:backport-util-concurrent:3.1' provided 'org.javolution:javolution:5.5.1@jar .... } Is this provided by a plugin? If so how do I found out which plugin this belongs to? What is the difference between provided and runtime dependency scope in Gradle? What is provided scope? Suppose that a jar is needed to compile your code, but

Interpreting “omitted for conflict” in maven 2 dependency tree

纵然是瞬间 提交于 2019-11-28 18:39:55
问题 This is a dependency tree generated by Maven 2.2.1 with mvn -o dependency:tree -Dverbose -Dincludes=log4j [INFO] [dependency:tree {execution: default-cli}] [INFO] com.openboxes.renderingservice:common:jar:1.0 [INFO] +- org.springframework:spring:jar:2.0.4:compile [INFO] | \- commons-logging:commons-logging:jar:1.1:compile [INFO] | \- log4j:log4j:jar:1.2.12:compile [INFO] \- it.mycompany.portal:server:jar:1.5-SNAPSHOT:compile [INFO] \- org.slf4j:slf4j-log4j12:jar:1.1.0:compile [INFO] \- (log4j

how can I force npm 3 to install nested dependencies?

半世苍凉 提交于 2019-11-28 17:56:39
I just upgraded to npm version 3 and noticed one of the biggest changes it made is that it enforces a flat dependency tree . Your dependencies will now be installed maximally flat. Insofar as is possible, all of your dependencies, and their dependencies, and THEIR dependencies will be installed in your project's node_modules folder with no nesting. You'll only see modules nested underneath one another when two (or more) modules have conflicting dependencies. So for example if package A is dependent on package B , when you npm install A you will get this file structure: --- root/ |--- node

composer.lock: how does it work?

淺唱寂寞╮ 提交于 2019-11-28 17:43:29
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 depends on library A, and library A depends on library B v1.3, project P won't care about the version of library B, and will possibly install B 1.4 instead? What's the point then? Or does it mean the opposite, as one would expect from a dependency manager? naderman Composer dependencies are defined in composer.json . When running composer install for the