maven-dependency-plugin

Display omitted versions in maven dependency:tree?

百般思念 提交于 2019-11-27 14:46:56
In Eclipse, when I go to the Maven Dependency Hierarchy page, I get output that states what conflicts caused versions to be omitted: However, if I use dependency:tree , that's omitted and I only see the evrsions which are actually used: | +- commons-httpclient:commons-httpclient:jar:3.1:compile | +- commons-codec:commons-codec:jar:1.4:compile | +- commons-io:commons-io:jar:2.4:compile | +- commons-net:commons-net:jar:3.1:compile | +- javax.servlet:servlet-api:jar:2.5:compile And later on the actually referenced versions... +- commons-collections:commons-collections:jar:3.1:compile Is there any

Force re-download of release dependency using Maven

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-27 06:10:57
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's pom as a dependency. X is marked as a release dependency. The problem is that after removing Y from my project's pom and adding it to X's pom, my project isn't picking it up on mvn -U clean package . I know -U update snapshots but not releases. So, without deleting the ~/.m2/repository directory how can I force a re-download of X's pom? Also, I tried running dependency:purge-local-repository and

Maven: how to export project with sources and dependencies

霸气de小男生 提交于 2019-11-26 22:54:18
问题 I have Maven project with dependencies in repo and stuff. I want to "export" its sources with all dependencies so that I can successfully open it in IDE without Maven running on a machine. When packaging project into war file, it has all dependencies packed with it. So I want to have all that dependencies plus my sources gathered in one place, which can be opened with IDE (Eclipse or IDEA) all those libraries detected? 回答1: Try maven-dependency-plugin with goal copy-dependencies <project> [..

Display omitted versions in maven dependency:tree?

扶醉桌前 提交于 2019-11-26 16:53:58
问题 In Eclipse, when I go to the Maven Dependency Hierarchy page, I get output that states what conflicts caused versions to be omitted: However, if I use dependency:tree, that's omitted and I only see the evrsions which are actually used: | +- commons-httpclient:commons-httpclient:jar:3.1:compile | +- commons-codec:commons-codec:jar:1.4:compile | +- commons-io:commons-io:jar:2.4:compile | +- commons-net:commons-net:jar:3.1:compile | +- javax.servlet:servlet-api:jar:2.5:compile And later on the

Eclipse : Maven search dependencies doesn&#39;t work

一曲冷凌霜 提交于 2019-11-26 14:54:28
I created a new simple Maven project in a new Workspace. When I open the pom.xml 's Dependencies view in Eclipse editor, and I choose Add.. dependency, there's no search results no matter what search criteria I input in the search fields: It instantly give me, for example, Results for 'spring' (0) . In my other workspace, with my existing projects I don't have this problem. Is there a way to fix that ? Xiujun Ma Eclipse artifact searching depends on repository's index file. It seems you did not download the index file. Go to Window -> Prefrences -> Maven and check "Download repository index

Maven WAR dependency

点点圈 提交于 2019-11-26 14:15:19
I am writing a project for acceptance testing and for various reasons this is dependent on another project which is packaged as a WAR. I have managed to unpack the WAR using the maven-dependency-plugin, but I cannot get my project to include the unpacked WEB-INF/lib/*.jar and WEB-INF/classes/* to be included on the classpath so the build fails. Is there a way to include these files into the classpath, or is there a better way of depending on a WAR? Many thanks. There's another option since maven-war-plugin 2.1-alpha-2. In your WAR project: <plugin> <artifactId>maven-war-plugin</artifactId>

Maven - Depend on assembled zip

孤街醉人 提交于 2019-11-26 10:43:17
问题 I\'m trying to have a Project B pull down (and unpack) a ZIP built by Project A and deployed to a remote repository. The ZIP is created and attached using the maven-assembly-plugin , with packaging type pom : <artifactId>project-a</artifactId> <name>ZIP</name> <description>Used by Project B</description> <packaging>pom</packaging> ... <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-assembly-plugin</artifactId> <executions> <execution> <id>distribution-package</id>

Force re-download of release dependency using Maven

心不动则不痛 提交于 2019-11-26 10:12:44
问题 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\'s pom as a dependency. X is marked as a release dependency. The problem is that after removing Y from my project\'s pom and adding it to X\'s pom, my project isn\'t picking it up on mvn -U clean package . I know -U update snapshots but not releases. So, without deleting the ~/.m2/repository

How to get access to Maven&#39;s dependency hierarchy within a plugin

北城余情 提交于 2019-11-26 09:36:22
问题 In my plugin I need to process the dependency hierarchy and get information (groupId, artifactId, version etc) about each dependency and if it was excluded. What is the best way to do this? 回答1: The dependency plugin has the tree goal that does most of this work. It processes a MavenProject using the DependencyTreeBuilder , this returns a DependencyNode with hierarchical information about the resolved dependencies (and their transitive dependencies). You can copy much of the code directly

Eclipse : Maven search dependencies doesn&#39;t work

瘦欲@ 提交于 2019-11-26 04:05:44
问题 I created a new simple Maven project in a new Workspace. When I open the pom.xml \'s Dependencies view in Eclipse editor, and I choose Add.. dependency, there\'s no search results no matter what search criteria I input in the search fields: It instantly give me, for example, Results for \'spring\' (0) . In my other workspace, with my existing projects I don\'t have this problem. Is there a way to fix that ? 回答1: Eclipse artifact searching depends on repository's index file. It seems you did