-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathjakarta-ee-dependencies.xml
139 lines (129 loc) · 5.75 KB
/
jakarta-ee-dependencies.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
<jqassistant-rules xmlns="http://schema.jqassistant.org/rule/v1.11" >
<group id="jakarta-ee-dependencies">
<includeConcept refId="jakarta-ee-dependencies:*"/>
</group>
<concept id="jakarta-ee-dependencies:ArtifactDependencies">
<description>Propagates dependencies declared by Pom descriptor to artifacts.</description>
<cypher><![CDATA[
MATCH
(pom:Effective:Pom),
(pom)-[:DESCRIBES]->(artifact:Artifact),
(pom)-[:DECLARES_DEPENDENCY]->(dependency:Dependency)-[:TO_ARTIFACT]->(dependencyArtifact:Artifact)
CALL {
WITH
artifact, dependency, dependencyArtifact
MERGE
(artifact)-[dependsOn:DEPENDS_ON]->(dependencyArtifact)
SET
dependsOn.scope = dependency.scope,
dependsOn.optional = dependency.optional
} IN TRANSACTIONS
RETURN
count(*) as `Artifact Dependencies`
]]></cypher>
<verify>
<aggregation />
</verify>
</concept>
<concept id="jakarta-ee-dependencies:ArtifactLastModifiedAsString" severity="info">
<description>Converts the lastModified timestamp attribute of Artifacts to a String representation (for GraphML reports).</description>
<cypher><![CDATA[
MATCH
(artifact:Artifact)
WHERE
artifact.lastModified is not null
SET
artifact.lastModificationTime = toString(datetime({epochMillis:artifact.lastModified}))
REMOVE
artifact.lastModified
RETURN
count(artifact)
]]></cypher>
<verify>
<aggregation />
</verify>
</concept>
<concept id="jakarta-ee-dependencies:PlatformArtifact">
<requiresConcept refId="jakarta-ee-dependencies:ArtifactDependencies" />
<requiresConcept refId="jakarta-ee-dependencies:ArtifactLastModifiedAsString" />
<requiresParameter name="platformArtifact" type="String" />
<description>Creates reports about dependencies as GraphML file and PlantUML component diagram.</description>
<cypher><![CDATA[
MATCH
(platform:Artifact)
WHERE
platform.fqn = $platformArtifact
SET
platform:Platform
RETURN
platform as `Platform Artifact`
]]></cypher>
</concept>
<concept id="jakarta-ee-dependencies:PlatformDependencyDiagram">
<requiresConcept refId="jakarta-ee-dependencies:ArtifactDependencies" />
<requiresConcept refId="jakarta-ee-dependencies:ArtifactLastModifiedAsString" />
<requiresConcept refId="jakarta-ee-dependencies:PlatformArtifact" />
<description>Creates reports about dependencies as GraphML file and PlantUML component diagram.</description>
<cypher><![CDATA[
MATCH
(platform:Platform:Artifact)-[d:DEPENDS_ON*]->(dependency:Artifact)
RETURN
*
]]></cypher>
<report type="graphml,plantuml-component-diagram" />
</concept>
<concept id="jakarta-ee-dependencies:PlatformDependencyVersionsByArtifact">
<requiresConcept refId="jakarta-ee-dependencies:ArtifactDependencies" />
<requiresConcept refId="jakarta-ee-dependencies:PlatformArtifact" />
<description>Creates a CSV report about dependency versions.</description>
<cypher><![CDATA[
MATCH
(platform:Platform:Artifact)-[d:DEPENDS_ON*]->(dependency:Artifact)
WITH
dependency.group as GroupId, dependency.name as ArtifactId, dependency.version as Version
ORDER BY
GroupId, ArtifactId, Version
RETURN
GroupId, ArtifactId, collect(distinct Version) as Versions
]]></cypher>
<report type="csv" />
</concept>
<concept id="jakarta-ee-dependencies:Specification">
<requiresConcept refId="jakarta-ee-dependencies:ArtifactDependencies" />
<description>Creates a `Specification` per unique groupId/artifactId and associates the artifacts, i.e. `(:Specification)-[:CONTAINS_ARTIFACT]->(:Artifact)`.</description>
<cypher><![CDATA[
MATCH
shortestPath((:Platform:Artifact)-[:DEPENDS_ON*0..]->(artifact:Artifact))
MERGE
(specification:Specification {name: artifact.name})
MERGE
(specification)-[:CONTAINS_ARTIFACT]->(artifact)
RETURN
count(*)
]]></cypher>
<verify>
<aggregation />
</verify>
</concept>
<concept id="jakarta-ee-dependencies:SpecificationDependencyDiagram">
<requiresConcept refId="jakarta-ee-dependencies:Specification" />
<requiresConcept refId="jakarta-ee-dependencies:ArtifactLastModifiedAsString" />
<requiresConcept refId="jakarta-ee-dependencies:PlatformArtifact" />
<description>Creates reports about dependencies between specifications as GraphML file and PlantUML component diagram.</description>
<cypher><![CDATA[
MATCH
(platform:Platform:Artifact)-[dependsOn:DEPENDS_ON*0..]->(dependency:Artifact),
(specification:Specification)-[:CONTAINS_ARTIFACT]->(dependency)
WITH
specification, collect(dependency) as dependencies, collect(dependsOn) as dependsOn
RETURN
{
role : "graph",
parent: specification,
nodes: dependencies,
relationships: dependsOn
}
]]></cypher>
<report type="graphml,plantuml-component-diagram" />
</concept>
</jqassistant-rules>