github.com/ouraigua/jenkins-library@v0.0.0-20231028010029-fbeaf2f3aa9b/pkg/maven/settingsXML.go (about) 1 package maven 2 3 import ( 4 "encoding/xml" 5 ) 6 7 type Server struct { 8 ID string `xml:"id,omitempty"` 9 Username string `xml:"username,omitempty"` 10 Password string `xml:"password,omitempty"` 11 PrivateKey string `xml:"privateKey,omitempty"` 12 Passphrase string `xml:"passphrase,omitempty"` 13 FilePermissions string `xml:"filePermissions,omitempty"` 14 DirectoryPermissions string `xml:"directoryPermissions,omitempty"` 15 Configuration string `xml:"configuration,omitempty"` 16 } 17 18 type ServersType struct { 19 ServerType []Server `xml:"server,omitempty"` 20 } 21 22 type ActiveProfilesType struct { 23 XMLName xml.Name `xml:"activeProfiles"` 24 Text string `xml:",chardata"` 25 ActiveProfile []string `xml:"activeProfile"` 26 } 27 28 type Settings struct { 29 XMLName xml.Name `xml:"http://maven.apache.org/SETTINGS/1.0.0 settings"` 30 Text string `xml:",chardata"` 31 // Xmlns xml.Attr `xml:"xmlns,attr"` 32 //Xmlns string `xml:"xmlns,attr"` 33 Xsi string `xml:"xmlns:xsi,attr"` 34 SchemaLocation string `xml:"xsi:schemaLocation,attr"` 35 LocalRepository string `xml:"localRepository,omitempty"` 36 InteractiveMode string `xml:"interactiveMode,omitempty"` 37 Offline string `xml:"offline,omitempty"` 38 PluginGroups struct { 39 Text string `xml:",chardata"` 40 PluginGroup string `xml:"pluginGroup,omitempty"` 41 } `xml:"pluginGroups,omitempty"` 42 Servers ServersType `xml:"servers,omitempty"` 43 Mirrors struct { 44 Text string `xml:",chardata"` 45 Mirror []struct { 46 Text string `xml:",chardata"` 47 ID string `xml:"id,omitempty"` 48 Name string `xml:"name,omitempty"` 49 URL string `xml:"url,omitempty"` 50 MirrorOf string `xml:"mirrorOf,omitempty"` 51 } `xml:"mirror,omitempty"` 52 } `xml:"mirrors,omitempty"` 53 Proxies struct { 54 Text string `xml:",chardata"` 55 Proxy []struct { 56 Text string `xml:",chardata"` 57 ID string `xml:"id,omitempty"` 58 Active string `xml:"active,omitempty"` 59 Protocol string `xml:"protocol,omitempty"` 60 Host string `xml:"host,omitempty"` 61 Port string `xml:"port,omitempty"` 62 Username string `xml:"username,omitempty"` 63 Password string `xml:"password,omitempty"` 64 NonProxyHosts string `xml:"nonProxyHosts,omitempty"` 65 } `xml:"proxy,omitempty"` 66 } `xml:"proxies,omitempty"` 67 Profiles struct { 68 Text string `xml:",chardata"` 69 Profile []struct { 70 Text string `xml:",chardata"` 71 ID string `xml:"id,omitempty"` 72 // Activation struct { 73 // Text string `xml:",chardata"` 74 // ActiveByDefault string `xml:"activeByDefault,omitempty"` 75 // Jdk string `xml:"jdk,omitempty"` 76 // Os struct { 77 // Text string `xml:",chardata"` 78 // Name string `xml:"name,omitempty"` 79 // Family string `xml:"family,omitempty"` 80 // Arch string `xml:"arch,omitempty"` 81 // Version string `xml:"version,omitempty"` 82 // } `xml:"os,omitempty"` 83 // Property struct { 84 // Text string `xml:",chardata"` 85 // Name string `xml:"name,omitempty"` 86 // Value string `xml:"value,omitempty"` 87 // } `xml:"property,omitempty"` 88 // File struct { 89 // Text string `xml:",chardata"` 90 // Exists string `xml:"exists,omitempty"` 91 // Missing string `xml:"missing,omitempty"` 92 // } `xml:"file,omitempty"` 93 // } `xml:"activation,omitempty"` 94 Repositories struct { 95 Text string `xml:",chardata"` 96 Repository []struct { 97 Text string `xml:",chardata"` 98 ID string `xml:"id,omitempty"` 99 Name string `xml:"name,omitempty"` 100 Releases struct { 101 Text string `xml:",chardata"` 102 Enabled string `xml:"enabled,omitempty"` 103 UpdatePolicy string `xml:"updatePolicy,omitempty"` 104 ChecksumPolicy string `xml:"checksumPolicy,omitempty"` 105 } `xml:"releases,omitempty"` 106 Snapshots struct { 107 Text string `xml:",chardata"` 108 Enabled string `xml:"enabled,omitempty"` 109 UpdatePolicy string `xml:"updatePolicy,omitempty"` 110 ChecksumPolicy string `xml:"checksumPolicy,omitempty"` 111 } `xml:"snapshots,omitempty"` 112 URL string `xml:"url,omitempty"` 113 Layout string `xml:"layout,omitempty"` 114 } `xml:"repository,omitempty"` 115 } `xml:"repositories,omitempty"` 116 PluginRepositories struct { 117 Text string `xml:",chardata"` 118 PluginRepository []struct { 119 Text string `xml:",chardata"` 120 ID string `xml:"id,omitempty"` 121 Name string `xml:"name,omitempty"` 122 Releases struct { 123 Text string `xml:",chardata"` 124 Enabled string `xml:"enabled,omitempty"` 125 } `xml:"releases,omitempty"` 126 Snapshots struct { 127 Text string `xml:",chardata"` 128 Enabled string `xml:"enabled,omitempty"` 129 } `xml:"snapshots,omitempty"` 130 URL string `xml:"url,omitempty"` 131 } `xml:"pluginRepository,omitempty"` 132 } `xml:"pluginRepositories,omitempty"` 133 } `xml:"profile,omitempty"` 134 } `xml:"profiles,omitempty"` 135 ActiveProfiles ActiveProfilesType `xml:"activeProfiles,omitempty"` 136 }