https://github.com/zeroone3010/deptree2html
A Node.js project to help you view your Maven dependencies in a nice HTML format.
https://github.com/zeroone3010/deptree2html
maven-dependency-reporting
Last synced: 10 months ago
JSON representation
A Node.js project to help you view your Maven dependencies in a nice HTML format.
- Host: GitHub
- URL: https://github.com/zeroone3010/deptree2html
- Owner: ZeroOne3010
- License: mit
- Created: 2023-10-17T06:17:59.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2023-11-08T15:47:27.000Z (over 2 years ago)
- Last Synced: 2023-11-08T16:44:42.698Z (over 2 years ago)
- Topics: maven-dependency-reporting
- Language: JavaScript
- Homepage:
- Size: 9.77 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Maven Dependency Viewer
Easily visualize your Maven project dependencies as an HTML file with links the Maven Repository.
Also includes an application to check for the latest versions of all of your dependencies and to list them in the
output.
## Prerequisites
* Node.js
* Maven
## Installation
Copy [depstree2html.js](depstree2html.js) for yourself, then run the following commands:
```shell
# Make the JavaScript file executable
chmod +x depstree2html.js
# Move it to a directory in your PATH:
sudo mv depstree2html.js /usr/local/bin/depstree2html
```
## Usage
To generate an HTML file with your Maven dependencies, navigate to your Maven project directory and run:
```shell
mvn dependency:tree | depstree2html > deps.html
```
To exclude specific packages from being linked, use the `--ignore-packages` option followed by a comma-separated list of
package prefixes to ignore. For example:
```shell
mvn dependency:tree | depstree2html --ignore-packages org.acme,com.example > deps.html
```
This will generate deps.html without linking dependencies that start with `org.acme` or `com.example`.
Finally, open **deps.html** in your browser to view the dependencies.
### Viewing the latest versions of your dependencies
To find out the latest version of each dependency, run the `depstree-latest-version-checker.js` script.
It will take approximately a minute to query each hundred dependencies, and in the end the latest version of each
dependency will be written to `latestVersions.json`. When you have this file in the directory where you then run
`depstree2html`, the results will be amended with info about the latest versions. Note that you should also use the
`--ignore-packages` option with `depstree-latest-version-checker.js`.
## Development
When making changes to the HTML output, remember to validate the resulting file: `tidy -q -e deps.html`.