{"id":22462510,"url":"https://github.com/commonjava/betterdep-maven-plugin","last_synced_at":"2025-07-17T09:37:29.478Z","repository":{"id":11944937,"uuid":"14514995","full_name":"Commonjava/betterdep-maven-plugin","owner":"Commonjava","description":"A better alternative to maven-dependency-plugin","archived":false,"fork":false,"pushed_at":"2016-06-16T12:50:51.000Z","size":111,"stargazers_count":4,"open_issues_count":5,"forks_count":2,"subscribers_count":9,"default_branch":"master","last_synced_at":"2024-04-17T09:39:59.292Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Commonjava.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-11-19T05:17:33.000Z","updated_at":"2017-07-17T12:43:56.000Z","dependencies_parsed_at":"2022-09-17T05:51:58.134Z","dependency_job_id":null,"html_url":"https://github.com/Commonjava/betterdep-maven-plugin","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Commonjava%2Fbetterdep-maven-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Commonjava%2Fbetterdep-maven-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Commonjava%2Fbetterdep-maven-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Commonjava%2Fbetterdep-maven-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Commonjava","download_url":"https://codeload.github.com/Commonjava/betterdep-maven-plugin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228439515,"owners_count":17920025,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-06T09:10:02.885Z","updated_at":"2024-12-06T09:10:46.731Z","avatar_url":"https://github.com/Commonjava.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!-- Freeki metadata. Do not remove this section!\nTITLE: README\n--\u003e\n#Betterdep Plugin for Apache Maven\n\nThis plugin's initial goal was to produce better, more complete and reliable output for `tree` and `list` type diagnostics than the Maven Dependency Plugin (hence the name 'betterdep'). It does this using an alternative set of dependency graphing APIs, which also enable it to provide even more information about the project's depgraph. \n\nCurrently, it supplies five goals:\n\n* `tree`\n* `list`\n* `paths`\n* `downlog`\n* `diff`\n\nIn addition, none of these goals requires a current project to operate. This means you can use the `-Dfrom=\"g:a:v[, g:a:v]\"` command-line parameter to print information about the dependency graph for any project that you can resolve from a repository. If you are working in a project directory, simply leave off the `from` parameter and betterdep will use `${reactorProjects}` instead (the current set of projects being built).\n\n## Goal: `tree`\n\nThis goal prints the dependency graph formatted into tree-style output, much the same way `dependency:tree` works. \n\nOne big improvement is the inclusion of BOMs and parent POMs referenced within the dependency graph, which gives a more complete view of the total list of GAVs required for a given project. These extra POMs are labeled with their usage, as are optional dependencies. \n\nFor dependencies that cannot be resolved, the old `dependency:tree` goal would fail with an error. Instead, `betterdep:tree` prints a sub-tree format of '???' is given and the GAV is labeled as **NOT-RESOLVED**, much like the following:\n\n    [...]\n    org.foo:bar:1.2.3 [NOT-RESOLVED]\n      ???\n    commons-lang:commons-lang:2.5\n    [...]\n\n## Goal: `list`\n\nThis goal prints all GAVs referenced in the project's dependency graph, formatted as a de-duplicated, sorted list. \n\nAs with `tree` above, BOMs and parent POMs are included and annotated.\n\n## Goal: `paths`\n\nHave you ever had problems with a missing artifact in your build, but had no idea where the artifact was referenced...where that dependency was coming from? This goal is designed to answer that question. The invocation takes the form:\n\n    mvn betterdep:paths -Dto=org.foo:bar:1.2.3\n\n**or**\n\n    mvn betterdep:paths -Dfrom=org.myproj:project:1.0 -Dto=org.foo:bar:1.2.3\n\nWhen it executes, the `paths` goal resolves the dependency graph for the `from` project (or the current project(s) you're building). Having done that, it filters the graph for only those paths leading from the root project(s) to your designated `to` GAV(s). If you want to find paths to/from multiple GAVs, you can comma-separate them on the command line.\n\nThe command and its output looks like this:\n\n    $ mvn betterdep:paths \\\n            -Dfrom=org.commonjava.aprox.wars:aprox-savant:0.9.1 \n            -Dto=org.commonjava.maven.atlas:atlas-identities:0.9.6\n\n    [...]\n    [INFO] Found 9 paths:\n    \n    org.commonjava.aprox.wars:aprox-savant:0.9.1\n      org.commonjava.aprox:aprox-depgraph:jar:0.9.1\n        org.commonjava.maven.cartographer:cartographer:jar:0.3.4.1\n          org.commonjava.maven.atlas:atlas-identities:jar:0.9.6\n    org.commonjava.aprox.wars:aprox-savant:0.9.1\n      org.commonjava.aprox:aprox-depgraph:jar:0.9.1\n        org.commonjava.maven.galley:galley-maven:jar:0.3.3.1\n          org.commonjava.maven.atlas:atlas-identities:jar:0.9.6\n    org.commonjava.aprox.wars:aprox-savant:0.9.1\n      org.commonjava.aprox:aprox-core:jar:0.9.1\n        org.commonjava.aprox:aprox-subsys-http:jar:0.9.1\n          org.commonjava.maven.galley:galley-transport-httpclient:jar:0.3.3.1\n            org.commonjava.maven.atlas:atlas-identities:jar:0.9.6\n\n## Goal: `downlog`\n\nThe use case for this goal is a bit more obscure. In order to setup cleanroom build environments for Maven builds, some organizations have taken to parsing the captured console output from Maven builds in order to find the `Downloading...` lines, then using these as input URLs to an artifact downloader that can be used to seed the new environment.\n\nHowever, running a full Maven build just to get the console output can be a pain, especially if there are a lot of tests or environment-specific configurations. The `downlog` goal resolves one or more projects' dependency graphs, then outputs the list of GAVs formatted as if it were a very condensed Maven build log...with the URL to each POM, jar, and other artifact preceded by `Downloading: `. Not only does this allow the you to avoid building the project, but you don't even have to have a copy of the project source code!\n\nThe command and its output look like this:\n\n    $ mvn betterdep:downlog -Dfrom=org.commonjava.maven.atlas:atlas-driver-neo4j:0.9.6\n\n    [...]\n    Downloading: http://localhost:9080/aprox/api/1.0/group/public/antlr/antlr/2.7.2/antlr-2.7.2-sources.jar\n    Downloading: http://localhost:9080/aprox/api/1.0/group/public/antlr/antlr/2.7.2/antlr-2.7.2-sources.jar.md5\n    Downloading: http://localhost:9080/aprox/api/1.0/group/public/antlr/antlr/2.7.2/antlr-2.7.2-sources.jar.sha1\n    Downloading: http://localhost:9080/aprox/api/1.0/group/public/antlr/antlr/2.7.2/antlr-2.7.2.jar\n    Downloading: http://localhost:9080/aprox/api/1.0/group/public/antlr/antlr/2.7.2/antlr-2.7.2.jar.md5\n    Downloading: http://localhost:9080/aprox/api/1.0/group/public/antlr/antlr/2.7.2/antlr-2.7.2.jar.sha1\n    Downloading: http://localhost:9080/aprox/api/1.0/group/public/antlr/antlr/2.7.2/antlr-2.7.2.pom\n    Downloading: http://localhost:9080/aprox/api/1.0/group/public/antlr/antlr/2.7.2/antlr-2.7.2.pom.md5\n    Downloading: http://localhost:9080/aprox/api/1.0/group/public/antlr/antlr/2.7.2/antlr-2.7.2.pom.sha1\n    Downloading: http://localhost:9080/aprox/api/1.0/group/public/ch/qos/logback/logback-classic/0.9.30/logback-classic-0.9.30-javadoc.jar\n    Downloading: http://localhost:9080/aprox/api/1.0/group/public/ch/qos/logback/logback-classic/0.9.30/logback-classic-0.9.30-javadoc.jar.md5\n    Downloading: http://localhost:9080/aprox/api/1.0/group/public/ch/qos/logback/logback-classic/0.9.30/logback-classic-0.9.30-javadoc.jar.sha1\n    Downloading: http://localhost:9080/aprox/api/1.0/group/public/ch/qos/logback/logback-classic/0.9.30/logback-classic-0.9.30-sources.jar\n    Downloading: http://localhost:9080/aprox/api/1.0/group/public/ch/qos/logback/logback-classic/0.9.30/logback-classic-0.9.30-sources.jar.md5\n    Downloading: http://localhost:9080/aprox/api/1.0/group/public/ch/qos/logback/logback-classic/0.9.30/logback-classic-0.9.30-sources.jar.sha1\n    Downloading: http://localhost:9080/aprox/api/1.0/group/public/ch/qos/logback/logback-classic/0.9.30/logback-classic-0.9.30.jar\n    Downloading: http://localhost:9080/aprox/api/1.0/group/public/ch/qos/logback/logback-classic/0.9.30/logback-classic-0.9.30.jar.md5\n    Downloading: http://localhost:9080/aprox/api/1.0/group/public/ch/qos/logback/logback-classic/0.9.30/logback-classic-0.9.30.jar.sha1\n    Downloading: http://localhost:9080/aprox/api/1.0/group/public/ch/qos/logback/logback-classic/0.9.30/logback-classic-0.9.30.pom\n    Downloading: http://localhost:9080/aprox/api/1.0/group/public/ch/qos/logback/logback-classic/0.9.30/logback-classic-0.9.30.pom.md5\n    Downloading: http://localhost:9080/aprox/api/1.0/group/public/ch/qos/logback/logback-classic/0.9.30/logback-classic-0.9.30.pom.sha1\n    [...]\n\n**NOTE:** It's often much more useful to capture this output in a file, using the `-Doutput=output-file.txt` parameter (which is available on all of these goals).\n\n## Goal: `diff`\n\nHave you ever wanted to figure out what changed in the dependency graph between versions of a project?\n\nNow you can.\n\nThis goal currently has three output formats for additions and deletions in the dependency graph:\n\n* `full` - Print the full relationship that has changed. This includes at minimum a relationship type, declaring GAV, and target GAV (artifact, normally). For things like dependencies, it also includes the managed flag, scope, type, classifier, excludes, and any other relevant type-specific metadata.\n* `brief` - Print only the form `declaring-GAV -\u003e target-GAV[TC]` (where TC is type and classifier)\n* `targets` - Print only the target GAV[TC] for each changed relationship.\n\nThe command and its output look like this:\n\n    $ mvn betterdep:diff \\\n            -Dfrom=org.commonjava.maven.atlas:atlas-driver-neo4j-embedded:0.9.0 \\\n            -Dto=org.commonjava.maven.atlas:atlas-driver-neo4j-embedded:0.9.6 \\\n            -Dformat=targets\n    [...]\n    [INFO]\n    - org.commonjava.maven.atlas:atlas-drivers-parent:0.9.0\n    - org.commonjava.maven.atlas:atlas-identities:jar:0.9.0\n    - org.commonjava.maven.atlas:atlas-parent:0.9.0\n    - org.commonjava.maven.atlas:atlas-relationships-api:jar:0.9.0\n    - org.commonjava.util:logging:jar:1.1\n    + com.google.code.gson:gson:jar:1.7.2\n    + com.google.code.gson:gson:jar:2.2.2\n    + commons-codec:commons-codec:jar:1.4\n    + commons-lang:commons-lang:jar:2.5\n    + org.apache.commons:commons-parent:12\n    + org.apache.httpcomponents:httpclient:jar:4.1.1\n    + org.apache.httpcomponents:httpcomponents-client:4.1.1\n    + org.apache.httpcomponents:httpcomponents-core:4.1\n    + org.apache.httpcomponents:httpcore:jar:4.1\n    + org.apache.httpcomponents:project:4.1.1\n    + org.apache:apache:4\n    + org.commonjava.boms:web-commons-bom:pom:7\n    + org.commonjava.maven.atlas:atlas-drivers-parent:0.9.6\n    + org.commonjava.maven.atlas:atlas-identities:jar:0.9.6\n    + org.commonjava.maven.atlas:atlas-parent:0.9.6\n    + org.commonjava.maven.atlas:atlas-relationships-api:jar:0.9.6\n    + org.commonjava.util:logging:jar:1.2\n    + org.commonjava.util:logging:jar:1.3.1\n    + org.commonjava.web:json-serialization:jar:0.5\n    + org.commonjava.web:json-tools:0.5\n    + org.commonjava:commonjava:2\n    + org.jboss.arquillian:arquillian-bom:pom:1.0.1.Final\n    + org.jboss.shrinkwrap.descriptors:shrinkwrap-descriptors-bom:pom:2.0.0-alpha-3\n    + org.jboss.shrinkwrap.resolver:shrinkwrap-resolver-bom:pom:1.0.0-beta-7\n    + org.jboss.shrinkwrap:shrinkwrap-bom:pom:1.0.1\n    + org.sonatype.oss:oss-parent:5\n\nFuture plans for this will likely include better tree-style formatting to help understand where things are changing in the dependency graph. For now, it may be useful to use this output in conjunction with `betterdep:tree` to see where changed artifacts fit into the overall graph.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcommonjava%2Fbetterdep-maven-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcommonjava%2Fbetterdep-maven-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcommonjava%2Fbetterdep-maven-plugin/lists"}