dependency-management

How can I use Gradle to just download JARs?

百般思念 提交于 2019-12-22 08:52:22
问题 I have a non-standard project layout. How can I use Gradle to just download a bunch of JAR dependencies into a lib directory, under the same directory where build.gradle is? For now, I don't need it to do anything else. Here is what I have so far: apply plugin: "java" repositories { mavenCentral() } buildDir = "." libsDirName = "lib" dependencies { runtime group: "...", name: "...", version: "..." } If I run gradle build , it builds an empty JAR file in the lib directory, instead of

How to exclude specific dependencies from spring-boot-starter-parent

孤者浪人 提交于 2019-12-21 20:25:31
问题 I am using a legacy Spring application and want to migrate to Spring Boot. My intention is to use the spring-boot-starter-data-jpa . For this reason I have added following section in pom.xml (which manages all spring-boot-dependencies ): <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>2.0.3.RELEASE</version> </parent> But this is screwing up certain dependencies which I need to retain for time being. I am currently using

How to use directory containing third party bundles in a Tycho build

走远了吗. 提交于 2019-12-21 07:56:03
问题 In the past, we had our bundles and features on the file system and made them available in Eclipse through a target definition file with a 'Directory' location. In this way, it was easy to use them with the Export wizards in Eclipse. Now I'm trying to build an eclipse-plugin with Tycho which has third party dependencies, e.g. javax.vecmath and org.apache.commons.math . From what I know, the best way to obtain the dependencies in a Tycho build is through a p2 repository. So I'm using one for

How to Avoid Coupling with an IoC Container

二次信任 提交于 2019-12-21 05:03:29
问题 I'm in the process of developing an extensible framework using DI and IoC. Users must be able override existing functionality within the framework by dropping their own implementations into the container. How can I allow users to do this without requiring them to know which IoC container I am using? My current half-way solution is to structure my assemblies as follows: 1) Define abstract assemblies containing only interfaces. 2) Define concrete assemblies which implement these interfaces.

Change maven dependency for artifact using classifier

五迷三道 提交于 2019-12-21 04:15:53
问题 With the maven jar plugin I build two jar: bar-1.0.0.jar and bar-1.0.0-client.jar. Actually in my POM I have the following dependency: <dependency> <groupId>de.app.test</groupId> <artifactId>foo</artifactId> <version>1.0.0</version> </dependency> This artifact exist also in two version bar-1.0.0.jar and bar-1.0.0-client.jar I want to make bar-1.0.0-client.jar dependent of foo-1.0.0-client.jar and bar-1.0.0.jar dependent of foo-1.0.0.jar . ================ ->First (wrong) solution: define the

Dependency management for SLF4J and Logback

跟風遠走 提交于 2019-12-21 03:49:13
问题 I'd like to start using SLF4J with Logback. I read over Logback's online documentation and am now ready to add the JARs to my repo and try it out. But I'm at a loss! What JARs do I need? I downloaded that latest SLF4J (1.7.5) and expected to see something like slf4j-logback.jar , but don't see anything of the sorts. I've read that Logback contains a "native implementation" of SLF4J, but don't know exactly what this means, or if it also implies that I don't even need slf4j-api-1.7.5.jar on the

Exclude unused parts of dependencies from jar (Maven)

只谈情不闲聊 提交于 2019-12-21 03:32:35
问题 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? 回答1: 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

Add a compile time only sub-project dependency in sbt

怎甘沉沦 提交于 2019-12-21 02:34:08
问题 I have a multi-project contains a private macro sub-project which's usage is limited to implement method body of other sub-projects. Neither should it be on the runtime classpath of other sub-projects, nor should it be visible in any form in the published POM of other sub-projects. So that other sbt project could use library from this project without knowing the macro sub-project. For external dependency, I found this SO Q&A works perfectly, but for sub-project when I trying to do the similar

Find hidden dependencies in Ivy

99封情书 提交于 2019-12-20 14:10:03
问题 I'm using Apache Ivy + IvyDE for getting my project's dependencies, which are: <dependency org="com.google.guava" name="guava" rev="r08" /> <!-- logging --> <dependency org="org.slf4j" name="jcl-over-slf4j" rev="1.6.1" /> <dependency org="ch.qos.logback" name="logback-classic" rev="0.9.27" /> <!-- database --> <dependency org="org.hibernate" name="hibernate-entitymanager" rev="3.6.2.Final" /> <dependency org="org.hibernate" name="hibernate-validator" rev="4.1.0.Final" /> <dependency org="org

Include JAXB using Maven

前提是你 提交于 2019-12-20 12:15:46
问题 Working on my 1.6.0_16 JDK, I generated my stub classes from a WSDL using Apache CXF 2.5.2, which uses the most recent jaxb-api 2.2. I know it's possible to have it use jaxb-api 2.1, but in order to avoid compatibility issues, I would rather have it use the current version. Since my JDK features jaxb 2.1, the build fails with the following message: error at @XmlElementRef(name = "protocol", namespace = "urn:ch.beo.emc", type = JAXBElement.class, required = false) Therefore, I tried to make