ArchUnit
ArchUnit copied to clipboard
Add support for packages and components in puml files
It makes sense to use packages or components as the items that define the allowed dependencies that are checked with the adhereToPlantUmlDiagram method (see documentation).
This PR changes the allowed syntax so that the following examples are valid input definitions for adhereToPlantUmlDiagram:
@startuml
component "Web API" <<..web>> as web
component "Use Cases" <<..usecase>> as usecase
component "Persistence" <<..persistence>> as persistence
web --> usecase
usecase --> persistence
@enduml
@startuml
package "Web API" <<..web>> as web
package "Use Cases" <<..usecase>> as usecase
package "Persistence" <<..persistence>> as persistence
web --> usecase
usecase --> persistence
@enduml
Note: to keep the regexp simple, the format component name without quotation marks is not supported yet, so you always need to specify the name as component "name"