dependency-management

Downloading Dependences From Private Amazon S3 Repository with Gradle

蓝咒 提交于 2019-12-03 12:48:11
I am looking to add Groovy support to an existing java project so that I can seemlessly compile mixed Java and Groovy code using invokedynamic so that I can get Java-like execution speed without needing to waste excessive amounts of time with verbose Java syntax After reading that the gmaven plugin no longer supports compilation -and that the groovy eclipse compiler plugin doesn't yet support invokedynamic , I asked myself, why would I want to continue using Maven if it compiles Groovy code that is needlessly slow? Consequently, I decided I would try scrapping maven for Gradle so that I could

How can I get a list of my projects dependencies in a flattened form using Gradle?

为君一笑 提交于 2019-12-03 12:32:42
I know that Gradle has the excellent dependencies task that lists out all dependencies for a project. However, it returns them in a tree listing. I would like to get a list of all my dependencies as they are resolved in just a flat list. Similar to how the Maven dependency plugin list goal behaves. Here is a short task that meets that need: task('dependenciesList') << { println "Compile dependencies" def selectedDeps = project.configurations.compile.incoming.resolutionResult.allDependencies.collect { dep -> "${dep.selected}" } selectedDeps.unique().sort().each { println it} } The third line is

is it possible to use apache mahout without hadoop dependency?

萝らか妹 提交于 2019-12-03 10:38:13
Is it possible to use Apache mahout without any dependency to Hadoop. I would like to use the mahout algorithm on a single computer by only including the mahout library inside my Java project but i dont want to use hadoop at all since i will be running on a single node anyway. Is that possible? Yes. Not all of Mahout depends on Hadoop, though much does. If you use a piece that depends on Hadoop, of course, you need Hadoop. But for example there is a substantial recommender engine code base that does not use Hadoop. You can embed a local Hadoop cluster/worker in a Java program. Definitely, yes.

Exclude unused parts of dependencies from jar (Maven)

守給你的承諾、 提交于 2019-12-03 10:37:13
We have a small project with some heavy-weight dependencies (e.g. Spring) of which we only use small parts. Therefore, the JAR we get when packing with all dependencies weighs several megabytes, even for out two-class-server. This seems unnecessary. Is there a way to restrict JAR assembly to actually used (class) files? You can use the maven-shade-plugin to create a Jar-with-dependencies (your project and the dependencies merged into one big jar) while limiting the classes or packages that are added to that jar. See the includes / excludes page for reference. If you don't want to manually

What is the advantage of using CocoaPods?

戏子无情 提交于 2019-12-03 10:33:01
A lot of the pods can be installed "manually" by simply dragging some files to the project. To me, this seems like a more convenient way to install a pod. If I used CocoaPods, I would have to create a PodFile and execute a bunch of commands, add the framework to the "Linked Frameworks and Libraries" section, and rebuild. That seems like a lot of work. Yet CocoaPods is the "recommended" way to install pods. I know that CocoaPods can detect updates for you. But it's not like you open Xcode and a message pops up that says one of your pods is outdated. You have manually use a command to check for

Multiple Dependency Scopes in POM

懵懂的女人 提交于 2019-12-03 10:32:08
问题 I have a dependency in my POM that needs to be set to "provided" so it is not included at compilation, but it can still be referenced within my project. I would like the same dependency to have a scope of "test" when I go to run tests so I do not have to manually add the jar to my classpath. Is there a way to do this or achieve similar results? Reasoning behind this is that I have some common jars that are provided in my JBOSS lib directory, so I want to use these and keep the "provided"

Conflicting cross-version suffixes (sbt, Scala-STM, Play-JSON)

前提是你 提交于 2019-12-03 09:49:05
I am using a JSON extension which relies on Mandubian's play-json 2.2-SNAPSHOT. Everything worked fine until now I have a project based on Scala-STM. sbt reports the following problem: [error] Modules were resolved with conflicting cross-version suffixes in {file:folder}project: [error] org.scala-stm:scala-stm _2.10, _2.10.0 java.lang.RuntimeException: Conflicting cross-version suffixes in: org.scala-stm:scala-stm Is there any chance to dig deeper into where these two "conflicting" versions come from? I am quite surprised that play-json should be depending on scala-stm?! Furthermore, is there

Can I avoid a dependency cycle with one edge being a test dependency?

好久不见. 提交于 2019-12-03 07:43:31
Consider a testCycle parent with modules DummyCore and TestFramework . TestFramework depends on DummyCore , and DummyCore has a test dedepency on TestFramework . Building and testing each module independently maven has no problems. But mvn test the parents testCycle results in: The projects in the reactor contain a cyclic reference: Edge between 'Vertex{label='com.mysimpatico:TestFramework:1.0-SNAPSHOT'}' and 'Vertex{label='org.apache:DummyCore:1.0-SNAPSHOT'}' introduces to cycle in the graph org.apache:DummyCore:1.0-SNAPSHOT --> com.mysimpatico:TestFramework:1.0-SNAPSHOT --> org.apache

Maven/Gradle way to calcuate the total size of a dependency with all its transitive dependencies included

别等时光非礼了梦想. 提交于 2019-12-03 07:41:47
I would like to be able to perform an analysis on each of my project POMs to determine how many bytes each direct dependency introduces to the resulting package based on the sum of all of its transitive dependencies. For example, if dependency A brings in B, C, and D, I would like to be able to see a summary showing A -> total size = (A + B + C + D). Is there an existing Maven or Gradle way to determine this information? Alex Yursha I keep the a small pom.xml template on my workstation to identify heavy-weight dependencies. Assuming you want to see the weight of org.eclipse.jetty:jetty-client

Python any of many dependencies

妖精的绣舞 提交于 2019-12-03 06:47:36
From time to time I come across a situation where I have a package that can depend on either package A or B. For example, my project depends on a package called spam , if this project is renamed to pyspam , my project can either depend on spam or pyspam . I cannot figure out (or find) how I would define such dependencies in setup.py. What is a commonly accepted way to solve this? EDIT: I would like to define the dependencies in setup.py . Something like this: from setuptools import setup setup( name='myproject', install_requires=[ 'spam || pyspam' ] ) You can check to see if the package is