Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use puml to generate sources diagrams #482

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions content/xdoc/scm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,22 @@ repo start master --all</pre>
</subsection>

<subsection name="Maven Sources Overview">
<p>
<object type="image/svg+xml" data="maven-sources/site.svg"/>
</p>
<p>
<object type="image/svg+xml" data="maven-sources/core.svg"/>
</p>
<p>
<object type="image/svg+xml" data="maven-sources/plugins.svg"/>
</p>
<p>
<object type="image/svg+xml" data="maven-sources/doxia.svg"/>
</p>
<p>
<object type="image/svg+xml" data="maven-sources/misc.svg"/>
</p>

<p align="center">
<img src="maven-sources.png" width="843" height="837" border="0" usemap="#maven-sources" />
<map name="maven-sources">
Expand Down
43 changes: 43 additions & 0 deletions src/plantuml/maven-sources/core.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/*
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
*/
@startuml
!pragma layout smetana

skinparam rectangle {
BackgroundColor LightBlue
}

package "Maven Core" {
rectangle Maven
rectangle "Core ITs"
rectangle Resolver
rectangle "Ant Tasks"
}

'hidden dependencies to change layout
Maven -[hidden]right-> "Core ITs"
"Core ITs" -[hidden]right-> Resolver
Resolver -[hidden]right-> "Ant Tasks"

url of Maven is [[https://github.com/apache/maven]]
url of "Core ITs" is [[https://github.com/apache/maven-integration-testing]]
url of Resolver is [[https://github.com/apache/maven-resolver]]
url of "Ant Tasks" is [[https://github.com/maven-resolver-ant-tasks]]

@enduml
43 changes: 43 additions & 0 deletions src/plantuml/maven-sources/doxia.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/*
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
*/
@startuml
!pragma layout smetana

skinparam rectangle {
BackgroundColor LightBlue
}

package "Maven Doxia" {
rectangle Doxia
rectangle "Site Tools"
rectangle Site #LightGrey
package Tools {
rectangle Converter
rectangle LinkCheck
}
}

'hidden dependencies to change layout
Doxia -[hidden]right-> "Site Tools"
"Site Tools" -[hidden]right-> Site
"Site Tools" -[hidden]right-> Tools

'url of "Ant Tasks" is [[https://github.com/maven-resolver-ant-tasks]]

@enduml
54 changes: 54 additions & 0 deletions src/plantuml/maven-sources/misc.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
/*
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
*/
@startuml
!pragma layout smetana

skinparam rectangle {
BackgroundColor LightBlue
}

package Misc {
rectangle Archetypes
rectangle Poms
rectangle Skins
rectangle Studies
rectangle Indexer
rectangle Wagon
rectangle "Plugin testing"
rectangle "dist-tool"
package Jenkins {
rectangle env
rectangle lib
}
}

'hidden dependencies to change layout
Archetypes -[hidden]right-> Poms
Poms -[hidden]right-> Skins
Skins -[hidden]right-> Studies
Studies -[hidden]right-> Indexer
Indexer -[hidden]right-> Wagon
Wagon -[hidden]right-> "Plugin testing"

Archetypes -[hidden]down-> "dist-tool"
"dist-tool" -[hidden]right-> Jenkins

'url of "Ant Tasks" is [[https://github.com/maven-resolver-ant-tasks]]

@enduml
116 changes: 116 additions & 0 deletions src/plantuml/maven-sources/plugins.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
/*
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
*/
@startuml
!pragma layout smetana

skinparam rectangle {
BackgroundColor LightBlue
}


package Plugins {

package Core {
rectangle clean
rectangle compiler
rectangle deploy
rectangle install
rectangle resources
rectangle site
rectangle surefire
rectangle verifier
}

package Packaging {
rectangle ear
rectangle ejb
rectangle jar
rectangle rar
rectangle war
rectangle acr
rectangle shade
rectangle source
rectangle jlink
rectangle jmod
}

package Reporting {
rectangle changelog
rectangle changes
rectangle checkstyle
rectangle doap
rectangle javadoc
rectangle jdeps
rectangle jxr
rectangle linkcheck
rectangle pmd
rectangle "project-info-reports"
}

package Tools {
rectangle antrun
rectangle archetype
rectangle assembly
rectangle dependency
rectangle enforcer
rectangle gpg
rectangle help
rectangle invoker
rectangle jarsigner
rectangle jdeprscan
rectangle patch
rectangle pdf
rectangle plugin
rectangle release
rectangle "remote-resource"
rectangle scm
rectangle "scm-publish"
rectangle scripting
rectangle stage
rectangle toolchains
}
}

'hidden dependencies to change layout
Core -[hidden]-> Packaging
Packaging -[hidden]-> Reporting
Reporting -[hidden]-> Tools

clean -[hidden]> compiler
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My PlantUML knowledge is a bit rusty... Is there a difference between -[hidden]-> (as above) and -[hidden]> (here)?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also learn by testing ...https://plantuml.com/component-diagram

By default, links between classes have two dashes -- and are vertically oriented. It is possible to use horizontal link by putting a single dash (or dot) like this:

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From the same page:

It is also possible to change arrow direction by adding left, right, up or down keywords inside the arrow:

How would you feel about using that notation? I feel it might be friendlier to those who aren't so familiar with PlantUML and wish to make changes to this diagram.

compiler -[hidden]> deploy
deploy -[hidden]> install
install -[hidden]> resources
resources -[hidden]> site
site -[hidden]> surefire
surefire -[hidden]> verifier

ear -[hidden]> ejb
ejb -[hidden]> jar
jar -[hidden]> rar
rar -[hidden]> war
war -[hidden]> acr
acr -[hidden]> shade
shade -[hidden]> source
source -[hidden]> jlink
jlink -[hidden]> jmod


url of clean is [[https://github.com/apache/maven-clean-plugin]]

@enduml
28 changes: 28 additions & 0 deletions src/plantuml/maven-sources/site.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/*
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
*/
@startuml
!pragma layout smetana

rectangle Site
rectangle Sources #LightBlue

url of Site is [[https://github.com/apache/maven-site]]
url of Sources is [[https://github.com/apache/maven-sources]]

@enduml