-
Notifications
You must be signed in to change notification settings - Fork 15
/
gopom.go
223 lines (193 loc) · 5.87 KB
/
gopom.go
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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
package gopom
import "encoding/xml"
// https://maven.apache.org/ref/3.6.3/maven-model/maven.html#class_dependency
type Project struct {
XMLName xml.Name `xml:"project"`
ModelVersion string `xml:"modelVersion"`
Parent Parent `xml:"parent"`
GroupID string `xml:"groupId"`
ArtifactID string `xml:"artifactId"`
Version string `xml:"version"`
Packaging string `xml:"packaging"`
Name string `xml:"name"`
Description string `xml:"description"`
URL string `xml:"url"`
InceptionYear string `xml:"inceptionYear"`
Organization Organization `xml:"organization"`
Licenses []License `xml:"licenses"`
Developers []Developer `xml:"developers"`
Contributors []Contributor `xml:"contributors"`
MailingLists []MailingList `xml:"mailingLists"`
Prerequisites Prerequisites `xml:"prerequisites"`
Modules []string `xml:"modules"`
SCM Scm `xml:"scm"`
IssueManagement IssueManagement `xml:"issueManagement"`
CIManagement CIManagement `xml:"ciManagement"`
DependencyManagement DependencyManagement `xml:"dependencyManagement"`
Dependencies []Dependency `xml:"dependencies"`
Repositories []Repository `xml:"repositories"`
PluginRepositories []PluginRepository `xml:"pluginRepositories"`
Build Build `xml:"build"`
Reporting Reporting `xml:"reporting"`
// TODO Profiles
}
type Parent struct {
GroupID string `xml:"groupId"`
ArtifactID string `xml:"artifactId"`
Version string `xml:"version"`
RelativePath string `xml:"relativePath"`
}
type Organization struct {
Name string `xml:"name"`
URL string `xml:"url"`
}
type License struct {
Name string `xml:"name"`
URL string `xml:"url"`
Distribution string `xml:"distribution"`
Comments string `xml:"comments"`
}
type Developer struct {
ID string `xml:"id"`
Name string `xml:"name"`
Email string `xml:"email"`
URL string `xml:"url"`
Organization string `xml:"organization"`
OrganizationURL string `xml:"organizationUrl"`
Roles []string `xml:"roles>role"`
Timezone string `xml:"timezone"`
}
type Contributor struct {
Name string `xml:"name"`
Email string `xml:"email"`
URL string `xml:"url"`
Organization string `xml:"organization"`
OrganizationURL string `xml:"organizationUrl"`
Roles string `xml:"roles>role"`
Timezone string `xml:"timezone"`
}
type MailingList struct {
Name string `xml:"name"`
Subscribe string `xml:"subscribe"`
Unsubscribe string `xml:"unsubscribe"`
Post string `xml:"post"`
Archive string `xml:"archive"`
OtherArchives []string `xml:"otherArchives>otherArchive"`
}
type Prerequisites struct {
Maven string `xml:"maven"`
}
type Scm struct {
Connection string `xml:"connection"`
DeveloperConnection string `xml:"developerConnection"`
Tag string `xml:"tag"`
URL string `xml:"url"`
}
type IssueManagement struct {
System string `xml:"system"`
URL string `xml:"url"`
}
type CIManagement struct {
System string `xml:"system"`
URL string `xml:"url"`
Notifiers []Notifier `xml:"notifiers"`
}
type Notifier struct {
Type string `xml:"type"`
SendOnError bool `xml:"sendOnError"`
SendOnFailure bool `xml:"sendOnFailure"`
SendOnSuccess bool `xml:"sendOnSuccess"`
SendOnWarning bool `xml:"sendOnWarning"`
Address string `xml:"address"`
}
type DependencyManagement struct {
Dependencies []Dependency `xml:"dependencies"`
}
type Dependency struct {
GroupID string `xml:"groupId"`
ArtifactID string `xml:"artifactId"`
Version string `xml:"version"`
Type string `xml:"type"`
Classifier string `xml:"classifier"`
Scope string `xml:"scope"`
SystemPath string `xml:"systemPath"`
Exclusions []Exclusion `xml:"exclusions"`
Optional string `xml:"optional"`
}
type Exclusion struct {
ArtifactID string `xml:"artifactID"`
GroupID string `xml:"groupId"`
}
type Repository struct {
UniqueVersion bool `xml:"uniqueVersion"`
Releases RepositoryPolicy `xml:"releases"`
Snapshots RepositoryPolicy `xml:"snapshots"`
ID string `xml:"id"`
Name string `xml:"name"`
URL string `xml:"URL"`
Layout string `xml:"layout"`
}
type RepositoryPolicy struct {
Enabled string `xml:"enabled"`
UpdatePolicy string `xml:"updatePolicy"`
ChecksumPolicy string `xml:"checksumPolicy"`
}
type PluginRepository struct {
Releases RepositoryPolicy `xml:"releases"`
Snapshots RepositoryPolicy `xml:"snapshots"`
ID string `xml:"id"`
Name string `xml:"name"`
URL string `xml:"URL"`
Layout string `xml:"layout"`
}
type Build struct {
SourceDirectory string `xml:"sourceDirectory"`
ScriptSourceDirectory string `xml:"scriptSourceDirectory"`
TestSourceDirectory string `xml:"testSourceDirectory"`
OutputDirectory string `xml:"outputDirectory"`
TestOutputDirectory string `xml:"testOutputDirectory"`
Extensions []Extension `xml:"extensions"`
DefaultGoal string `xml:"defaultGoal"`
Resources []Resource `xml:"resources"`
TestResource []Resource `xml:"testResources"`
Directory string `xml:"directory"`
FinalName string `xml:"finalName"`
Filters string `xml:"filters>filter"`
PluginManagement PluginManagement `xml:"pluginManagement"`
Plugins []Plugin `xml:"plugins"`
}
type Extension struct {
GroupID string `xml:"groupId"`
ArtifactID string `xml:"ArtifactId"`
Version string `xml:"version"`
}
type Resource struct {
TargetPath string `xml:"targetPath"`
Filtering string `xml:"filtering"`
Directory string `xml:"directory"`
Includes []string `xml:"includes>include"`
Excludes []string `xml:"excludes>exclude"`
}
type PluginManagement struct {
Plugins []Plugin `xml:"plugins"`
}
type Plugin struct {
GroupID string `xml:"groupId"`
ArtifactID string `xml:"artifactId"`
Version string `xml:"version"`
Extensions string `xml:"extensions"`
Executions []PluginExecution `xml:"executions"`
Dependencies []Dependency `xml:"dependencies"`
Inherited string `xml:"inherited"`
}
type PluginExecution struct {
ID string `xml:"id"`
Phase string `xml:"phase"`
Goals []string `xml:"goals>goal"`
Inherited string `xml:"inherited"`
}
type Reporting struct {
ExcludeDefaults string `xml:"excludeDefaults"`
OutputDirectory string `xml:"outputDirectory"`
Plugins []Plugin `xml:"plugins"`
}