Skip to content

Commit c4f23e6

Browse files
committed
[MAINTENANCE] Visualize dependencies in submodules
1 parent b40b27b commit c4f23e6

File tree

11 files changed

+61
-21
lines changed

11 files changed

+61
-21
lines changed

README.md

+16-9
Original file line numberDiff line numberDiff line change
@@ -32,21 +32,28 @@ The sources are now directly availble in [aries github](https://github.com/apach
3232

3333
Some of the subprojects have their own git repos:
3434

35-
| Subproject |
36-
| ---------- |
37-
| [Aries CDI](https://github.com/apache/aries-cdi) |
38-
| [Aries Component DSL](https://github.com/apache/aries-component-dsl) |
39-
| [Aries Containers](https://github.com/apache/aries-containers) |
35+
| Subproject |
36+
|-----------------------------------------------------------------------------|
37+
| [Aries CDI](https://github.com/apache/aries-cdi) |
38+
| [Aries Component DSL](https://github.com/apache/aries-component-dsl) |
39+
| [Aries Containers](https://github.com/apache/aries-containers) |
4040
| [Aries JAX-RS whiteboard](https://github.com/apache/aries-jax-rs-whiteboard) |
41-
| [Aries JPA](https://github.com/apache/aries-jpa) |
42-
| [Aries RSA](https://github.com/apache/aries-rsa) |
43-
| [Aries Transaction Control](https://github.com/apache/aries-tx-control) |
41+
| [Aries JPA](https://github.com/apache/aries-jpa) |
42+
| [Aries RSA](https://github.com/apache/aries-rsa) |
43+
| [Aries Transaction Control](https://github.com/apache/aries-tx-control) |
44+
| [Aries Typed Event](https://github.com/apache/aries-typedevent) |
4445

4546
## Build
4647

4748
Most projects can be built using
4849

4950
mvn clean install
5051

51-
As the Aries svn hosts a lot of different subprojects it makes sense to only
52+
As the Aries main repository hosts a lot of different subprojects it makes sense to only
5253
build the specific subproject.
54+
55+
## Submodule dependencies visualization
56+
57+
1. Install graphviz (`dot` program is necessary)
58+
2. Run script `./createDependencyGraph.sh SUBMODULE`
59+
3. Graph of dependencies will be generated in `target` directory

blueprint/pom.xml

+1-2
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
<parent>
2525
<groupId>org.apache.aries</groupId>
2626
<artifactId>parent</artifactId>
27-
<version>2.0.1</version>
27+
<version>2.1.2-SNAPSHOT</version>
2828
<relativePath>../parent/pom.xml</relativePath>
2929
</parent>
3030

@@ -59,6 +59,5 @@
5959
<module>examples</module>
6060
<module>itests</module>
6161
</modules>
62-
6362
</project>
6463

createDependencyGraph.sh

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/bin/bash
2+
module=$1
3+
result_file=${module//\//_}
4+
5+
mvn com.github.ferstl:depgraph-maven-plugin:aggregate -DDshowGroupIds -f $module
6+
7+
input_file=$module/target/dependency-graph.dot
8+
9+
# do some cleanup
10+
mkdir -p target
11+
cleared_file=target/${result_file}.dot
12+
cat $input_file | sed "s/:jar:bundle:/:/g" | sed "s/:bundle:/:/g" | sed "s/:jar:/:/g" | sed "s/:provided\"/\"/g" | sed "s/:compile\"/\"/g" | sed "s/:test\"/\"/g" > $cleared_file
13+
14+
dest_file=target/${result_file}.png
15+
dot -Tpng $cleared_file -o $dest_file
16+
17+
echo "Image generated in $dest_file"

ejb/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
<parent>
2525
<groupId>org.apache.aries</groupId>
2626
<artifactId>parent</artifactId>
27-
<version>2.0.0</version>
27+
<version>2.1.2-SNAPSHOT</version>
2828
<relativePath>../parent/pom.xml</relativePath>
2929
</parent>
3030

jmx/pom.xml

+4-4
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@
2222
<modelVersion>4.0.0</modelVersion>
2323

2424
<parent>
25-
<groupId>org.apache.aries.jmx</groupId>
26-
<artifactId>org.apache.aries.jmx.parent</artifactId>
27-
<version>1.1.6-SNAPSHOT</version>
28-
<relativePath>jmx-parent</relativePath>
25+
<groupId>org.apache.aries</groupId>
26+
<artifactId>parent</artifactId>
27+
<version>2.1.2-SNAPSHOT</version>
28+
<relativePath>../parent/pom.xml</relativePath>
2929
</parent>
3030

3131
<groupId>org.apache.aries.jmx</groupId>

jndi/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
<parent>
2525
<groupId>org.apache.aries</groupId>
2626
<artifactId>parent</artifactId>
27-
<version>2.0.1</version>
27+
<version>2.1.2-SNAPSHOT</version>
2828
<relativePath>../parent/pom.xml</relativePath>
2929
</parent>
3030

parent/pom.xml

+17
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,7 @@
211211
<maven-paxexam-plugin.version>1.2.4</maven-paxexam-plugin.version>
212212
<org.apache.aries.versioning.plugin.version>0.3.0</org.apache.aries.versioning.plugin.version>
213213
<animal-sniffer-enforcer-rule.version>1.6</animal-sniffer-enforcer-rule.version>
214+
<depgraph-maven-plugin.version>4.0.3</depgraph-maven-plugin.version>
214215

215216
<!--Other-->
216217
<java.source.version>8</java.source.version>
@@ -432,6 +433,22 @@
432433
<oldArtifact>${project.groupId}:${project.artifactId}:${lastReleaseVersion}</oldArtifact>
433434
</configuration>
434435
</plugin>
436+
<plugin>
437+
<groupId>com.github.ferstl</groupId>
438+
<artifactId>depgraph-maven-plugin</artifactId>
439+
<version>${depgraph-maven-plugin.version}</version>
440+
<configuration>
441+
<excludes>
442+
<exclude>*:*test*</exclude>
443+
</excludes>
444+
<showGroupIds>true</showGroupIds>
445+
<scopes>
446+
<scope>compile</scope>
447+
<scope>provided</scope>
448+
<scope>sources</scope>
449+
</scopes>
450+
</configuration>
451+
</plugin>
435452
</plugins>
436453
</pluginManagement>
437454
<plugins>

proxy/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
<parent>
2525
<groupId>org.apache.aries</groupId>
2626
<artifactId>parent</artifactId>
27-
<version>2.0.0</version>
27+
<version>2.1.2-SNAPSHOT</version>
2828
<relativePath>../parent/pom.xml</relativePath>
2929
</parent>
3030

subsystem/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
<parent>
2525
<groupId>org.apache.aries</groupId>
2626
<artifactId>parent</artifactId>
27-
<version>2.0.0</version>
27+
<version>2.1.2-SNAPSHOT</version>
2828
<relativePath>../parent/pom.xml</relativePath>
2929
</parent>
3030

transaction/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
<parent>
2525
<groupId>org.apache.aries</groupId>
2626
<artifactId>parent</artifactId>
27-
<version>2.0.0</version>
27+
<version>2.1.2-SNAPSHOT</version>
2828
<relativePath>../parent/pom.xml</relativePath>
2929
</parent>
3030

web/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
<parent>
2525
<groupId>org.apache.aries</groupId>
2626
<artifactId>parent</artifactId>
27-
<version>2.0.0</version>
27+
<version>2.1.2-SNAPSHOT</version>
2828
<relativePath>../parent/pom.xml</relativePath>
2929
</parent>
3030

0 commit comments

Comments
 (0)