maven-dependency-plugin

Why does dependency:list -DincludeScope=compile lists compile scope for transitive dependencies of test scope items

本秂侑毒 提交于 2020-01-15 03:12:42
问题 Should "mvn dependency:list -DincludeScope=compile" include child dependencies of test scope deps? My project depends on "org.apache.httpcomponents:httpclient:jar:4.1: test " and httpclient depends on "org.apache.httpcomponents:httpcore:jar:4.1: compile " If I look at compile scope dependencies, I do not expect to see anything below httpclient since it is test scope and that branch of dependencies should be filtered out. However, the following includes core" lists httpcore mvn dependency:list

Maven plugin output to recourse file using filtering

雨燕双飞 提交于 2020-01-06 07:24:10
问题 I have resource file containing: ${project.version} ${dependency.tree} Is it possible to replace (filtering) ${dependency.tree} property with mvn dependency:tree -Dincludes=com.foo.bar command output ? 回答1: No easy way out here, but I think it's possible. I'd do it this way: Bind dependency plugin goal tree execution to generate-resources phase and configure it to output everything to some file ( outputFile option, see here). Use gmaven plugin to load this file into a dependency.tree property

What does purge-local-repository actually purge?

扶醉桌前 提交于 2020-01-01 08:50:31
问题 I am running the following command from within a maven project directory: mvn dependency:purge-local-repository What is the expected behavior? Will it delete (and re-download?) all the dependencies already existing in my local repo for that particular project (i.e. whose directory I am in) or will it delete all the contents of my local repo? 回答1: By default, purge-local-repository will remove from the local repository all the files associated to the version of each dependency (including

Gradle equivalent of maven-dependency-plugin

大憨熊 提交于 2020-01-01 02:34:18
问题 My root problem is that when running "spring-test"-based tests for my controllers and Freemarker views I need to have all taglibs inside WEB-INF/lib folder - otherwise freemarker will not find them during tests. I solved this issue with the following piece of maven configuration. It actually copies taglibs jars to src/main/webapp/WEB-INF/lib folder before running tests. I don't want to clear this folder since the problem is the same when running this test for the IDE. <plugin> <groupId>org

What is Maven dependency:purge-local-repository supposed to do?

烂漫一生 提交于 2019-12-24 02:18:15
问题 I'm trying to purge the local repository of a project dependency before launching releasing it in order to make sure every dependency required is on the central repository and is downloaded from it. In the project folder (containing the pom.xml), I launch the following command: mvn clean dependency:purge-local-repository -DreResolve=false -Dverbose=true The project's POM is very simple and just have a declared dependency to junit:junit:3.8.1 The command's output give me: [INFO] Scanning for

Maven Integration with Query DSL

痞子三分冷 提交于 2019-12-22 16:58:46
问题 I am trying to integrate an existing project in maven with query dsl I have added the dependencies as below ` <dependency> <groupId>com.mysema.querydsl</groupId> <artifactId>querydsl-apt</artifactId> <version>2.5.0</version> <scope>provided</scope> </dependency> <dependency> <groupId>com.mysema.querydsl</groupId> <artifactId>querydsl-jpa</artifactId> <version>2.5.0</version> </dependency> <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-log4j12</artifactId> <version>1.6.1</version>

getting information about maven dependencies

僤鯓⒐⒋嵵緔 提交于 2019-12-22 05:58:10
问题 I wonder if it is possible to get information about all first level dependencies of my maven project. I need the following information: name, vendor, version, license type, reference URL, description. All this information is stored in pom.xml of each package. The problem is that we have hierarchy of about 20 projects that have several hundreds dependencies that are constantly being changed. I know about maven dependency plugin. I ran mvn dependency:list and extracted list of packages using

Maven: Extract dependency resources before test

心不动则不痛 提交于 2019-12-21 12:22:11
问题 I have a multimodule Maven project. One subproject hosts XSL/XML resource files. The other project hosts Java code that needs to use these files in its unit tests. In the dependency's jar, the resources lie in the folder xml-resources . I found this example and tried to change it for my needs: <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-dependency-plugin</artifactId> <version>2.4</version> <executions> <execution> <id>resource-dependencies</id> <phase>process-test

Declare Maven dependency as test runtime only

半城伤御伤魂 提交于 2019-12-20 11:21:41
问题 What is the best way to declare a Maven dependency as only being used for the test runtime (but not test compilation) class path? Specifically, I want slf4j-api (a logging facade) as a typical, compile-scope dependency, but I want slf4j-simple (the barebones implementation suitable for unit tests) only on the test runtime class path (it's not needed for test compilation). I've been doing this: <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-api</artifactId> </dependency>

copy dependencies transitive and not transitive

强颜欢笑 提交于 2019-12-20 03:16:29
问题 In a pom.xml (jar packaging) i want to make use of the maven dependency plugin to download two kinds of dependencies. One kind i want to be downloaded with transitives and one without. Up to now, my plugins section contains follwing element: <plugin> <artifactId>maven-dependency-plugin</artifactId> <version>2.5</version> <executions> <execution> <id>Copy dependencies transitive</id> <phase>initialize</phase> <goals> <goal>copy-dependencies</goal> </goals> <configuration> <excludeTransitive