You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by hb...@apache.org on 2025/11/15 22:57:14 UTC
(maven) 01/01: improve dependency graph rendering
This is an automated email from the ASF dual-hosted git repository.
hboutemy pushed a commit to branch graph
in repository https://gitbox.apache.org/repos/asf/maven.git
commit ed51065fd36e71bace8f55751192ae374da8b20a
Author: Hervé Boutemy <hb...@apache.org>
AuthorDate: Sat Nov 15 23:57:00 2025 +0100
improve dependency graph rendering
---
pom.xml | 2 +-
src/graph/ReactorGraph.java | 7 ++++---
src/site/xdoc/index.xml | 2 +-
3 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/pom.xml b/pom.xml
index b67cc79d57..13f7f20c3d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -108,7 +108,7 @@ under the License.
<scm>
<connection>scm:git:https://gitbox.apache.org/repos/asf/maven.git</connection>
<developerConnection>scm:git:https://gitbox.apache.org/repos/asf/maven.git</developerConnection>
- <tag>maven-4.0.0-rc-1</tag>
+ <tag>master</tag>
<url>https://github.com/apache/maven/tree/${project.scm.tag}</url>
</scm>
<issueManagement>
diff --git a/src/graph/ReactorGraph.java b/src/graph/ReactorGraph.java
index cb5fea8bca..91bcf33725 100755
--- a/src/graph/ReactorGraph.java
+++ b/src/graph/ReactorGraph.java
@@ -1,5 +1,5 @@
///usr/bin/env jbang "$0" "$@" ; exit $?
-//JAVA 14+
+//JAVA 17+
//DEPS guru.nidi:graphviz-java:0.18.1
/*
* Licensed to the Apache Software Foundation (ASF) under one
@@ -56,7 +56,7 @@ public class ReactorGraph {
public static void main(String[] args) {
try {
- // Parse DOT file
+ // Parse DOT file generated by org.fusesource.mvnplugins:maven-graph-plugin:reactor
MutableGraph originalGraph = new Parser().read(new File("target/graph/reactor-graph.dot"));
// Create final graph
@@ -161,7 +161,7 @@ public static void main(String[] args) {
Graphviz.fromGraph(highLevelGraph)
.engine(Engine.DOT)
.render(Format.SVG).toFile(new File("target/site/images/maven-deps.svg"));
- System.out.println("High-level graph rendered to high_level_graph.svg");
+ System.out.println("High-level graph rendered to maven-deps.svg");
} catch (IOException e) {
e.printStackTrace();
@@ -173,6 +173,7 @@ private static MutableGraph generateHighLevelGraph(MutableGraph clusteredGraph,
MutableGraph highLevelGraph = mutGraph("HighLevelGraph").setDirected(true);
highLevelGraph.graphAttrs().add(GraphAttr.COMPOUND);
highLevelGraph.graphAttrs().add(Label.of("High-Level Reactor Graph"));
+ highLevelGraph.nodeAttrs().add("fontname", "Arial");
Map<String, MutableNode> highLevelNodes = new HashMap<>();
diff --git a/src/site/xdoc/index.xml b/src/site/xdoc/index.xml
index e4bee30148..58bac2eeb9 100644
--- a/src/site/xdoc/index.xml
+++ b/src/site/xdoc/index.xml
@@ -42,7 +42,7 @@ under the License.
<p>Learn more about <a href="configuring.html">configuring Maven</a> and <a href="maven-configuration.html">Maven's configuration</a>.</p>
<p>
- <object data="images/maven-deps.svg" width="968" height="605"></object>
+ <object data="images/maven-deps.svg"></object>
</p>
</section>