diff --git a/Java.Interop.sln b/Java.Interop.sln index 3af4b28fb..1e0239aac 100644 --- a/Java.Interop.sln +++ b/Java.Interop.sln @@ -113,6 +113,9 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Java.Interop.Tools.Expressi EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Java.Interop.Tools.Expressions-Tests", "tests\Java.Interop.Tools.Expressions-Tests\Java.Interop.Tools.Expressions-Tests.csproj", "{211BAA88-66B1-41B2-88B2-530DBD8DF702}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Java.Interop.Tools.Maven", "src\Java.Interop.Tools.Maven\Java.Interop.Tools.Maven.csproj", "{DA458F90-218B-4FE3-995F-AF4B27895FA2}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Java.Interop.Tools.Maven-Tests", "tests\Java.Interop.Tools.Maven-Tests\Java.Interop.Tools.Maven-Tests.csproj", "{6BC04C7F-949E-4F93-BF1F-E3B1DF0B888D}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Hello-NativeAOTFromJNI", "samples\Hello-NativeAOTFromJNI\Hello-NativeAOTFromJNI.csproj", "{8DB3842B-73D7-491C-96F9-EBC863E2C917}" EndProject Global @@ -322,6 +325,14 @@ Global {211BAA88-66B1-41B2-88B2-530DBD8DF702}.Debug|Any CPU.Build.0 = Debug|Any CPU {211BAA88-66B1-41B2-88B2-530DBD8DF702}.Release|Any CPU.ActiveCfg = Release|Any CPU {211BAA88-66B1-41B2-88B2-530DBD8DF702}.Release|Any CPU.Build.0 = Release|Any CPU + {DA458F90-218B-4FE3-995F-AF4B27895FA2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DA458F90-218B-4FE3-995F-AF4B27895FA2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DA458F90-218B-4FE3-995F-AF4B27895FA2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DA458F90-218B-4FE3-995F-AF4B27895FA2}.Release|Any CPU.Build.0 = Release|Any CPU + {6BC04C7F-949E-4F93-BF1F-E3B1DF0B888D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6BC04C7F-949E-4F93-BF1F-E3B1DF0B888D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6BC04C7F-949E-4F93-BF1F-E3B1DF0B888D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6BC04C7F-949E-4F93-BF1F-E3B1DF0B888D}.Release|Any CPU.Build.0 = Release|Any CPU {8DB3842B-73D7-491C-96F9-EBC863E2C917}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8DB3842B-73D7-491C-96F9-EBC863E2C917}.Debug|Any CPU.Build.0 = Debug|Any CPU {8DB3842B-73D7-491C-96F9-EBC863E2C917}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -380,6 +391,8 @@ Global {CB05E11B-B96F-4179-A4E9-5D6BDE29A8FC} = {271C9F30-F679-4793-942B-0D9527CB3E2F} {1A0262FE-3CDB-4AF2-AAD8-65C59524FE8A} = {0998E45F-8BCE-4791-A944-962CD54E2D80} {211BAA88-66B1-41B2-88B2-530DBD8DF702} = {271C9F30-F679-4793-942B-0D9527CB3E2F} + {DA458F90-218B-4FE3-995F-AF4B27895FA2} = {0998E45F-8BCE-4791-A944-962CD54E2D80} + {6BC04C7F-949E-4F93-BF1F-E3B1DF0B888D} = {271C9F30-F679-4793-942B-0D9527CB3E2F} {8DB3842B-73D7-491C-96F9-EBC863E2C917} = {D5A93398-AEB1-49F3-89DC-3904A47DB0C7} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution diff --git a/build-tools/automation/templates/core-tests.yaml b/build-tools/automation/templates/core-tests.yaml index 5c886152b..1763346ec 100644 --- a/build-tools/automation/templates/core-tests.yaml +++ b/build-tools/automation/templates/core-tests.yaml @@ -77,6 +77,14 @@ steps: arguments: bin/Test$(Build.Configuration)$(NetCoreTargetFrameworkPathSuffix)/Xamarin.SourceWriter-Tests.dll continueOnError: true +- task: DotNetCoreCLI@2 + displayName: 'Tests: Java.Interop.Tools.Maven' + inputs: + command: test + testRunTitle: Java.Interop.Tools.Maven (${{ parameters.platformName }}) + arguments: bin/Test$(Build.Configuration)$(NetCoreTargetFrameworkPathSuffix)/Java.Interop.Tools.Maven-Tests.dll + continueOnError: true + - task: DotNetCoreCLI@2 displayName: 'Tests: Java.Interop' condition: or(eq('${{ parameters.runNativeDotnetTests }}', 'true'), eq('${{ parameters.runNativeTests }}', 'true')) diff --git a/src/Java.Interop.Tools.Maven/DefaultProjectResolver.cs b/src/Java.Interop.Tools.Maven/DefaultProjectResolver.cs new file mode 100644 index 000000000..61581ac38 --- /dev/null +++ b/src/Java.Interop.Tools.Maven/DefaultProjectResolver.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; +using Java.Interop.Tools.Maven.Models; + +namespace Java.Interop.Tools.Maven; + +public class DefaultProjectResolver : IProjectResolver +{ + readonly Dictionary poms = new (); + + public void Register (Project project) + { + poms.Add (project.VersionedArtifactString, project); + } + + public virtual Project Resolve (Artifact artifact) + { + if (poms.TryGetValue (artifact.VersionedArtifactString, out var project)) + return project; + + throw new InvalidOperationException ($"No POM registered for {artifact}"); + } +} diff --git a/src/Java.Interop.Tools.Maven/Extensions/PropertyStack.cs b/src/Java.Interop.Tools.Maven/Extensions/PropertyStack.cs new file mode 100644 index 000000000..b5f9b1413 --- /dev/null +++ b/src/Java.Interop.Tools.Maven/Extensions/PropertyStack.cs @@ -0,0 +1,45 @@ +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Xml.Linq; +using Java.Interop.Tools.Maven.Models; + +namespace Java.Interop.Tools.Maven.Extensions; + +class PropertyStack +{ + // Why go to this trouble? + // A property can be specified in both a child POM and its parent POM. + // Even if the property is being consumed in the parent POM, the property in + // the child POM takes precedence. + readonly List>> stack = new (); + + public void Push (ModelProperties? properties) + { + // We add a new list to the stack, even if it's empty, so that the Pop works later + var list = new List> (); + + if (properties?.Any is Collection props) + foreach (var prop in props) + list.Add (new KeyValuePair (prop.Name.LocalName, prop.Value)); + + stack.Add (list); + } + + public void Pop () + { + stack.RemoveAt (stack.Count - 1); + } + + public string Apply (string value) + { + if (stack.Count == 0 || !value.Contains ("${")) + return value; + + foreach (var property_set in stack) { + foreach (var prop in property_set) + value = value.Replace ($"${{{prop.Key}}}", prop.Value); + } + + return value; + } +} diff --git a/src/Java.Interop.Tools.Maven/Extensions/StringExtensions.cs b/src/Java.Interop.Tools.Maven/Extensions/StringExtensions.cs new file mode 100644 index 000000000..7c75975a7 --- /dev/null +++ b/src/Java.Interop.Tools.Maven/Extensions/StringExtensions.cs @@ -0,0 +1,84 @@ +using System.Diagnostics.CodeAnalysis; + +namespace Java.Interop.Tools.Maven.Extensions; + +static class StringExtensions +{ + /// + /// Shortcut for !string.IsNullOrWhiteSpace (s) + /// + public static bool HasValue ([NotNullWhen (true)] this string? s) => !string.IsNullOrWhiteSpace (s); + + /// + /// Shortcut for s ?? string.Empty + /// + public static string OrEmpty (this string? str) => str ?? string.Empty; + + /// + /// Removes the first subset of a delimited string. ("127.0.0.1" -> "0.0.1") + /// + [return: NotNullIfNotNull (nameof (s))] + public static string? ChompFirst (this string? s, char separator) + { + if (!s.HasValue ()) + return s; + + var index = s.IndexOf (separator); + + if (index < 0) + return string.Empty; + + return s.Substring (index + 1); + } + + /// + /// Removes the final subset of a delimited string. ("127.0.0.1" -> "127.0.0") + /// + [return: NotNullIfNotNull (nameof (s))] + public static string? ChompLast (this string? s, char separator) + { + if (!s.HasValue ()) + return s; + + var index = s.LastIndexOf (separator); + + if (index < 0) + return string.Empty; + + return s.Substring (0, index); + } + + /// + /// Returns the first subset of a delimited string. ("127.0.0.1" -> "127") + /// + [return: NotNullIfNotNull (nameof (s))] + public static string? FirstSubset (this string? s, char separator) + { + if (!s.HasValue ()) + return s; + + var index = s.IndexOf (separator); + + if (index < 0) + return s; + + return s.Substring (0, index); + } + + /// + /// Returns the final subset of a delimited string. ("127.0.0.1" -> "1") + /// + [return: NotNullIfNotNull (nameof (s))] + public static string? LastSubset (this string? s, char separator) + { + if (!s.HasValue ()) + return s; + + var index = s.LastIndexOf (separator); + + if (index < 0) + return s; + + return s.Substring (index + 1); + } +} diff --git a/src/Java.Interop.Tools.Maven/IProjectResolver.cs b/src/Java.Interop.Tools.Maven/IProjectResolver.cs new file mode 100644 index 000000000..6e1533ded --- /dev/null +++ b/src/Java.Interop.Tools.Maven/IProjectResolver.cs @@ -0,0 +1,8 @@ +using Java.Interop.Tools.Maven.Models; + +namespace Java.Interop.Tools.Maven; + +public interface IProjectResolver +{ + Project Resolve (Artifact artifact); +} diff --git a/src/Java.Interop.Tools.Maven/Java.Interop.Tools.Maven.csproj b/src/Java.Interop.Tools.Maven/Java.Interop.Tools.Maven.csproj new file mode 100644 index 000000000..fe6539774 --- /dev/null +++ b/src/Java.Interop.Tools.Maven/Java.Interop.Tools.Maven.csproj @@ -0,0 +1,28 @@ + + + + netstandard2.0 + 11.0 + enable + INTERNAL_NULLABLE_ATTRIBUTES + enable + true + ..\..\product.snk + + + + + + $(UtilityOutputFullPath) + + + + + + + + + + + + diff --git a/src/Java.Interop.Tools.Maven/Java.Interop.Tools.Maven.targets b/src/Java.Interop.Tools.Maven/Java.Interop.Tools.Maven.targets new file mode 100644 index 000000000..bda3aae04 --- /dev/null +++ b/src/Java.Interop.Tools.Maven/Java.Interop.Tools.Maven.targets @@ -0,0 +1,42 @@ + + + + + + + + maven-4.0.0.xsd + + + + <_XscgenOpt Include="$(MavenXsd)" /> + <_XscgenOpt Include="--namespace http://maven.apache.org/POM/4.0.0=Java.Interop.Tools.Maven.Models" /> + <_XscgenOpt Include="--typeNameSubstitute T:Model=Project" /> + <_XscgenOpt Include="--nullable" /> + <_XscgenOpt Include="--pcl" /> + <_XscgenOpt Include="--netCore" /> + <_XscgenOpt Include="--nullableReferenceAttributes" /> + <_XscgenOpt Include="-o "Models"" /> + + + + + + + + + + + + + + diff --git a/src/Java.Interop.Tools.Maven/Models/Artifact.cs b/src/Java.Interop.Tools.Maven/Models/Artifact.cs new file mode 100644 index 000000000..0e16d3cfd --- /dev/null +++ b/src/Java.Interop.Tools.Maven/Models/Artifact.cs @@ -0,0 +1,49 @@ +using System; +using System.Diagnostics.CodeAnalysis; + +namespace Java.Interop.Tools.Maven.Models; + +public class Artifact +{ + public string GroupId { get; } + + public string Id { get; } + + public string Version { get; } + + public string ArtifactString => $"{GroupId}:{Id}"; + + // Format should match Project.ArtifactString for comparisons. + public string VersionedArtifactString => $"{GroupId}:{Id}:{Version}"; + + public Artifact (string groupId, string artifactId, string version) + { + Id = artifactId; + GroupId = groupId; + Version = version; + } + + public static Artifact Parse (string value) + { + if (TryParse (value, out var artifact)) + return artifact; + + throw new ArgumentException ($"Invalid artifact format: {value}"); + } + + public static bool TryParse (string value, [NotNullWhen (true)]out Artifact? artifact) + { + artifact = null; + + var parts = value.Split (':'); + + if (parts.Length != 3) + return false; + + artifact = new Artifact (parts [0], parts [1], parts [2]); + + return true; + } + + public override string ToString () => VersionedArtifactString; +} diff --git a/src/Java.Interop.Tools.Maven/Models/Dependency.Partial.cs b/src/Java.Interop.Tools.Maven/Models/Dependency.Partial.cs new file mode 100644 index 000000000..9ee5c918d --- /dev/null +++ b/src/Java.Interop.Tools.Maven/Models/Dependency.Partial.cs @@ -0,0 +1,9 @@ +using Java.Interop.Tools.Maven.Extensions; + +namespace Java.Interop.Tools.Maven.Models; + +public partial class Dependency +{ + public Artifact ToArtifact () + => new Artifact (GroupId.OrEmpty (), ArtifactId.OrEmpty (), Version.OrEmpty ()); +} diff --git a/src/Java.Interop.Tools.Maven/Models/MavenVersion.cs b/src/Java.Interop.Tools.Maven/Models/MavenVersion.cs new file mode 100644 index 000000000..ffeb12911 --- /dev/null +++ b/src/Java.Interop.Tools.Maven/Models/MavenVersion.cs @@ -0,0 +1,140 @@ +using System; +using Java.Interop.Tools.Maven.Extensions; + +namespace Java.Interop.Tools.Maven.Models; + +// https://docs.oracle.com/middleware/1212/core/MAVEN/maven_version.htm#MAVEN8855 +public class MavenVersion : IComparable, IComparable, IEquatable +{ + public string? Major { get; private set; } + public string? Minor { get; private set; } + public string? Patch { get; private set; } + public string RawVersion { get; private set; } + public bool IsValid { get; private set; } = true; + + MavenVersion (string rawVersion) => RawVersion = rawVersion; + + public static MavenVersion Parse (string version) + { + var mv = new MavenVersion (version); + + if (!version.HasValue ()) { + mv.IsValid = false; + return mv; + } + + // We're going to parse through this assuming it's a valid Maven version + mv.Major = version.FirstSubset ('.'); + version = version.ChompFirst ('.'); + + if (!TryParsePart (mv.Major, out var _, out var _)) + mv.IsValid = false; + + if (!version.HasValue ()) + return mv; + + mv.Minor = version.FirstSubset ('.'); + version = version.ChompFirst ('.'); + + if (!TryParsePart (mv.Minor, out var _, out var _)) + mv.IsValid = false; + + if (!version.HasValue ()) + return mv; + + mv.Patch = version.FirstSubset ('.'); + version = version.ChompFirst ('.'); + + if (!TryParsePart (mv.Patch, out var _, out var _)) + mv.IsValid = false; + + if (!version.HasValue ()) + return mv; + + // If there's something left, this is a nonstandard Maven version and all bets are off + mv.IsValid = false; + + return mv; + } + + public int CompareTo (object obj) + { + return CompareTo (obj as MavenVersion); + } + + public int CompareTo (MavenVersion? other) + { + if (other is null) + return 1; + + // If either instance is nonstandard, Maven does a simple string compare + if (!IsValid || !other.IsValid) + return string.Compare (RawVersion, other.RawVersion); + + var major_compare = ComparePart (Major ?? "0", other.Major ?? "0"); + + if (major_compare != 0) + return major_compare; + + var minor_compare = ComparePart (Minor ?? "0", other.Minor ?? "0"); + + if (minor_compare != 0) + return minor_compare; + + return ComparePart (Patch ?? "0", other.Patch ?? "0"); + } + + public bool Equals (MavenVersion other) + { + return CompareTo (other) == 0; + } + + int ComparePart (string a, string b) + { + // Check if they're the same string + if (a == b) + return 0; + + // Don't need to check the return because this shouldn't be called if IsValid = false + TryParsePart (a, out var a_version, out var a_qualifier); + TryParsePart (b, out var b_version, out var b_qualifier); + + // If neither have a qualifier, treat them like numbers + if (a_qualifier is null && b_qualifier is null) + return a_version.CompareTo (b_version); + + // If the numeric versions are different, just use those + if (a_version != b_version) + return a_version.CompareTo (b_version); + + // Identical versions with different qualifier fields are compared by using basic string comparison. + if (a_qualifier is not null && b_qualifier is not null) + return a_qualifier.CompareTo (b_qualifier); + + // All versions with a qualifier are older than the same version without a qualifier (release version). + if (a_qualifier is not null) + return -1; + + return 1; + } + + static bool TryParsePart (string part, out int version, out string? qualifier) + { + // These can look like: + // 1 + // 1-anything + var version_string = part.FirstSubset ('-'); + qualifier = null; + + // The first piece must be a number + if (!int.TryParse (version_string, out version)) + return false; + + part = part.ChompFirst ('-'); + + if (part.HasValue ()) + qualifier = part; + + return true; + } +} diff --git a/src/Java.Interop.Tools.Maven/Models/MavenVersionRange.cs b/src/Java.Interop.Tools.Maven/Models/MavenVersionRange.cs new file mode 100644 index 000000000..083ee8357 --- /dev/null +++ b/src/Java.Interop.Tools.Maven/Models/MavenVersionRange.cs @@ -0,0 +1,127 @@ +using System.Collections.Generic; +using Java.Interop.Tools.Maven.Extensions; + +namespace Java.Interop.Tools.Maven.Models; + +public class MavenVersionRange +{ + public string? MinVersion { get; private set; } + public string? MaxVersion { get; private set; } + public bool IsMinInclusive { get; private set; } = true; + public bool IsMaxInclusive { get; private set; } + public bool HasLowerBound { get; private set; } + public bool HasUpperBound { get; private set; } + + // Adapted from https://github.com/Redth/MavenNet/blob/master/MavenNet/MavenVersionRange.cs + // Original version uses NuGetVersion, which doesn't cover all "valid" Maven version cases + public static IEnumerable Parse (string range) + { + if (!range.HasValue ()) + yield break; + + // Do a pass over the range string to parse out version groups + // eg: (1.0],(1.1,] + var in_group = false; + var current_group = string.Empty; + + foreach (var c in range) { + if (c == '(' || c == '[') { + current_group += c; + in_group = true; + } else if (c == ')' || c == ']' || (!in_group && c == ',')) { + // Don't add the , separating groups + if (in_group) + current_group += c; + + in_group = false; + + if (current_group.HasValue ()) + yield return ParseSingle (current_group); + + current_group = string.Empty; + } else { + current_group += c; + } + } + + if (!string.IsNullOrEmpty (current_group)) + yield return ParseSingle (current_group); + } + + static MavenVersionRange ParseSingle (string range) + { + var mv = new MavenVersionRange (); + + // Check for opening ( or [ + if (range [0] == '(') { + mv.IsMinInclusive = false; + range = range.Substring (1); + } else if (range [0] == '[') { + range = range.Substring (1); + } + + var last = range.Length - 1; + + // Check for closing ) or ] + if (range [last] == ')') { + mv.IsMaxInclusive = false; + range = range.Substring (0, last); + } else if (range [last] == ']') { + mv.IsMaxInclusive = true; + range = range.Substring (0, last); + } + + // Look for a single value + if (!range.Contains (",")) { + mv.MinVersion = range; + mv.HasLowerBound = true; + + // Special case [1.0] + if (mv.IsMinInclusive && mv.IsMaxInclusive) { + mv.MaxVersion = range; + mv.HasUpperBound = true; + } + + return mv; + } + + // Split the 2 values (note either can be empty) + var lower = range.FirstSubset (',').Trim (); + var upper = range.LastSubset (',').Trim (); + + if (lower.HasValue ()) { + mv.MinVersion = lower; + mv.HasLowerBound = true; + } + + if (upper.HasValue ()) { + mv.MaxVersion = upper; + mv.HasUpperBound = true; + } + + return mv; + } + + public bool ContainsVersion (MavenVersion version) + { + if (HasLowerBound) { + var min_version = MavenVersion.Parse (MinVersion!); + + if (IsMinInclusive && version.CompareTo (min_version) < 0) + return false; + else if (!IsMinInclusive && version.CompareTo (min_version) <= 0) + return false; + } + + if (HasUpperBound) { + var max_version = MavenVersion.Parse (MaxVersion!); + + if (IsMaxInclusive && version.CompareTo (max_version) > 0) + return false; + else if (!IsMaxInclusive && version.CompareTo (max_version) >= 0) + return false; + } + + return true; + } +} diff --git a/src/Java.Interop.Tools.Maven/Models/Project.Partial.cs b/src/Java.Interop.Tools.Maven/Models/Project.Partial.cs new file mode 100644 index 000000000..44e7f7aef --- /dev/null +++ b/src/Java.Interop.Tools.Maven/Models/Project.Partial.cs @@ -0,0 +1,55 @@ +using System.Diagnostics.CodeAnalysis; +using System.IO; +using System.Xml; +using System.Xml.Serialization; +using Java.Interop.Tools.Maven.Extensions; + +namespace Java.Interop.Tools.Maven.Models; + +public partial class Project +{ + static readonly XmlSerializer xml_serializer = new (typeof (Project)); + + public static Project Load (Stream stream) + { + using (var xr = new XmlTextReader (stream) { Namespaces = false }) + return Load (xr); + } + + public static Project Load (XmlReader reader) + => (Project) xml_serializer.Deserialize (reader); + + public static Project Parse (string xml) + { + using (var sr = new StringReader (xml)) + using (var xr = new XmlTextReader (sr) { Namespaces = false }) + return Load (xr); + } + + public bool TryGetParentPomArtifact ([NotNullWhen (true)] out Artifact? parent) + { + parent = null; + + if (Parent is not null) { + parent = new Artifact (Parent.GroupId.OrEmpty (), Parent.ArtifactId.OrEmpty (), Parent.Version.OrEmpty ()); + return true; + } + + return false; + } + + public override string ToString () => VersionedArtifactString; + + public string ToXml () + { + var serializer = new XmlSerializer (typeof (Project)); + + using (var sw = new StringWriter ()) { + serializer.Serialize (sw, this); + return sw.ToString (); + } + } + + // Format should match Artifact.VersionedArtifactString for comparisons. + public string VersionedArtifactString => $"{GroupId}:{ArtifactId}:{Version}"; +} diff --git a/src/Java.Interop.Tools.Maven/Models/Project.cs b/src/Java.Interop.Tools.Maven/Models/Project.cs new file mode 100644 index 000000000..5f2359a90 --- /dev/null +++ b/src/Java.Interop.Tools.Maven/Models/Project.cs @@ -0,0 +1,5960 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +// This code was generated by XmlSchemaClassGenerator version 2.1.1057.0 using the following command: +// xscgen maven-4.0.0.xsd --namespace http://maven.apache.org/POM/4.0.0=Java.Interop.Tools.Maven.Models --typeNameSubstitute T:Model=Project --nullable --pcl --netCore --nullableReferenceAttributes -o Models +namespace Java.Interop.Tools.Maven.Models +{ + + + /// + /// 3.0.0+ + /// The <code>&lt;project&gt;</code> element is the root of the descriptor. + /// The following table lists all of the possible child elements. + /// 3.0.0+ + /// The <code>&lt;project&gt;</code> element is the root of the descriptor. + /// The following table lists all of the possible child elements. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("XmlSchemaClassGenerator", "2.1.1057.0")] + [System.Xml.Serialization.XmlTypeAttribute("Model")] + [System.Xml.Serialization.XmlRootAttribute("project")] + public partial class Project + { + + /// + /// 4.0.0+ + /// Declares to which version of project descriptor this POM conforms. + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("modelVersion")] + public string ModelVersion { get; set; } + + /// + /// 4.0.0+ + /// The location of the parent project, if one exists. Values from the parent + /// project will be the default for this project if they are left unspecified. The location + /// is given as a group ID, artifact ID and version. + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("parent")] + public Parent Parent { get; set; } + + /// + /// 3.0.0+ + /// A universally unique identifier for a project. It is normal to + /// use a fully-qualified package name to distinguish it from other + /// projects with a similar name (eg. <code>org.apache.maven</code>). + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("groupId")] + public string GroupId { get; set; } + + /// + /// 3.0.0+ + /// The identifier for this artifact that is unique within the group given by the + /// group ID. An artifact is something that is either produced or used by a project. + /// Examples of artifacts produced by Maven for a project include: JARs, source and binary + /// distributions, and WARs. + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("artifactId")] + public string ArtifactId { get; set; } + + /// + /// 4.0.0+ + /// The current version of the artifact produced by this project. + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("version")] + public string Version { get; set; } + + [System.Xml.Serialization.XmlIgnoreAttribute()] + private string _packaging = "jar"; + + /// + /// 4.0.0+ + /// The type of artifact this project produces, for example <code>jar</code> + /// <code>war</code> + /// <code>ear</code> + /// <code>pom</code>. + /// Plugins can create their own packaging, and + /// therefore their own packaging types, + /// so this list does not contain all possible types. + /// + [System.ComponentModel.DefaultValueAttribute("jar")] + [System.Xml.Serialization.XmlElementAttribute("packaging")] + public string Packaging + { + get + { + return _packaging; + } + set + { + _packaging = value; + } + } + + /// + /// 3.0.0+ + /// The full name of the project. + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("name")] + public string Name { get; set; } + + /// + /// 3.0.0+ + /// A detailed description of the project, used by Maven whenever it needs to + /// describe the project, such as on the web site. While this element can be specified as + /// CDATA to enable the use of HTML tags within the description, it is discouraged to allow + /// plain text representation. If you need to modify the index page of the generated web + /// site, you are able to specify your own instead of adjusting this text. + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("description")] + public string Description { get; set; } + + /// + /// 3.0.0+ + /// The URL to the project's homepage. + /// <br><b>Default value is</b>: parent value [+ path adjustment] + (artifactId or project.directory property), or just parent value if + /// project's <code>child.project.url.inherit.append.path="false"</code> + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("url")] + public string Url { get; set; } + + /// + /// 3.0.0+ + /// The year of the project's inception, specified with 4 digits. This value is + /// used when generating copyright notices as well as being informational. + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("inceptionYear")] + public string InceptionYear { get; set; } + + /// + /// 3.0.0+ + /// This element describes various attributes of the organization to which the + /// project belongs. These attributes are utilized when documentation is created (for + /// copyright notices and links). + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("organization")] + public Organization Organization { get; set; } + + [System.Xml.Serialization.XmlIgnoreAttribute()] + private System.Collections.ObjectModel.Collection _licenses; + + /// + /// 3.0.0+ + /// This element describes all of the licenses for this project. + /// Each license is described by a <code>license</code> element, which + /// is then described by additional elements. + /// Projects should only list the license(s) that applies to the project + /// and not the licenses that apply to dependencies. + /// If multiple licenses are listed, it is assumed that the user can select + /// any of them, not that they must accept all. + /// + [System.Xml.Serialization.XmlArrayAttribute("licenses")] + [System.Xml.Serialization.XmlArrayItemAttribute("license")] + public System.Collections.ObjectModel.Collection Licenses + { + get + { + return _licenses; + } + private set + { + _licenses = value; + } + } + + /// + /// Gets a value indicating whether the Licenses collection is empty. + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool LicensesSpecified + { + get + { + return (this.Licenses.Count != 0); + } + } + + /// + /// Initializes a new instance of the class. + /// + public Project() + { + this._licenses = new System.Collections.ObjectModel.Collection(); + this._developers = new System.Collections.ObjectModel.Collection(); + this._contributors = new System.Collections.ObjectModel.Collection(); + this._mailingLists = new System.Collections.ObjectModel.Collection(); + this._modules = new System.Collections.ObjectModel.Collection(); + this._dependencies = new System.Collections.ObjectModel.Collection(); + this._repositories = new System.Collections.ObjectModel.Collection(); + this._pluginRepositories = new System.Collections.ObjectModel.Collection(); + this._profiles = new System.Collections.ObjectModel.Collection(); + } + + [System.Xml.Serialization.XmlIgnoreAttribute()] + private System.Collections.ObjectModel.Collection _developers; + + /// + /// 3.0.0+ + /// Describes the committers of a project. + /// + [System.Xml.Serialization.XmlArrayAttribute("developers")] + [System.Xml.Serialization.XmlArrayItemAttribute("developer")] + public System.Collections.ObjectModel.Collection Developers + { + get + { + return _developers; + } + private set + { + _developers = value; + } + } + + /// + /// Gets a value indicating whether the Developers collection is empty. + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool DevelopersSpecified + { + get + { + return (this.Developers.Count != 0); + } + } + + [System.Xml.Serialization.XmlIgnoreAttribute()] + private System.Collections.ObjectModel.Collection _contributors; + + /// + /// 3.0.0+ + /// Describes the contributors to a project that are not yet committers. + /// + [System.Xml.Serialization.XmlArrayAttribute("contributors")] + [System.Xml.Serialization.XmlArrayItemAttribute("contributor")] + public System.Collections.ObjectModel.Collection Contributors + { + get + { + return _contributors; + } + private set + { + _contributors = value; + } + } + + /// + /// Gets a value indicating whether the Contributors collection is empty. + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool ContributorsSpecified + { + get + { + return (this.Contributors.Count != 0); + } + } + + [System.Xml.Serialization.XmlIgnoreAttribute()] + private System.Collections.ObjectModel.Collection _mailingLists; + + /// + /// 3.0.0+ + /// Contains information about a project's mailing lists. + /// + [System.Xml.Serialization.XmlArrayAttribute("mailingLists")] + [System.Xml.Serialization.XmlArrayItemAttribute("mailingList")] + public System.Collections.ObjectModel.Collection MailingLists + { + get + { + return _mailingLists; + } + private set + { + _mailingLists = value; + } + } + + /// + /// Gets a value indicating whether the MailingLists collection is empty. + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool MailingListsSpecified + { + get + { + return (this.MailingLists.Count != 0); + } + } + + /// + /// 4.0.0+ + /// Describes the prerequisites in the build environment for this project. + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("prerequisites")] + public Prerequisites Prerequisites { get; set; } + + [System.Xml.Serialization.XmlIgnoreAttribute()] + private System.Collections.ObjectModel.Collection _modules; + + /// + /// 4.0.0+ + /// The modules (sometimes called subprojects) to build as a part of this + /// project. Each module listed is a relative path to the directory containing the module. + /// To be consistent with the way default urls are calculated from parent, it is recommended + /// to have module names match artifact ids. + /// + [System.Xml.Serialization.XmlArrayAttribute("modules")] + [System.Xml.Serialization.XmlArrayItemAttribute("module")] + public System.Collections.ObjectModel.Collection Modules + { + get + { + return _modules; + } + private set + { + _modules = value; + } + } + + /// + /// Gets a value indicating whether the Modules collection is empty. + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool ModulesSpecified + { + get + { + return (this.Modules.Count != 0); + } + } + + /// + /// 4.0.0+ + /// Specification for the SCM used by the project, such as CVS, Subversion, etc. + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("scm")] + public Scm Scm { get; set; } + + /// + /// 4.0.0+ + /// The project's issue management system information. + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("issueManagement")] + public IssueManagement IssueManagement { get; set; } + + /// + /// 4.0.0+ + /// The project's continuous integration information. + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("ciManagement")] + public CiManagement CiManagement { get; set; } + + /// + /// 4.0.0+ + /// Distribution information for a project that enables deployment of the site + /// and artifacts to remote web servers and repositories respectively. + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("distributionManagement")] + public DistributionManagement DistributionManagement { get; set; } + + /// + /// 4.0.0+ + /// Properties that can be used throughout the POM as a substitution, and + /// are used as filters in resources if enabled. + /// The format is <code>&lt;name&gt;value&lt;/name&gt;</code>. + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("properties")] + public ModelProperties Properties { get; set; } + + /// + /// 4.0.0+ + /// Default dependency information for projects that inherit from this one. The + /// dependencies in this section are not immediately resolved. Instead, when a POM derived + /// from this one declares a dependency described by a matching groupId and artifactId, the + /// version and other values from this section are used for that dependency if they were not + /// already specified. + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("dependencyManagement")] + public DependencyManagement DependencyManagement { get; set; } + + [System.Xml.Serialization.XmlIgnoreAttribute()] + private System.Collections.ObjectModel.Collection _dependencies; + + /// + /// 3.0.0+ + /// This element describes all of the dependencies associated with a + /// project. + /// These dependencies are used to construct a classpath for your + /// project during the build process. They are automatically downloaded from the + /// repositories defined in this project. + /// See <a href="https://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html">the + /// dependency mechanism</a> for more information. + /// + [System.Xml.Serialization.XmlArrayAttribute("dependencies")] + [System.Xml.Serialization.XmlArrayItemAttribute("dependency")] + public System.Collections.ObjectModel.Collection Dependencies + { + get + { + return _dependencies; + } + private set + { + _dependencies = value; + } + } + + /// + /// Gets a value indicating whether the Dependencies collection is empty. + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool DependenciesSpecified + { + get + { + return (this.Dependencies.Count != 0); + } + } + + [System.Xml.Serialization.XmlIgnoreAttribute()] + private System.Collections.ObjectModel.Collection _repositories; + + /// + /// 4.0.0+ + /// The lists of the remote repositories for discovering dependencies and + /// extensions. + /// + [System.Xml.Serialization.XmlArrayAttribute("repositories")] + [System.Xml.Serialization.XmlArrayItemAttribute("repository")] + public System.Collections.ObjectModel.Collection Repositories + { + get + { + return _repositories; + } + private set + { + _repositories = value; + } + } + + /// + /// Gets a value indicating whether the Repositories collection is empty. + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool RepositoriesSpecified + { + get + { + return (this.Repositories.Count != 0); + } + } + + [System.Xml.Serialization.XmlIgnoreAttribute()] + private System.Collections.ObjectModel.Collection _pluginRepositories; + + /// + /// 4.0.0+ + /// The lists of the remote repositories for discovering plugins for builds and + /// reports. + /// + [System.Xml.Serialization.XmlArrayAttribute("pluginRepositories")] + [System.Xml.Serialization.XmlArrayItemAttribute("pluginRepository")] + public System.Collections.ObjectModel.Collection PluginRepositories + { + get + { + return _pluginRepositories; + } + private set + { + _pluginRepositories = value; + } + } + + /// + /// Gets a value indicating whether the PluginRepositories collection is empty. + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool PluginRepositoriesSpecified + { + get + { + return (this.PluginRepositories.Count != 0); + } + } + + /// + /// 3.0.0+ + /// Information required to build the project. + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("build")] + public Build Build { get; set; } + + /// + /// 4.0.0+ + /// <b>Deprecated</b>. Now ignored by Maven. + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("reports")] + public ModelReports Reports { get; set; } + + /// + /// 4.0.0+ + /// This element includes the specification of report plugins to use + /// to generate the reports on the Maven-generated site. + /// These reports will be run when a user executes <code>mvn site</code>. + /// All of the reports will be included in the navigation bar for browsing. + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("reporting")] + public Reporting Reporting { get; set; } + + [System.Xml.Serialization.XmlIgnoreAttribute()] + private System.Collections.ObjectModel.Collection _profiles; + + /// + /// 4.0.0+ + /// A listing of project-local build profiles which will modify the build process + /// when activated. + /// + [System.Xml.Serialization.XmlArrayAttribute("profiles")] + [System.Xml.Serialization.XmlArrayItemAttribute("profile")] + public System.Collections.ObjectModel.Collection Profiles + { + get + { + return _profiles; + } + private set + { + _profiles = value; + } + } + + /// + /// Gets a value indicating whether the Profiles collection is empty. + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool ProfilesSpecified + { + get + { + return (this.Profiles.Count != 0); + } + } + + /// + /// 4.0.0+ + /// When children inherit from project's url, append path or not? Note: While the type + /// of this field is <code>String</code> for technical reasons, the semantic type is actually + /// <code>Boolean</code> + /// <br><b>Default value is</b>: <code>true</code> + /// <br><b>Since</b>: Maven 3.6.1 + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlAttributeAttribute("child.project.url.inherit.append.path")] + public string ChildProjectUrlInheritAppendPath { get; set; } + } + + /// + /// 4.0.0+ + /// The <code>&lt;parent&gt;</code> element contains information required to locate the parent project from which + /// this project will inherit from. + /// <strong>Note:</strong> The children of this element are not interpolated and must be given as literal values. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("XmlSchemaClassGenerator", "2.1.1057.0")] + [System.Xml.Serialization.XmlTypeAttribute("Parent")] + public partial class Parent + { + + /// + /// 4.0.0+ + /// The group id of the parent project to inherit from. + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("groupId")] + public string GroupId { get; set; } + + /// + /// 4.0.0+ + /// The artifact id of the parent project to inherit from. + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("artifactId")] + public string ArtifactId { get; set; } + + /// + /// 4.0.0+ + /// The version of the parent project to inherit. + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("version")] + public string Version { get; set; } + + [System.Xml.Serialization.XmlIgnoreAttribute()] + private string _relativePath = "../pom.xml"; + + /// + /// 4.0.0+ + /// The relative path of the parent <code>pom.xml</code> file within the check out. + /// If not specified, it defaults to <code>../pom.xml</code>. + /// Maven looks for the parent POM first in this location on + /// the filesystem, then the local repository, and lastly in the remote repo. + /// <code>relativePath</code> allows you to select a different location, + /// for example when your structure is flat, or deeper without an intermediate parent POM. + /// However, the group ID, artifact ID and version are still required, + /// and must match the file in the location given or it will revert to the repository for the POM. + /// This feature is only for enhancing the development in a local checkout of that project. + /// Set the value to an empty string in case you want to disable the feature and always resolve + /// the parent POM from the repositories. + /// + [System.ComponentModel.DefaultValueAttribute("../pom.xml")] + [System.Xml.Serialization.XmlElementAttribute("relativePath")] + public string RelativePath + { + get + { + return _relativePath; + } + set + { + _relativePath = value; + } + } + } + + /// + /// 3.0.0+ + /// Specifies the organization that produces this project. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("XmlSchemaClassGenerator", "2.1.1057.0")] + [System.Xml.Serialization.XmlTypeAttribute("Organization")] + public partial class Organization + { + + /// + /// 3.0.0+ + /// The full name of the organization. + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("name")] + public string Name { get; set; } + + /// + /// 3.0.0+ + /// The URL to the organization's home page. + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("url")] + public string Url { get; set; } + } + + [System.CodeDom.Compiler.GeneratedCodeAttribute("XmlSchemaClassGenerator", "2.1.1057.0")] + [System.Xml.Serialization.XmlTypeAttribute("ModelLicenses", AnonymousType=true)] + public partial class ModelLicenses + { + + [System.Xml.Serialization.XmlIgnoreAttribute()] + private System.Collections.ObjectModel.Collection _license; + + [System.Xml.Serialization.XmlElementAttribute("license")] + public System.Collections.ObjectModel.Collection License + { + get + { + return _license; + } + private set + { + _license = value; + } + } + + /// + /// Gets a value indicating whether the License collection is empty. + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool LicenseSpecified + { + get + { + return (this.License.Count != 0); + } + } + + /// + /// Initializes a new instance of the class. + /// + public ModelLicenses() + { + this._license = new System.Collections.ObjectModel.Collection(); + } + } + + /// + /// 3.0.0+ + /// Describes the licenses for this project. This is used to generate the license + /// page of the project's web site, as well as being taken into consideration in other reporting + /// and validation. The licenses listed for the project are that of the project itself, and not + /// of dependencies. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("XmlSchemaClassGenerator", "2.1.1057.0")] + [System.Xml.Serialization.XmlTypeAttribute("License")] + public partial class License + { + + /// + /// 3.0.0+ + /// The full legal name of the license. + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("name")] + public string Name { get; set; } + + /// + /// 3.0.0+ + /// The official url for the license text. + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("url")] + public string Url { get; set; } + + /// + /// 3.0.0+ + /// The primary method by which this project may be distributed. + /// <dl> + /// <dt>repo</dt> + /// <dd>may be downloaded from the Maven repository</dd> + /// <dt>manual</dt> + /// <dd>user must manually download and install the dependency.</dd> + /// </dl> + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("distribution")] + public string Distribution { get; set; } + + /// + /// 3.0.0+ + /// Addendum information pertaining to this license. + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("comments")] + public string Comments { get; set; } + } + + [System.CodeDom.Compiler.GeneratedCodeAttribute("XmlSchemaClassGenerator", "2.1.1057.0")] + [System.Xml.Serialization.XmlTypeAttribute("ModelDevelopers", AnonymousType=true)] + public partial class ModelDevelopers + { + + [System.Xml.Serialization.XmlIgnoreAttribute()] + private System.Collections.ObjectModel.Collection _developer; + + [System.Xml.Serialization.XmlElementAttribute("developer")] + public System.Collections.ObjectModel.Collection Developer + { + get + { + return _developer; + } + private set + { + _developer = value; + } + } + + /// + /// Gets a value indicating whether the Developer collection is empty. + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool DeveloperSpecified + { + get + { + return (this.Developer.Count != 0); + } + } + + /// + /// Initializes a new instance of the class. + /// + public ModelDevelopers() + { + this._developer = new System.Collections.ObjectModel.Collection(); + } + } + + /// + /// 3.0.0+ + /// Information about one of the committers on this project. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("XmlSchemaClassGenerator", "2.1.1057.0")] + [System.Xml.Serialization.XmlTypeAttribute("Developer")] + public partial class Developer + { + + /// + /// 3.0.0+ + /// The unique ID of the developer in the SCM. + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("id")] + public string Id { get; set; } + + /// + /// 3.0.0+ + /// The full name of the contributor. + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("name")] + public string Name { get; set; } + + /// + /// 3.0.0+ + /// The email address of the contributor. + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("email")] + public string Email { get; set; } + + /// + /// 3.0.0+ + /// The URL for the homepage of the contributor. + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("url")] + public string Url { get; set; } + + /// + /// 3.0.0+ + /// The organization to which the contributor belongs. + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("organization")] + public string Organization { get; set; } + + /// + /// 3.0.0+ + /// The URL of the organization. + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("organizationUrl")] + public string OrganizationUrl { get; set; } + + [System.Xml.Serialization.XmlIgnoreAttribute()] + private System.Collections.ObjectModel.Collection _roles; + + /// + /// 3.0.0+ + /// The roles the contributor plays in the project. Each role is described by a + /// <code>role</code> element, the body of which is a role name. This can also be used to + /// describe the contribution. + /// + [System.Xml.Serialization.XmlArrayAttribute("roles")] + [System.Xml.Serialization.XmlArrayItemAttribute("role")] + public System.Collections.ObjectModel.Collection Roles + { + get + { + return _roles; + } + private set + { + _roles = value; + } + } + + /// + /// Gets a value indicating whether the Roles collection is empty. + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool RolesSpecified + { + get + { + return (this.Roles.Count != 0); + } + } + + /// + /// Initializes a new instance of the class. + /// + public Developer() + { + this._roles = new System.Collections.ObjectModel.Collection(); + } + + /// + /// 3.0.0+ + /// The timezone the contributor is in. Typically, this is a number in the range + /// <a href="http://en.wikipedia.org/wiki/UTC%E2%88%9212:00">-12</a> to <a href="http://en.wikipedia.org/wiki/UTC%2B14:00">+14</a> + /// or a valid time zone id like "America/Montreal" (UTC-05:00) or "Europe/Paris" (UTC+01:00). + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("timezone")] + public string Timezone { get; set; } + + /// + /// 3.0.0+ + /// Properties about the contributor, such as an instant messenger handle. + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("properties")] + public DeveloperProperties Properties { get; set; } + } + + [System.CodeDom.Compiler.GeneratedCodeAttribute("XmlSchemaClassGenerator", "2.1.1057.0")] + [System.Xml.Serialization.XmlTypeAttribute("DeveloperRoles", AnonymousType=true)] + public partial class DeveloperRoles + { + + [System.Xml.Serialization.XmlIgnoreAttribute()] + private System.Collections.ObjectModel.Collection _role; + + [System.Xml.Serialization.XmlElementAttribute("role")] + public System.Collections.ObjectModel.Collection Role + { + get + { + return _role; + } + private set + { + _role = value; + } + } + + /// + /// Gets a value indicating whether the Role collection is empty. + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool RoleSpecified + { + get + { + return (this.Role.Count != 0); + } + } + + /// + /// Initializes a new instance of the class. + /// + public DeveloperRoles() + { + this._role = new System.Collections.ObjectModel.Collection(); + } + } + + [System.CodeDom.Compiler.GeneratedCodeAttribute("XmlSchemaClassGenerator", "2.1.1057.0")] + [System.Xml.Serialization.XmlTypeAttribute("DeveloperProperties", AnonymousType=true)] + public partial class DeveloperProperties + { + + [System.Xml.Serialization.XmlIgnoreAttribute()] + private System.Collections.ObjectModel.Collection _any; + + [System.Xml.Serialization.XmlAnyElementAttribute()] + public System.Collections.ObjectModel.Collection Any + { + get + { + return _any; + } + private set + { + _any = value; + } + } + + /// + /// Gets a value indicating whether the Any collection is empty. + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool AnySpecified + { + get + { + return (this.Any.Count != 0); + } + } + + /// + /// Initializes a new instance of the class. + /// + public DeveloperProperties() + { + this._any = new System.Collections.ObjectModel.Collection(); + } + } + + [System.CodeDom.Compiler.GeneratedCodeAttribute("XmlSchemaClassGenerator", "2.1.1057.0")] + [System.Xml.Serialization.XmlTypeAttribute("ModelContributors", AnonymousType=true)] + public partial class ModelContributors + { + + [System.Xml.Serialization.XmlIgnoreAttribute()] + private System.Collections.ObjectModel.Collection _contributor; + + [System.Xml.Serialization.XmlElementAttribute("contributor")] + public System.Collections.ObjectModel.Collection Contributor + { + get + { + return _contributor; + } + private set + { + _contributor = value; + } + } + + /// + /// Gets a value indicating whether the Contributor collection is empty. + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool ContributorSpecified + { + get + { + return (this.Contributor.Count != 0); + } + } + + /// + /// Initializes a new instance of the class. + /// + public ModelContributors() + { + this._contributor = new System.Collections.ObjectModel.Collection(); + } + } + + /// + /// 3.0.0+ + /// Description of a person who has contributed to the project, but who does not have + /// commit privileges. Usually, these contributions come in the form of patches submitted. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("XmlSchemaClassGenerator", "2.1.1057.0")] + [System.Xml.Serialization.XmlTypeAttribute("Contributor")] + public partial class Contributor + { + + /// + /// 3.0.0+ + /// The full name of the contributor. + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("name")] + public string Name { get; set; } + + /// + /// 3.0.0+ + /// The email address of the contributor. + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("email")] + public string Email { get; set; } + + /// + /// 3.0.0+ + /// The URL for the homepage of the contributor. + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("url")] + public string Url { get; set; } + + /// + /// 3.0.0+ + /// The organization to which the contributor belongs. + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("organization")] + public string Organization { get; set; } + + /// + /// 3.0.0+ + /// The URL of the organization. + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("organizationUrl")] + public string OrganizationUrl { get; set; } + + [System.Xml.Serialization.XmlIgnoreAttribute()] + private System.Collections.ObjectModel.Collection _roles; + + /// + /// 3.0.0+ + /// The roles the contributor plays in the project. Each role is described by a + /// <code>role</code> element, the body of which is a role name. This can also be used to + /// describe the contribution. + /// + [System.Xml.Serialization.XmlArrayAttribute("roles")] + [System.Xml.Serialization.XmlArrayItemAttribute("role")] + public System.Collections.ObjectModel.Collection Roles + { + get + { + return _roles; + } + private set + { + _roles = value; + } + } + + /// + /// Gets a value indicating whether the Roles collection is empty. + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool RolesSpecified + { + get + { + return (this.Roles.Count != 0); + } + } + + /// + /// Initializes a new instance of the class. + /// + public Contributor() + { + this._roles = new System.Collections.ObjectModel.Collection(); + } + + /// + /// 3.0.0+ + /// The timezone the contributor is in. Typically, this is a number in the range + /// <a href="http://en.wikipedia.org/wiki/UTC%E2%88%9212:00">-12</a> to <a href="http://en.wikipedia.org/wiki/UTC%2B14:00">+14</a> + /// or a valid time zone id like "America/Montreal" (UTC-05:00) or "Europe/Paris" (UTC+01:00). + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("timezone")] + public string Timezone { get; set; } + + /// + /// 3.0.0+ + /// Properties about the contributor, such as an instant messenger handle. + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("properties")] + public ContributorProperties Properties { get; set; } + } + + [System.CodeDom.Compiler.GeneratedCodeAttribute("XmlSchemaClassGenerator", "2.1.1057.0")] + [System.Xml.Serialization.XmlTypeAttribute("ContributorRoles", AnonymousType=true)] + public partial class ContributorRoles + { + + [System.Xml.Serialization.XmlIgnoreAttribute()] + private System.Collections.ObjectModel.Collection _role; + + [System.Xml.Serialization.XmlElementAttribute("role")] + public System.Collections.ObjectModel.Collection Role + { + get + { + return _role; + } + private set + { + _role = value; + } + } + + /// + /// Gets a value indicating whether the Role collection is empty. + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool RoleSpecified + { + get + { + return (this.Role.Count != 0); + } + } + + /// + /// Initializes a new instance of the class. + /// + public ContributorRoles() + { + this._role = new System.Collections.ObjectModel.Collection(); + } + } + + [System.CodeDom.Compiler.GeneratedCodeAttribute("XmlSchemaClassGenerator", "2.1.1057.0")] + [System.Xml.Serialization.XmlTypeAttribute("ContributorProperties", AnonymousType=true)] + public partial class ContributorProperties + { + + [System.Xml.Serialization.XmlIgnoreAttribute()] + private System.Collections.ObjectModel.Collection _any; + + [System.Xml.Serialization.XmlAnyElementAttribute()] + public System.Collections.ObjectModel.Collection Any + { + get + { + return _any; + } + private set + { + _any = value; + } + } + + /// + /// Gets a value indicating whether the Any collection is empty. + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool AnySpecified + { + get + { + return (this.Any.Count != 0); + } + } + + /// + /// Initializes a new instance of the class. + /// + public ContributorProperties() + { + this._any = new System.Collections.ObjectModel.Collection(); + } + } + + [System.CodeDom.Compiler.GeneratedCodeAttribute("XmlSchemaClassGenerator", "2.1.1057.0")] + [System.Xml.Serialization.XmlTypeAttribute("ModelMailingLists", AnonymousType=true)] + public partial class ModelMailingLists + { + + [System.Xml.Serialization.XmlIgnoreAttribute()] + private System.Collections.ObjectModel.Collection _mailingList; + + [System.Xml.Serialization.XmlElementAttribute("mailingList")] + public System.Collections.ObjectModel.Collection MailingList + { + get + { + return _mailingList; + } + private set + { + _mailingList = value; + } + } + + /// + /// Gets a value indicating whether the MailingList collection is empty. + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool MailingListSpecified + { + get + { + return (this.MailingList.Count != 0); + } + } + + /// + /// Initializes a new instance of the class. + /// + public ModelMailingLists() + { + this._mailingList = new System.Collections.ObjectModel.Collection(); + } + } + + /// + /// 3.0.0+ + /// This element describes all of the mailing lists associated with a project. The + /// auto-generated site references this information. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("XmlSchemaClassGenerator", "2.1.1057.0")] + [System.Xml.Serialization.XmlTypeAttribute("MailingList")] + public partial class MailingList + { + + /// + /// 3.0.0+ + /// The name of the mailing list. + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("name")] + public string Name { get; set; } + + /// + /// 3.0.0+ + /// The email address or link that can be used to subscribe to + /// the mailing list. If this is an email address, a + /// <code>mailto:</code> link will automatically be created + /// when the documentation is created. + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("subscribe")] + public string Subscribe { get; set; } + + /// + /// 3.0.0+ + /// The email address or link that can be used to unsubscribe to + /// the mailing list. If this is an email address, a + /// <code>mailto:</code> link will automatically be created + /// when the documentation is created. + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("unsubscribe")] + public string Unsubscribe { get; set; } + + /// + /// 3.0.0+ + /// The email address or link that can be used to post to + /// the mailing list. If this is an email address, a + /// <code>mailto:</code> link will automatically be created + /// when the documentation is created. + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("post")] + public string Post { get; set; } + + /// + /// 3.0.0+ + /// The link to a URL where you can browse the mailing list archive. + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("archive")] + public string Archive { get; set; } + + [System.Xml.Serialization.XmlIgnoreAttribute()] + private System.Collections.ObjectModel.Collection _otherArchives; + + /// + /// 3.0.0+ + /// The link to alternate URLs where you can browse the list archive. + /// + [System.Xml.Serialization.XmlArrayAttribute("otherArchives")] + [System.Xml.Serialization.XmlArrayItemAttribute("otherArchive")] + public System.Collections.ObjectModel.Collection OtherArchives + { + get + { + return _otherArchives; + } + private set + { + _otherArchives = value; + } + } + + /// + /// Gets a value indicating whether the OtherArchives collection is empty. + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool OtherArchivesSpecified + { + get + { + return (this.OtherArchives.Count != 0); + } + } + + /// + /// Initializes a new instance of the class. + /// + public MailingList() + { + this._otherArchives = new System.Collections.ObjectModel.Collection(); + } + } + + [System.CodeDom.Compiler.GeneratedCodeAttribute("XmlSchemaClassGenerator", "2.1.1057.0")] + [System.Xml.Serialization.XmlTypeAttribute("MailingListOtherArchives", AnonymousType=true)] + public partial class MailingListOtherArchives + { + + [System.Xml.Serialization.XmlIgnoreAttribute()] + private System.Collections.ObjectModel.Collection _otherArchive; + + [System.Xml.Serialization.XmlElementAttribute("otherArchive")] + public System.Collections.ObjectModel.Collection OtherArchive + { + get + { + return _otherArchive; + } + private set + { + _otherArchive = value; + } + } + + /// + /// Gets a value indicating whether the OtherArchive collection is empty. + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool OtherArchiveSpecified + { + get + { + return (this.OtherArchive.Count != 0); + } + } + + /// + /// Initializes a new instance of the class. + /// + public MailingListOtherArchives() + { + this._otherArchive = new System.Collections.ObjectModel.Collection(); + } + } + + /// + /// 4.0.0+ + /// Describes the prerequisites a project can have. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("XmlSchemaClassGenerator", "2.1.1057.0")] + [System.Xml.Serialization.XmlTypeAttribute("Prerequisites")] + public partial class Prerequisites + { + + [System.Xml.Serialization.XmlIgnoreAttribute()] + private string _maven = "2.0"; + + /// + /// 4.0.0+ + /// For a plugin project (packaging is <code>maven-plugin</code>), the minimum version of + /// Maven required to use the resulting plugin.<br> + /// + [System.ComponentModel.DefaultValueAttribute("2.0")] + [System.Xml.Serialization.XmlElementAttribute("maven")] + public string Maven + { + get + { + return _maven; + } + set + { + _maven = value; + } + } + } + + [System.CodeDom.Compiler.GeneratedCodeAttribute("XmlSchemaClassGenerator", "2.1.1057.0")] + [System.Xml.Serialization.XmlTypeAttribute("ModelModules", AnonymousType=true)] + public partial class ModelModules + { + + [System.Xml.Serialization.XmlIgnoreAttribute()] + private System.Collections.ObjectModel.Collection _module; + + [System.Xml.Serialization.XmlElementAttribute("module")] + public System.Collections.ObjectModel.Collection Module + { + get + { + return _module; + } + private set + { + _module = value; + } + } + + /// + /// Gets a value indicating whether the Module collection is empty. + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool ModuleSpecified + { + get + { + return (this.Module.Count != 0); + } + } + + /// + /// Initializes a new instance of the class. + /// + public ModelModules() + { + this._module = new System.Collections.ObjectModel.Collection(); + } + } + + /// + /// 4.0.0+ + /// The <code>&lt;scm&gt;</code> element contains informations required to the SCM + /// (Source Control Management) of the project. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("XmlSchemaClassGenerator", "2.1.1057.0")] + [System.Xml.Serialization.XmlTypeAttribute("Scm")] + public partial class Scm + { + + /// + /// 4.0.0+ + /// The source control management system URL + /// that describes the repository and how to connect to the + /// repository. For more information, see the + /// <a href="https://maven.apache.org/scm/scm-url-format.html">URL format</a> + /// and <a href="https://maven.apache.org/scm/scms-overview.html">list of supported SCMs</a>. + /// This connection is read-only. + /// <br><b>Default value is</b>: parent value [+ path adjustment] + (artifactId or project.directory property), or just parent value if + /// scm's <code>child.scm.connection.inherit.append.path="false"</code> + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("connection")] + public string Connection { get; set; } + + /// + /// 4.0.0+ + /// Just like <code>connection</code>, but for developers, i.e. this scm connection + /// will not be read only. + /// <br><b>Default value is</b>: parent value [+ path adjustment] + (artifactId or project.directory property), or just parent value if + /// scm's <code>child.scm.developerConnection.inherit.append.path="false"</code> + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("developerConnection")] + public string DeveloperConnection { get; set; } + + [System.Xml.Serialization.XmlIgnoreAttribute()] + private string _tag = "HEAD"; + + /// + /// 4.0.0+ + /// The tag of current code. By default, it's set to HEAD during development. + /// + [System.ComponentModel.DefaultValueAttribute("HEAD")] + [System.Xml.Serialization.XmlElementAttribute("tag")] + public string Tag + { + get + { + return _tag; + } + set + { + _tag = value; + } + } + + /// + /// 4.0.0+ + /// The URL to the project's browsable SCM repository, such as ViewVC or Fisheye. + /// <br><b>Default value is</b>: parent value [+ path adjustment] + (artifactId or project.directory property), or just parent value if + /// scm's <code>child.scm.url.inherit.append.path="false"</code> + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("url")] + public string Url { get; set; } + + /// + /// 4.0.0+ + /// When children inherit from scm connection, append path or not? Note: While the type + /// of this field is <code>String</code> for technical reasons, the semantic type is actually + /// <code>Boolean</code> + /// <br><b>Default value is</b>: <code>true</code> + /// <br><b>Since</b>: Maven 3.6.1 + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlAttributeAttribute("child.scm.connection.inherit.append.path")] + public string ChildScmConnectionInheritAppendPath { get; set; } + + /// + /// 4.0.0+ + /// When children inherit from scm developer connection, append path or not? Note: While the type + /// of this field is <code>String</code> for technical reasons, the semantic type is actually + /// <code>Boolean</code> + /// <br><b>Default value is</b>: <code>true</code> + /// <br><b>Since</b>: Maven 3.6.1 + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlAttributeAttribute("child.scm.developerConnection.inherit.append.path")] + public string ChildScmDeveloperConnectionInheritAppendPath { get; set; } + + /// + /// 4.0.0+ + /// When children inherit from scm url, append path or not? Note: While the type + /// of this field is <code>String</code> for technical reasons, the semantic type is actually + /// <code>Boolean</code> + /// <br><b>Default value is</b>: <code>true</code> + /// <br><b>Since</b>: Maven 3.6.1 + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlAttributeAttribute("child.scm.url.inherit.append.path")] + public string ChildScmUrlInheritAppendPath { get; set; } + } + + /// + /// 4.0.0+ + /// Information about the issue tracking (or bug tracking) system used to manage this + /// project. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("XmlSchemaClassGenerator", "2.1.1057.0")] + [System.Xml.Serialization.XmlTypeAttribute("IssueManagement")] + public partial class IssueManagement + { + + /// + /// 4.0.0+ + /// The name of the issue management system, e.g. Bugzilla + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("system")] + public string System { get; set; } + + /// + /// 4.0.0+ + /// URL for the issue management system used by the project. + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("url")] + public string Url { get; set; } + } + + /// + /// 4.0.0+ + /// The <code>&lt;CiManagement&gt;</code> element contains informations required to the + /// continuous integration system of the project. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("XmlSchemaClassGenerator", "2.1.1057.0")] + [System.Xml.Serialization.XmlTypeAttribute("CiManagement")] + public partial class CiManagement + { + + /// + /// 4.0.0+ + /// The name of the continuous integration system, e.g. <code>continuum</code>. + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("system")] + public string System { get; set; } + + /// + /// 4.0.0+ + /// URL for the continuous integration system used by the project if it has a web + /// interface. + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("url")] + public string Url { get; set; } + + [System.Xml.Serialization.XmlIgnoreAttribute()] + private System.Collections.ObjectModel.Collection _notifiers; + + /// + /// 4.0.0+ + /// Configuration for notifying developers/users when a build is unsuccessful, + /// including user information and notification mode. + /// + [System.Xml.Serialization.XmlArrayAttribute("notifiers")] + [System.Xml.Serialization.XmlArrayItemAttribute("notifier")] + public System.Collections.ObjectModel.Collection Notifiers + { + get + { + return _notifiers; + } + private set + { + _notifiers = value; + } + } + + /// + /// Gets a value indicating whether the Notifiers collection is empty. + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool NotifiersSpecified + { + get + { + return (this.Notifiers.Count != 0); + } + } + + /// + /// Initializes a new instance of the class. + /// + public CiManagement() + { + this._notifiers = new System.Collections.ObjectModel.Collection(); + } + } + + [System.CodeDom.Compiler.GeneratedCodeAttribute("XmlSchemaClassGenerator", "2.1.1057.0")] + [System.Xml.Serialization.XmlTypeAttribute("CiManagementNotifiers", AnonymousType=true)] + public partial class CiManagementNotifiers + { + + [System.Xml.Serialization.XmlIgnoreAttribute()] + private System.Collections.ObjectModel.Collection _notifier; + + [System.Xml.Serialization.XmlElementAttribute("notifier")] + public System.Collections.ObjectModel.Collection Notifier + { + get + { + return _notifier; + } + private set + { + _notifier = value; + } + } + + /// + /// Gets a value indicating whether the Notifier collection is empty. + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool NotifierSpecified + { + get + { + return (this.Notifier.Count != 0); + } + } + + /// + /// Initializes a new instance of the class. + /// + public CiManagementNotifiers() + { + this._notifier = new System.Collections.ObjectModel.Collection(); + } + } + + /// + /// 4.0.0+ + /// Configures one method for notifying users/developers when a build breaks. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("XmlSchemaClassGenerator", "2.1.1057.0")] + [System.Xml.Serialization.XmlTypeAttribute("Notifier")] + public partial class Notifier + { + + [System.Xml.Serialization.XmlIgnoreAttribute()] + private string _type = "mail"; + + /// + /// 4.0.0+ + /// The mechanism used to deliver notifications. + /// + [System.ComponentModel.DefaultValueAttribute("mail")] + [System.Xml.Serialization.XmlElementAttribute("type")] + public string Type + { + get + { + return _type; + } + set + { + _type = value; + } + } + + [System.Xml.Serialization.XmlIgnoreAttribute()] + private bool _sendOnError = true; + + /// + /// 4.0.0+ + /// Whether to send notifications on error. + /// + [System.ComponentModel.DefaultValueAttribute(true)] + [System.Xml.Serialization.XmlElementAttribute("sendOnError")] + public bool SendOnError + { + get + { + return _sendOnError; + } + set + { + _sendOnError = value; + } + } + + [System.Xml.Serialization.XmlIgnoreAttribute()] + private bool _sendOnFailure = true; + + /// + /// 4.0.0+ + /// Whether to send notifications on failure. + /// + [System.ComponentModel.DefaultValueAttribute(true)] + [System.Xml.Serialization.XmlElementAttribute("sendOnFailure")] + public bool SendOnFailure + { + get + { + return _sendOnFailure; + } + set + { + _sendOnFailure = value; + } + } + + [System.Xml.Serialization.XmlIgnoreAttribute()] + private bool _sendOnSuccess = true; + + /// + /// 4.0.0+ + /// Whether to send notifications on success. + /// + [System.ComponentModel.DefaultValueAttribute(true)] + [System.Xml.Serialization.XmlElementAttribute("sendOnSuccess")] + public bool SendOnSuccess + { + get + { + return _sendOnSuccess; + } + set + { + _sendOnSuccess = value; + } + } + + [System.Xml.Serialization.XmlIgnoreAttribute()] + private bool _sendOnWarning = true; + + /// + /// 4.0.0+ + /// Whether to send notifications on warning. + /// + [System.ComponentModel.DefaultValueAttribute(true)] + [System.Xml.Serialization.XmlElementAttribute("sendOnWarning")] + public bool SendOnWarning + { + get + { + return _sendOnWarning; + } + set + { + _sendOnWarning = value; + } + } + + /// + /// 4.0.0+ + /// <b>Deprecated</b>. Where to send the notification to - eg email address. + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("address")] + public string Address { get; set; } + + /// + /// 0.0.0+ + /// Extended configuration specific to this notifier goes here. + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("configuration")] + public NotifierConfiguration Configuration { get; set; } + } + + [System.CodeDom.Compiler.GeneratedCodeAttribute("XmlSchemaClassGenerator", "2.1.1057.0")] + [System.Xml.Serialization.XmlTypeAttribute("NotifierConfiguration", AnonymousType=true)] + public partial class NotifierConfiguration + { + + [System.Xml.Serialization.XmlIgnoreAttribute()] + private System.Collections.ObjectModel.Collection _any; + + [System.Xml.Serialization.XmlAnyElementAttribute()] + public System.Collections.ObjectModel.Collection Any + { + get + { + return _any; + } + private set + { + _any = value; + } + } + + /// + /// Gets a value indicating whether the Any collection is empty. + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool AnySpecified + { + get + { + return (this.Any.Count != 0); + } + } + + /// + /// Initializes a new instance of the class. + /// + public NotifierConfiguration() + { + this._any = new System.Collections.ObjectModel.Collection(); + } + } + + /// + /// 4.0.0+ + /// This elements describes all that pertains to distribution for a project. It is + /// primarily used for deployment of artifacts and the site produced by the build. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("XmlSchemaClassGenerator", "2.1.1057.0")] + [System.Xml.Serialization.XmlTypeAttribute("DistributionManagement")] + public partial class DistributionManagement + { + + /// + /// 4.0.0+ + /// Information needed to deploy the artifacts generated by the project to a + /// remote repository. + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("repository")] + public DeploymentRepository Repository { get; set; } + + /// + /// 4.0.0+ + /// Where to deploy snapshots of artifacts to. If not given, it defaults to the + /// <code>repository</code> element. + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("snapshotRepository")] + public DeploymentRepository SnapshotRepository { get; set; } + + /// + /// 4.0.0+ + /// Information needed for deploying the web site of the project. + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("site")] + public Site Site { get; set; } + + /// + /// 4.0.0+ + /// The URL of the project's download page. If not given users will be + /// referred to the homepage given by <code>url</code>. + /// This is given to assist in locating artifacts that are not in the repository due to + /// licensing restrictions. + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("downloadUrl")] + public string DownloadUrl { get; set; } + + /// + /// 4.0.0+ + /// Relocation information of the artifact if it has been moved to a new group ID + /// and/or artifact ID. + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("relocation")] + public Relocation Relocation { get; set; } + + /// + /// 4.0.0+ + /// Gives the status of this artifact in the remote repository. + /// This must not be set in your local project, as it is updated by + /// tools placing it in the reposiory. Valid values are: <code>none</code> (default), + /// <code>converted</code> (repository manager converted this from an Maven 1 POM), + /// <code>partner</code> + /// (directly synced from a partner Maven 2 repository), <code>deployed</code> (was deployed from a Maven 2 + /// instance), <code>verified</code> (has been hand verified as correct and final). + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("status")] + public string Status { get; set; } + } + + /// + /// 4.0.0+ + /// Repository contains the information needed for deploying to the remote + /// repository. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("XmlSchemaClassGenerator", "2.1.1057.0")] + [System.Xml.Serialization.XmlTypeAttribute("DeploymentRepository")] + public partial class DeploymentRepository + { + + [System.Xml.Serialization.XmlIgnoreAttribute()] + private bool _uniqueVersion = true; + + /// + /// 4.0.0+ + /// Whether to assign snapshots a unique version comprised of the timestamp and + /// build number, or to use the same version each time + /// + [System.ComponentModel.DefaultValueAttribute(true)] + [System.Xml.Serialization.XmlElementAttribute("uniqueVersion")] + public bool UniqueVersion + { + get + { + return _uniqueVersion; + } + set + { + _uniqueVersion = value; + } + } + + /// + /// 4.0.0+ + /// How to handle downloading of releases from this repository. + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("releases")] + public RepositoryPolicy Releases { get; set; } + + /// + /// 4.0.0+ + /// How to handle downloading of snapshots from this repository. + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("snapshots")] + public RepositoryPolicy Snapshots { get; set; } + + /// + /// 4.0.0+ + /// A unique identifier for a repository. This is used to match the repository + /// to configuration in the <code>settings.xml</code> file, for example. Furthermore, the identifier is + /// used during POM inheritance and profile injection to detect repositories that should be merged. + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("id")] + public string Id { get; set; } + + /// + /// 4.0.0+ + /// Human readable name of the repository. + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("name")] + public string Name { get; set; } + + /// + /// 4.0.0+ + /// The url of the repository, in the form <code>protocol://hostname/path</code>. + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("url")] + public string Url { get; set; } + + [System.Xml.Serialization.XmlIgnoreAttribute()] + private string _layout = "default"; + + /// + /// 4.0.0+ + /// The type of layout this repository uses for locating and storing artifacts - + /// can be <code>legacy</code> or <code>default</code>. + /// + [System.ComponentModel.DefaultValueAttribute("default")] + [System.Xml.Serialization.XmlElementAttribute("layout")] + public string Layout + { + get + { + return _layout; + } + set + { + _layout = value; + } + } + } + + /// + /// 4.0.0+ + /// Download policy. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("XmlSchemaClassGenerator", "2.1.1057.0")] + [System.Xml.Serialization.XmlTypeAttribute("RepositoryPolicy")] + public partial class RepositoryPolicy + { + + /// + /// 4.0.0+ + /// Whether to use this repository for downloading this type of artifact. Note: While the type + /// of this field is <code>String</code> for technical reasons, the semantic type is actually + /// <code>Boolean</code>. Default value is <code>true</code>. + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("enabled")] + public string Enabled { get; set; } + + /// + /// 4.0.0+ + /// The frequency for downloading updates - can be + /// <code>always,</code> + /// <code>daily</code> + /// (default), + /// <code>interval:XXX</code> + /// (in minutes) or + /// <code>never</code> + /// (only if it doesn't exist locally). + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("updatePolicy")] + public string UpdatePolicy { get; set; } + + /// + /// 4.0.0+ + /// What to do when verification of an artifact checksum fails. Valid values are + /// <code>ignore</code> + /// , + /// <code>fail</code> + /// or + /// <code>warn</code> + /// (the default). + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("checksumPolicy")] + public string ChecksumPolicy { get; set; } + } + + /// + /// 4.0.0+ + /// Contains the information needed for deploying websites. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("XmlSchemaClassGenerator", "2.1.1057.0")] + [System.Xml.Serialization.XmlTypeAttribute("Site")] + public partial class Site + { + + /// + /// 4.0.0+ + /// A unique identifier for a deployment location. This is used to match the + /// site to configuration in the <code>settings.xml</code> file, for example. + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("id")] + public string Id { get; set; } + + /// + /// 4.0.0+ + /// Human readable name of the deployment location. + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("name")] + public string Name { get; set; } + + /// + /// 4.0.0+ + /// The url of the location where website is deployed, in the form <code>protocol://hostname/path</code>. + /// <br><b>Default value is</b>: parent value [+ path adjustment] + (artifactId or project.directory property), or just parent value if + /// site's <code>child.site.url.inherit.append.path="false"</code> + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("url")] + public string Url { get; set; } + + /// + /// 4.0.0+ + /// When children inherit from distribution management site url, append path or not? Note: While the type + /// of this field is <code>String</code> for technical reasons, the semantic type is actually + /// <code>Boolean</code> + /// <br><b>Default value is</b>: <code>true</code> + /// <br><b>Since</b>: Maven 3.6.1 + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlAttributeAttribute("child.site.url.inherit.append.path")] + public string ChildSiteUrlInheritAppendPath { get; set; } + } + + /// + /// 4.0.0+ + /// Describes where an artifact has moved to. If any of the values are omitted, it is + /// assumed to be the same as it was before. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("XmlSchemaClassGenerator", "2.1.1057.0")] + [System.Xml.Serialization.XmlTypeAttribute("Relocation")] + public partial class Relocation + { + + /// + /// 4.0.0+ + /// The group ID the artifact has moved to. + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("groupId")] + public string GroupId { get; set; } + + /// + /// 4.0.0+ + /// The new artifact ID of the artifact. + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("artifactId")] + public string ArtifactId { get; set; } + + /// + /// 4.0.0+ + /// The new version of the artifact. + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("version")] + public string Version { get; set; } + + /// + /// 4.0.0+ + /// An additional message to show the user about the move, such as the reason. + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("message")] + public string Message { get; set; } + } + + [System.CodeDom.Compiler.GeneratedCodeAttribute("XmlSchemaClassGenerator", "2.1.1057.0")] + [System.Xml.Serialization.XmlTypeAttribute("ModelProperties", AnonymousType=true)] + public partial class ModelProperties + { + + [System.Xml.Serialization.XmlIgnoreAttribute()] + private System.Collections.ObjectModel.Collection _any; + + [System.Xml.Serialization.XmlAnyElementAttribute()] + public System.Collections.ObjectModel.Collection Any + { + get + { + return _any; + } + private set + { + _any = value; + } + } + + /// + /// Gets a value indicating whether the Any collection is empty. + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool AnySpecified + { + get + { + return (this.Any.Count != 0); + } + } + + /// + /// Initializes a new instance of the class. + /// + public ModelProperties() + { + this._any = new System.Collections.ObjectModel.Collection(); + } + } + + /// + /// 4.0.0+ + /// Section for management of default dependency information for use in a group of + /// POMs. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("XmlSchemaClassGenerator", "2.1.1057.0")] + [System.Xml.Serialization.XmlTypeAttribute("DependencyManagement")] + public partial class DependencyManagement + { + + [System.Xml.Serialization.XmlIgnoreAttribute()] + private System.Collections.ObjectModel.Collection _dependencies; + + /// + /// 4.0.0+ + /// The dependencies specified here are not used until they are referenced in a + /// POM within the group. This allows the specification of a "standard" version for a + /// particular dependency. + /// + [System.Xml.Serialization.XmlArrayAttribute("dependencies")] + [System.Xml.Serialization.XmlArrayItemAttribute("dependency")] + public System.Collections.ObjectModel.Collection Dependencies + { + get + { + return _dependencies; + } + private set + { + _dependencies = value; + } + } + + /// + /// Gets a value indicating whether the Dependencies collection is empty. + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool DependenciesSpecified + { + get + { + return (this.Dependencies.Count != 0); + } + } + + /// + /// Initializes a new instance of the class. + /// + public DependencyManagement() + { + this._dependencies = new System.Collections.ObjectModel.Collection(); + } + } + + [System.CodeDom.Compiler.GeneratedCodeAttribute("XmlSchemaClassGenerator", "2.1.1057.0")] + [System.Xml.Serialization.XmlTypeAttribute("DependencyManagementDependencies", AnonymousType=true)] + public partial class DependencyManagementDependencies + { + + [System.Xml.Serialization.XmlIgnoreAttribute()] + private System.Collections.ObjectModel.Collection _dependency; + + [System.Xml.Serialization.XmlElementAttribute("dependency")] + public System.Collections.ObjectModel.Collection Dependency + { + get + { + return _dependency; + } + private set + { + _dependency = value; + } + } + + /// + /// Gets a value indicating whether the Dependency collection is empty. + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool DependencySpecified + { + get + { + return (this.Dependency.Count != 0); + } + } + + /// + /// Initializes a new instance of the class. + /// + public DependencyManagementDependencies() + { + this._dependency = new System.Collections.ObjectModel.Collection(); + } + } + + /// + /// 3.0.0+ + /// The <code>&lt;dependency&gt;</code> element contains information about a dependency + /// of the project. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("XmlSchemaClassGenerator", "2.1.1057.0")] + [System.Xml.Serialization.XmlTypeAttribute("Dependency")] + public partial class Dependency + { + + /// + /// 3.0.0+ + /// The project group that produced the dependency, e.g. + /// <code>org.apache.maven</code>. + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("groupId")] + public string GroupId { get; set; } + + /// + /// 3.0.0+ + /// The unique id for an artifact produced by the project group, e.g. + /// <code>maven-artifact</code>. + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("artifactId")] + public string ArtifactId { get; set; } + + /// + /// 3.0.0+ + /// The version of the dependency, e.g. <code>3.2.1</code>. In Maven 2, this can also be + /// specified as a range of versions. + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("version")] + public string Version { get; set; } + + [System.Xml.Serialization.XmlIgnoreAttribute()] + private string _type = "jar"; + + /// + /// 4.0.0+ + /// The type of dependency, that will be mapped to a file extension, an optional classifier, and a few other attributes. + /// Some examples are <code>jar</code>, <code>war</code>, <code>ejb-client</code> + /// and <code>test-jar</code>: see <a href="../maven-core/artifact-handlers.html">default + /// artifact handlers</a> for a list. New types can be defined by extensions, so this is not a complete list. + /// + [System.ComponentModel.DefaultValueAttribute("jar")] + [System.Xml.Serialization.XmlElementAttribute("type")] + public string Type + { + get + { + return _type; + } + set + { + _type = value; + } + } + + /// + /// 4.0.0+ + /// The classifier of the dependency. It is appended to + /// the filename after the version. This allows: + /// <ul> + /// <li>referring to attached artifact, for example <code>sources</code> and <code>javadoc</code>: + /// see <a href="../maven-core/artifact-handlers.html">default artifact handlers</a> for a list,</li> + /// <li>distinguishing two artifacts + /// that belong to the same POM but were built differently. + /// For example, <code>jdk14</code> and <code>jdk15</code>.</li> + /// </ul> + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("classifier")] + public string Classifier { get; set; } + + /// + /// 4.0.0+ + /// The scope of the dependency - <code>compile</code>, <code>runtime</code>, + /// <code>test</code>, <code>system</code>, and <code>provided</code>. Used to + /// calculate the various classpaths used for compilation, testing, and so on. + /// It also assists in determining which artifacts to include in a distribution of + /// this project. For more information, see + /// <a href="https://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html">the + /// dependency mechanism</a>. The default scope is <code>compile</code>. + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("scope")] + public string Scope { get; set; } + + /// + /// 4.0.0+ + /// FOR SYSTEM SCOPE ONLY. Note that use of this property is <b>discouraged</b> + /// and may be replaced in later versions. This specifies the path on the filesystem + /// for this dependency. + /// Requires an absolute path for the value, not relative. + /// Use a property that gives the machine specific absolute path, + /// e.g. <code>${java.home}</code>. + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("systemPath")] + public string SystemPath { get; set; } + + [System.Xml.Serialization.XmlIgnoreAttribute()] + private System.Collections.ObjectModel.Collection _exclusions; + + /// + /// 4.0.0+ + /// Lists a set of artifacts that should be excluded from this dependency's + /// artifact list when it comes to calculating transitive dependencies. + /// + [System.Xml.Serialization.XmlArrayAttribute("exclusions")] + [System.Xml.Serialization.XmlArrayItemAttribute("exclusion")] + public System.Collections.ObjectModel.Collection Exclusions + { + get + { + return _exclusions; + } + private set + { + _exclusions = value; + } + } + + /// + /// Gets a value indicating whether the Exclusions collection is empty. + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool ExclusionsSpecified + { + get + { + return (this.Exclusions.Count != 0); + } + } + + /// + /// Initializes a new instance of the class. + /// + public Dependency() + { + this._exclusions = new System.Collections.ObjectModel.Collection(); + } + + /// + /// 4.0.0+ + /// Indicates the dependency is optional for use of this library. While the + /// version of the dependency will be taken into account for dependency calculation if the + /// library is used elsewhere, it will not be passed on transitively. Note: While the type + /// of this field is <code>String</code> for technical reasons, the semantic type is actually + /// <code>Boolean</code>. Default value is <code>false</code>. + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("optional")] + public string Optional { get; set; } + } + + [System.CodeDom.Compiler.GeneratedCodeAttribute("XmlSchemaClassGenerator", "2.1.1057.0")] + [System.Xml.Serialization.XmlTypeAttribute("DependencyExclusions", AnonymousType=true)] + public partial class DependencyExclusions + { + + [System.Xml.Serialization.XmlIgnoreAttribute()] + private System.Collections.ObjectModel.Collection _exclusion; + + [System.Xml.Serialization.XmlElementAttribute("exclusion")] + public System.Collections.ObjectModel.Collection Exclusion + { + get + { + return _exclusion; + } + private set + { + _exclusion = value; + } + } + + /// + /// Gets a value indicating whether the Exclusion collection is empty. + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool ExclusionSpecified + { + get + { + return (this.Exclusion.Count != 0); + } + } + + /// + /// Initializes a new instance of the class. + /// + public DependencyExclusions() + { + this._exclusion = new System.Collections.ObjectModel.Collection(); + } + } + + /// + /// 4.0.0+ + /// The <code>&lt;exclusion&gt;</code> element contains informations required to exclude + /// an artifact to the project. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("XmlSchemaClassGenerator", "2.1.1057.0")] + [System.Xml.Serialization.XmlTypeAttribute("Exclusion")] + public partial class Exclusion + { + + /// + /// 4.0.0+ + /// The artifact ID of the project to exclude. + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("artifactId")] + public string ArtifactId { get; set; } + + /// + /// 4.0.0+ + /// The group ID of the project to exclude. + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("groupId")] + public string GroupId { get; set; } + } + + [System.CodeDom.Compiler.GeneratedCodeAttribute("XmlSchemaClassGenerator", "2.1.1057.0")] + [System.Xml.Serialization.XmlTypeAttribute("ModelDependencies", AnonymousType=true)] + public partial class ModelDependencies + { + + [System.Xml.Serialization.XmlIgnoreAttribute()] + private System.Collections.ObjectModel.Collection _dependency; + + [System.Xml.Serialization.XmlElementAttribute("dependency")] + public System.Collections.ObjectModel.Collection Dependency + { + get + { + return _dependency; + } + private set + { + _dependency = value; + } + } + + /// + /// Gets a value indicating whether the Dependency collection is empty. + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool DependencySpecified + { + get + { + return (this.Dependency.Count != 0); + } + } + + /// + /// Initializes a new instance of the class. + /// + public ModelDependencies() + { + this._dependency = new System.Collections.ObjectModel.Collection(); + } + } + + [System.CodeDom.Compiler.GeneratedCodeAttribute("XmlSchemaClassGenerator", "2.1.1057.0")] + [System.Xml.Serialization.XmlTypeAttribute("ModelRepositories", AnonymousType=true)] + public partial class ModelRepositories + { + + [System.Xml.Serialization.XmlIgnoreAttribute()] + private System.Collections.ObjectModel.Collection _repository; + + [System.Xml.Serialization.XmlElementAttribute("repository")] + public System.Collections.ObjectModel.Collection Repository + { + get + { + return _repository; + } + private set + { + _repository = value; + } + } + + /// + /// Gets a value indicating whether the Repository collection is empty. + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool RepositorySpecified + { + get + { + return (this.Repository.Count != 0); + } + } + + /// + /// Initializes a new instance of the class. + /// + public ModelRepositories() + { + this._repository = new System.Collections.ObjectModel.Collection(); + } + } + + /// + /// 4.0.0+ + /// A repository contains the information needed for establishing connections with + /// remote repository. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("XmlSchemaClassGenerator", "2.1.1057.0")] + [System.Xml.Serialization.XmlTypeAttribute("Repository")] + public partial class Repository + { + + /// + /// 4.0.0+ + /// How to handle downloading of releases from this repository. + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("releases")] + public RepositoryPolicy Releases { get; set; } + + /// + /// 4.0.0+ + /// How to handle downloading of snapshots from this repository. + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("snapshots")] + public RepositoryPolicy Snapshots { get; set; } + + /// + /// 4.0.0+ + /// A unique identifier for a repository. This is used to match the repository + /// to configuration in the <code>settings.xml</code> file, for example. Furthermore, the identifier is + /// used during POM inheritance and profile injection to detect repositories that should be merged. + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("id")] + public string Id { get; set; } + + /// + /// 4.0.0+ + /// Human readable name of the repository. + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("name")] + public string Name { get; set; } + + /// + /// 4.0.0+ + /// The url of the repository, in the form <code>protocol://hostname/path</code>. + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("url")] + public string Url { get; set; } + + [System.Xml.Serialization.XmlIgnoreAttribute()] + private string _layout = "default"; + + /// + /// 4.0.0+ + /// The type of layout this repository uses for locating and storing artifacts - + /// can be <code>legacy</code> or <code>default</code>. + /// + [System.ComponentModel.DefaultValueAttribute("default")] + [System.Xml.Serialization.XmlElementAttribute("layout")] + public string Layout + { + get + { + return _layout; + } + set + { + _layout = value; + } + } + } + + [System.CodeDom.Compiler.GeneratedCodeAttribute("XmlSchemaClassGenerator", "2.1.1057.0")] + [System.Xml.Serialization.XmlTypeAttribute("ModelPluginRepositories", AnonymousType=true)] + public partial class ModelPluginRepositories + { + + [System.Xml.Serialization.XmlIgnoreAttribute()] + private System.Collections.ObjectModel.Collection _pluginRepository; + + [System.Xml.Serialization.XmlElementAttribute("pluginRepository")] + public System.Collections.ObjectModel.Collection PluginRepository + { + get + { + return _pluginRepository; + } + private set + { + _pluginRepository = value; + } + } + + /// + /// Gets a value indicating whether the PluginRepository collection is empty. + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool PluginRepositorySpecified + { + get + { + return (this.PluginRepository.Count != 0); + } + } + + /// + /// Initializes a new instance of the class. + /// + public ModelPluginRepositories() + { + this._pluginRepository = new System.Collections.ObjectModel.Collection(); + } + } + + /// + /// 3.0.0+ + /// The <code>&lt;build&gt;</code> element contains informations required to build the project. + /// Default values are defined in Super POM. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("XmlSchemaClassGenerator", "2.1.1057.0")] + [System.Xml.Serialization.XmlTypeAttribute("Build")] + public partial class Build + { + + /// + /// 3.0.0+ + /// This element specifies a directory containing the source of the project. The + /// generated build system will compile the sources from this directory when the project is + /// built. The path given is relative to the project descriptor. + /// The default value is <code>src/main/java</code>. + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("sourceDirectory")] + public string SourceDirectory { get; set; } + + /// + /// 4.0.0+ + /// This element specifies a directory containing the script sources of the + /// project. This directory is meant to be different from the sourceDirectory, in that its + /// contents will be copied to the output directory in most cases (since scripts are + /// interpreted rather than compiled). + /// The default value is <code>src/main/scripts</code>. + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("scriptSourceDirectory")] + public string ScriptSourceDirectory { get; set; } + + /// + /// 4.0.0+ + /// This element specifies a directory containing the unit test source of the + /// project. The generated build system will compile these directories when the project is + /// being tested. The path given is relative to the project descriptor. + /// The default value is <code>src/test/java</code>. + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("testSourceDirectory")] + public string TestSourceDirectory { get; set; } + + /// + /// 4.0.0+ + /// The directory where compiled application classes are placed. + /// The default value is <code>target/classes</code>. + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("outputDirectory")] + public string OutputDirectory { get; set; } + + /// + /// 4.0.0+ + /// The directory where compiled test classes are placed. + /// The default value is <code>target/test-classes</code>. + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("testOutputDirectory")] + public string TestOutputDirectory { get; set; } + + [System.Xml.Serialization.XmlIgnoreAttribute()] + private System.Collections.ObjectModel.Collection _extensions; + + /// + /// 4.0.0+ + /// A set of build extensions to use from this project. + /// + [System.Xml.Serialization.XmlArrayAttribute("extensions")] + [System.Xml.Serialization.XmlArrayItemAttribute("extension")] + public System.Collections.ObjectModel.Collection Extensions + { + get + { + return _extensions; + } + private set + { + _extensions = value; + } + } + + /// + /// Gets a value indicating whether the Extensions collection is empty. + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool ExtensionsSpecified + { + get + { + return (this.Extensions.Count != 0); + } + } + + /// + /// Initializes a new instance of the class. + /// + public Build() + { + this._extensions = new System.Collections.ObjectModel.Collection(); + this._resources = new System.Collections.ObjectModel.Collection(); + this._testResources = new System.Collections.ObjectModel.Collection(); + this._filters = new System.Collections.ObjectModel.Collection(); + this._plugins = new System.Collections.ObjectModel.Collection(); + } + + /// + /// 3.0.0+ + /// The default goal (or phase in Maven 2) to execute when none is specified for + /// the project. Note that in case of a multi-module build, only the default goal of the top-level + /// project is relevant, i.e. the default goals of child modules are ignored. Since Maven 3, + /// multiple goals/phases can be separated by whitespace. + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("defaultGoal")] + public string DefaultGoal { get; set; } + + [System.Xml.Serialization.XmlIgnoreAttribute()] + private System.Collections.ObjectModel.Collection _resources; + + /// + /// 3.0.0+ + /// This element describes all of the classpath resources such as properties + /// files associated with a project. These resources are often included in the final + /// package. + /// The default value is <code>src/main/resources</code>. + /// + [System.Xml.Serialization.XmlArrayAttribute("resources")] + [System.Xml.Serialization.XmlArrayItemAttribute("resource")] + public System.Collections.ObjectModel.Collection Resources + { + get + { + return _resources; + } + private set + { + _resources = value; + } + } + + /// + /// Gets a value indicating whether the Resources collection is empty. + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool ResourcesSpecified + { + get + { + return (this.Resources.Count != 0); + } + } + + [System.Xml.Serialization.XmlIgnoreAttribute()] + private System.Collections.ObjectModel.Collection _testResources; + + /// + /// 4.0.0+ + /// This element describes all of the classpath resources such as properties + /// files associated with a project's unit tests. + /// The default value is <code>src/test/resources</code>. + /// + [System.Xml.Serialization.XmlArrayAttribute("testResources")] + [System.Xml.Serialization.XmlArrayItemAttribute("testResource")] + public System.Collections.ObjectModel.Collection TestResources + { + get + { + return _testResources; + } + private set + { + _testResources = value; + } + } + + /// + /// Gets a value indicating whether the TestResources collection is empty. + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool TestResourcesSpecified + { + get + { + return (this.TestResources.Count != 0); + } + } + + /// + /// 4.0.0+ + /// The directory where all files generated by the build are placed. + /// The default value is <code>target</code>. + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("directory")] + public string Directory { get; set; } + + /// + /// 4.0.0+ + /// The filename (excluding the extension, and with no path information) that + /// the produced artifact will be called. + /// The default value is <code>${artifactId}-${version}</code>. + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("finalName")] + public string FinalName { get; set; } + + [System.Xml.Serialization.XmlIgnoreAttribute()] + private System.Collections.ObjectModel.Collection _filters; + + /// + /// 4.0.0+ + /// The list of filter properties files that are used when filtering is enabled. + /// + [System.Xml.Serialization.XmlArrayAttribute("filters")] + [System.Xml.Serialization.XmlArrayItemAttribute("filter")] + public System.Collections.ObjectModel.Collection Filters + { + get + { + return _filters; + } + private set + { + _filters = value; + } + } + + /// + /// Gets a value indicating whether the Filters collection is empty. + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool FiltersSpecified + { + get + { + return (this.Filters.Count != 0); + } + } + + /// + /// 4.0.0+ + /// Default plugin information to be made available for reference by projects + /// derived from this one. This plugin configuration will not be resolved or bound to the + /// lifecycle unless referenced. Any local configuration for a given plugin will override + /// the plugin's entire definition here. + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("pluginManagement")] + public PluginManagement PluginManagement { get; set; } + + [System.Xml.Serialization.XmlIgnoreAttribute()] + private System.Collections.ObjectModel.Collection _plugins; + + /// + /// 4.0.0+ + /// The list of plugins to use. + /// + [System.Xml.Serialization.XmlArrayAttribute("plugins")] + [System.Xml.Serialization.XmlArrayItemAttribute("plugin")] + public System.Collections.ObjectModel.Collection Plugins + { + get + { + return _plugins; + } + private set + { + _plugins = value; + } + } + + /// + /// Gets a value indicating whether the Plugins collection is empty. + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool PluginsSpecified + { + get + { + return (this.Plugins.Count != 0); + } + } + } + + [System.CodeDom.Compiler.GeneratedCodeAttribute("XmlSchemaClassGenerator", "2.1.1057.0")] + [System.Xml.Serialization.XmlTypeAttribute("BuildExtensions", AnonymousType=true)] + public partial class BuildExtensions + { + + [System.Xml.Serialization.XmlIgnoreAttribute()] + private System.Collections.ObjectModel.Collection _extension; + + [System.Xml.Serialization.XmlElementAttribute("extension")] + public System.Collections.ObjectModel.Collection Extension + { + get + { + return _extension; + } + private set + { + _extension = value; + } + } + + /// + /// Gets a value indicating whether the Extension collection is empty. + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool ExtensionSpecified + { + get + { + return (this.Extension.Count != 0); + } + } + + /// + /// Initializes a new instance of the class. + /// + public BuildExtensions() + { + this._extension = new System.Collections.ObjectModel.Collection(); + } + } + + /// + /// 4.0.0+ + /// Describes a build extension to utilise. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("XmlSchemaClassGenerator", "2.1.1057.0")] + [System.Xml.Serialization.XmlTypeAttribute("Extension")] + public partial class Extension + { + + /// + /// 4.0.0+ + /// The group ID of the extension's artifact. + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("groupId")] + public string GroupId { get; set; } + + /// + /// 4.0.0+ + /// The artifact ID of the extension. + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("artifactId")] + public string ArtifactId { get; set; } + + /// + /// 4.0.0+ + /// The version of the extension. + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("version")] + public string Version { get; set; } + } + + [System.CodeDom.Compiler.GeneratedCodeAttribute("XmlSchemaClassGenerator", "2.1.1057.0")] + [System.Xml.Serialization.XmlTypeAttribute("BuildResources", AnonymousType=true)] + public partial class BuildResources + { + + [System.Xml.Serialization.XmlIgnoreAttribute()] + private System.Collections.ObjectModel.Collection _resource; + + [System.Xml.Serialization.XmlElementAttribute("resource")] + public System.Collections.ObjectModel.Collection Resource + { + get + { + return _resource; + } + private set + { + _resource = value; + } + } + + /// + /// Gets a value indicating whether the Resource collection is empty. + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool ResourceSpecified + { + get + { + return (this.Resource.Count != 0); + } + } + + /// + /// Initializes a new instance of the class. + /// + public BuildResources() + { + this._resource = new System.Collections.ObjectModel.Collection(); + } + } + + /// + /// 3.0.0+ + /// This element describes all of the classpath resources associated with a project + /// or unit tests. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("XmlSchemaClassGenerator", "2.1.1057.0")] + [System.Xml.Serialization.XmlTypeAttribute("Resource")] + public partial class Resource + { + + /// + /// 3.0.0+ + /// Describe the resource target path. The path is relative to the target/classes + /// directory (i.e. <code>${project.build.outputDirectory}</code>). + /// For example, if you want that resource to appear in a specific package + /// (<code>org.apache.maven.messages</code>), you must specify this + /// element with this value: <code>org/apache/maven/messages</code>. + /// This is not required if you simply put the resources in that directory + /// structure at the source, however. + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("targetPath")] + public string TargetPath { get; set; } + + /// + /// 3.0.0+ + /// Whether resources are filtered to replace tokens with parameterised values or not. + /// The values are taken from the <code>properties</code> element and from the + /// properties in the files listed in the <code>filters</code> element. Note: While the type + /// of this field is <code>String</code> for technical reasons, the semantic type is actually + /// <code>Boolean</code>. Default value is <code>false</code>. + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("filtering")] + public string Filtering { get; set; } + + /// + /// 3.0.0+ + /// Describe the directory where the resources are stored. The path is relative + /// to the POM. + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("directory")] + public string Directory { get; set; } + + [System.Xml.Serialization.XmlIgnoreAttribute()] + private System.Collections.ObjectModel.Collection _includes; + + /// + /// 3.0.0+ + /// A list of patterns to include, e.g. <code>**&#47;*.xml</code>. + /// + [System.Xml.Serialization.XmlArrayAttribute("includes")] + [System.Xml.Serialization.XmlArrayItemAttribute("include")] + public System.Collections.ObjectModel.Collection Includes + { + get + { + return _includes; + } + private set + { + _includes = value; + } + } + + /// + /// Gets a value indicating whether the Includes collection is empty. + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool IncludesSpecified + { + get + { + return (this.Includes.Count != 0); + } + } + + /// + /// Initializes a new instance of the class. + /// + public Resource() + { + this._includes = new System.Collections.ObjectModel.Collection(); + this._excludes = new System.Collections.ObjectModel.Collection(); + } + + [System.Xml.Serialization.XmlIgnoreAttribute()] + private System.Collections.ObjectModel.Collection _excludes; + + /// + /// 3.0.0+ + /// A list of patterns to exclude, e.g. <code>**&#47;*.xml</code> + /// + [System.Xml.Serialization.XmlArrayAttribute("excludes")] + [System.Xml.Serialization.XmlArrayItemAttribute("exclude")] + public System.Collections.ObjectModel.Collection Excludes + { + get + { + return _excludes; + } + private set + { + _excludes = value; + } + } + + /// + /// Gets a value indicating whether the Excludes collection is empty. + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool ExcludesSpecified + { + get + { + return (this.Excludes.Count != 0); + } + } + } + + [System.CodeDom.Compiler.GeneratedCodeAttribute("XmlSchemaClassGenerator", "2.1.1057.0")] + [System.Xml.Serialization.XmlTypeAttribute("ResourceIncludes", AnonymousType=true)] + public partial class ResourceIncludes + { + + [System.Xml.Serialization.XmlIgnoreAttribute()] + private System.Collections.ObjectModel.Collection _include; + + [System.Xml.Serialization.XmlElementAttribute("include")] + public System.Collections.ObjectModel.Collection Include + { + get + { + return _include; + } + private set + { + _include = value; + } + } + + /// + /// Gets a value indicating whether the Include collection is empty. + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool IncludeSpecified + { + get + { + return (this.Include.Count != 0); + } + } + + /// + /// Initializes a new instance of the class. + /// + public ResourceIncludes() + { + this._include = new System.Collections.ObjectModel.Collection(); + } + } + + [System.CodeDom.Compiler.GeneratedCodeAttribute("XmlSchemaClassGenerator", "2.1.1057.0")] + [System.Xml.Serialization.XmlTypeAttribute("ResourceExcludes", AnonymousType=true)] + public partial class ResourceExcludes + { + + [System.Xml.Serialization.XmlIgnoreAttribute()] + private System.Collections.ObjectModel.Collection _exclude; + + [System.Xml.Serialization.XmlElementAttribute("exclude")] + public System.Collections.ObjectModel.Collection Exclude + { + get + { + return _exclude; + } + private set + { + _exclude = value; + } + } + + /// + /// Gets a value indicating whether the Exclude collection is empty. + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool ExcludeSpecified + { + get + { + return (this.Exclude.Count != 0); + } + } + + /// + /// Initializes a new instance of the class. + /// + public ResourceExcludes() + { + this._exclude = new System.Collections.ObjectModel.Collection(); + } + } + + [System.CodeDom.Compiler.GeneratedCodeAttribute("XmlSchemaClassGenerator", "2.1.1057.0")] + [System.Xml.Serialization.XmlTypeAttribute("BuildTestResources", AnonymousType=true)] + public partial class BuildTestResources + { + + [System.Xml.Serialization.XmlIgnoreAttribute()] + private System.Collections.ObjectModel.Collection _testResource; + + [System.Xml.Serialization.XmlElementAttribute("testResource")] + public System.Collections.ObjectModel.Collection TestResource + { + get + { + return _testResource; + } + private set + { + _testResource = value; + } + } + + /// + /// Gets a value indicating whether the TestResource collection is empty. + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool TestResourceSpecified + { + get + { + return (this.TestResource.Count != 0); + } + } + + /// + /// Initializes a new instance of the class. + /// + public BuildTestResources() + { + this._testResource = new System.Collections.ObjectModel.Collection(); + } + } + + [System.CodeDom.Compiler.GeneratedCodeAttribute("XmlSchemaClassGenerator", "2.1.1057.0")] + [System.Xml.Serialization.XmlTypeAttribute("BuildFilters", AnonymousType=true)] + public partial class BuildFilters + { + + [System.Xml.Serialization.XmlIgnoreAttribute()] + private System.Collections.ObjectModel.Collection _filter; + + [System.Xml.Serialization.XmlElementAttribute("filter")] + public System.Collections.ObjectModel.Collection Filter + { + get + { + return _filter; + } + private set + { + _filter = value; + } + } + + /// + /// Gets a value indicating whether the Filter collection is empty. + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool FilterSpecified + { + get + { + return (this.Filter.Count != 0); + } + } + + /// + /// Initializes a new instance of the class. + /// + public BuildFilters() + { + this._filter = new System.Collections.ObjectModel.Collection(); + } + } + + /// + /// 4.0.0+ + /// Section for management of default plugin information for use in a group of POMs. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("XmlSchemaClassGenerator", "2.1.1057.0")] + [System.Xml.Serialization.XmlTypeAttribute("PluginManagement")] + public partial class PluginManagement + { + + [System.Xml.Serialization.XmlIgnoreAttribute()] + private System.Collections.ObjectModel.Collection _plugins; + + /// + /// 4.0.0+ + /// The list of plugins to use. + /// + [System.Xml.Serialization.XmlArrayAttribute("plugins")] + [System.Xml.Serialization.XmlArrayItemAttribute("plugin")] + public System.Collections.ObjectModel.Collection Plugins + { + get + { + return _plugins; + } + private set + { + _plugins = value; + } + } + + /// + /// Gets a value indicating whether the Plugins collection is empty. + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool PluginsSpecified + { + get + { + return (this.Plugins.Count != 0); + } + } + + /// + /// Initializes a new instance of the class. + /// + public PluginManagement() + { + this._plugins = new System.Collections.ObjectModel.Collection(); + } + } + + [System.CodeDom.Compiler.GeneratedCodeAttribute("XmlSchemaClassGenerator", "2.1.1057.0")] + [System.Xml.Serialization.XmlTypeAttribute("PluginManagementPlugins", AnonymousType=true)] + public partial class PluginManagementPlugins + { + + [System.Xml.Serialization.XmlIgnoreAttribute()] + private System.Collections.ObjectModel.Collection _plugin; + + [System.Xml.Serialization.XmlElementAttribute("plugin")] + public System.Collections.ObjectModel.Collection Plugin + { + get + { + return _plugin; + } + private set + { + _plugin = value; + } + } + + /// + /// Gets a value indicating whether the Plugin collection is empty. + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool PluginSpecified + { + get + { + return (this.Plugin.Count != 0); + } + } + + /// + /// Initializes a new instance of the class. + /// + public PluginManagementPlugins() + { + this._plugin = new System.Collections.ObjectModel.Collection(); + } + } + + /// + /// 4.0.0+ + /// The <code>&lt;plugin&gt;</code> element contains informations required for a plugin. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("XmlSchemaClassGenerator", "2.1.1057.0")] + [System.Xml.Serialization.XmlTypeAttribute("Plugin")] + public partial class Plugin + { + + [System.Xml.Serialization.XmlIgnoreAttribute()] + private string _groupId = "org.apache.maven.plugins"; + + /// + /// 4.0.0+ + /// The group ID of the plugin in the repository. + /// + [System.ComponentModel.DefaultValueAttribute("org.apache.maven.plugins")] + [System.Xml.Serialization.XmlElementAttribute("groupId")] + public string GroupId + { + get + { + return _groupId; + } + set + { + _groupId = value; + } + } + + /// + /// 4.0.0+ + /// The artifact ID of the plugin in the repository. + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("artifactId")] + public string ArtifactId { get; set; } + + /// + /// 4.0.0+ + /// The version (or valid range of versions) of the plugin to be used. + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("version")] + public string Version { get; set; } + + /// + /// 4.0.0+ + /// Whether to load Maven extensions (such as packaging and type handlers) from + /// this plugin. For performance reasons, this should only be enabled when necessary. Note: While the type + /// of this field is <code>String</code> for technical reasons, the semantic type is actually + /// <code>Boolean</code>. Default value is <code>false</code>. + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("extensions")] + public string Extensions { get; set; } + + [System.Xml.Serialization.XmlIgnoreAttribute()] + private System.Collections.ObjectModel.Collection _executions; + + /// + /// 4.0.0+ + /// Multiple specifications of a set of goals to execute during the build + /// lifecycle, each having (possibly) a different configuration. + /// + [System.Xml.Serialization.XmlArrayAttribute("executions")] + [System.Xml.Serialization.XmlArrayItemAttribute("execution")] + public System.Collections.ObjectModel.Collection Executions + { + get + { + return _executions; + } + private set + { + _executions = value; + } + } + + /// + /// Gets a value indicating whether the Executions collection is empty. + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool ExecutionsSpecified + { + get + { + return (this.Executions.Count != 0); + } + } + + /// + /// Initializes a new instance of the class. + /// + public Plugin() + { + this._executions = new System.Collections.ObjectModel.Collection(); + this._dependencies = new System.Collections.ObjectModel.Collection(); + } + + [System.Xml.Serialization.XmlIgnoreAttribute()] + private System.Collections.ObjectModel.Collection _dependencies; + + /// + /// 4.0.0+ + /// Additional dependencies that this project needs to introduce to the plugin's + /// classloader. + /// + [System.Xml.Serialization.XmlArrayAttribute("dependencies")] + [System.Xml.Serialization.XmlArrayItemAttribute("dependency")] + public System.Collections.ObjectModel.Collection Dependencies + { + get + { + return _dependencies; + } + private set + { + _dependencies = value; + } + } + + /// + /// Gets a value indicating whether the Dependencies collection is empty. + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool DependenciesSpecified + { + get + { + return (this.Dependencies.Count != 0); + } + } + + /// + /// 4.0.0+ + /// <b>Deprecated</b>. Unused by Maven. + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("goals")] + public PluginGoals Goals { get; set; } + + /// + /// 4.0.0+ + /// Whether any configuration should be propagated to child POMs. Note: While the type + /// of this field is <code>String</code> for technical reasons, the semantic type is actually + /// <code>Boolean</code>. Default value is <code>true</code>. + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("inherited")] + public string Inherited { get; set; } + + /// + /// 0.0.0+ + /// <p>The configuration as DOM object.</p> + /// <p>By default, every element content is trimmed, but starting with Maven 3.1.0, you can add + /// <code>xml:space="preserve"</code> to elements you want to preserve whitespace.</p> + /// <p>You can control how child POMs inherit configuration from parent POMs by adding <code>combine.children</code> + /// or <code>combine.self</code> attributes to the children of the configuration element:</p> + /// <ul> + /// <li><code>combine.children</code>: available values are <code>merge</code> (default) and <code>append</code>,</li> + /// <li><code>combine.self</code>: available values are <code>merge</code> (default) and <code>override</code>.</li> + /// </ul> + /// <p>See <a href="https://maven.apache.org/pom.html#Plugins">POM Reference documentation</a> and + /// <a href="https://codehaus-plexus.github.io/plexus-utils/apidocs/org/codehaus/plexus/util/xml/Xpp3DomUtils.html">Xpp3DomUtils</a> + /// for more information.</p> + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("configuration")] + public PluginConfiguration Configuration { get; set; } + } + + [System.CodeDom.Compiler.GeneratedCodeAttribute("XmlSchemaClassGenerator", "2.1.1057.0")] + [System.Xml.Serialization.XmlTypeAttribute("PluginExecutions", AnonymousType=true)] + public partial class PluginExecutions + { + + [System.Xml.Serialization.XmlIgnoreAttribute()] + private System.Collections.ObjectModel.Collection _execution; + + [System.Xml.Serialization.XmlElementAttribute("execution")] + public System.Collections.ObjectModel.Collection Execution + { + get + { + return _execution; + } + private set + { + _execution = value; + } + } + + /// + /// Gets a value indicating whether the Execution collection is empty. + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool ExecutionSpecified + { + get + { + return (this.Execution.Count != 0); + } + } + + /// + /// Initializes a new instance of the class. + /// + public PluginExecutions() + { + this._execution = new System.Collections.ObjectModel.Collection(); + } + } + + /// + /// 4.0.0+ + /// The <code>&lt;execution&gt;</code> element contains informations required for the + /// execution of a plugin. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("XmlSchemaClassGenerator", "2.1.1057.0")] + [System.Xml.Serialization.XmlTypeAttribute("PluginExecution")] + public partial class PluginExecution + { + + [System.Xml.Serialization.XmlIgnoreAttribute()] + private string _id = "default"; + + /// + /// 4.0.0+ + /// The identifier of this execution for labelling the goals during the build, + /// and for matching executions to merge during inheritance and profile injection. + /// + [System.ComponentModel.DefaultValueAttribute("default")] + [System.Xml.Serialization.XmlElementAttribute("id")] + public string Id + { + get + { + return _id; + } + set + { + _id = value; + } + } + + /// + /// 4.0.0+ + /// The build lifecycle phase to bind the goals in this execution to. If omitted, + /// the goals will be bound to the default phase specified by the plugin. + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("phase")] + public string Phase { get; set; } + + [System.Xml.Serialization.XmlIgnoreAttribute()] + private System.Collections.ObjectModel.Collection _goals; + + /// + /// 4.0.0+ + /// The goals to execute with the given configuration. + /// + [System.Xml.Serialization.XmlArrayAttribute("goals")] + [System.Xml.Serialization.XmlArrayItemAttribute("goal")] + public System.Collections.ObjectModel.Collection Goals + { + get + { + return _goals; + } + private set + { + _goals = value; + } + } + + /// + /// Gets a value indicating whether the Goals collection is empty. + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool GoalsSpecified + { + get + { + return (this.Goals.Count != 0); + } + } + + /// + /// Initializes a new instance of the class. + /// + public PluginExecution() + { + this._goals = new System.Collections.ObjectModel.Collection(); + } + + /// + /// 4.0.0+ + /// Whether any configuration should be propagated to child POMs. Note: While the type + /// of this field is <code>String</code> for technical reasons, the semantic type is actually + /// <code>Boolean</code>. Default value is <code>true</code>. + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("inherited")] + public string Inherited { get; set; } + + /// + /// 0.0.0+ + /// <p>The configuration as DOM object.</p> + /// <p>By default, every element content is trimmed, but starting with Maven 3.1.0, you can add + /// <code>xml:space="preserve"</code> to elements you want to preserve whitespace.</p> + /// <p>You can control how child POMs inherit configuration from parent POMs by adding <code>combine.children</code> + /// or <code>combine.self</code> attributes to the children of the configuration element:</p> + /// <ul> + /// <li><code>combine.children</code>: available values are <code>merge</code> (default) and <code>append</code>,</li> + /// <li><code>combine.self</code>: available values are <code>merge</code> (default) and <code>override</code>.</li> + /// </ul> + /// <p>See <a href="https://maven.apache.org/pom.html#Plugins">POM Reference documentation</a> and + /// <a href="https://codehaus-plexus.github.io/plexus-utils/apidocs/org/codehaus/plexus/util/xml/Xpp3DomUtils.html">Xpp3DomUtils</a> + /// for more information.</p> + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("configuration")] + public PluginExecutionConfiguration Configuration { get; set; } + } + + [System.CodeDom.Compiler.GeneratedCodeAttribute("XmlSchemaClassGenerator", "2.1.1057.0")] + [System.Xml.Serialization.XmlTypeAttribute("PluginExecutionGoals", AnonymousType=true)] + public partial class PluginExecutionGoals + { + + [System.Xml.Serialization.XmlIgnoreAttribute()] + private System.Collections.ObjectModel.Collection _goal; + + [System.Xml.Serialization.XmlElementAttribute("goal")] + public System.Collections.ObjectModel.Collection Goal + { + get + { + return _goal; + } + private set + { + _goal = value; + } + } + + /// + /// Gets a value indicating whether the Goal collection is empty. + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool GoalSpecified + { + get + { + return (this.Goal.Count != 0); + } + } + + /// + /// Initializes a new instance of the class. + /// + public PluginExecutionGoals() + { + this._goal = new System.Collections.ObjectModel.Collection(); + } + } + + [System.CodeDom.Compiler.GeneratedCodeAttribute("XmlSchemaClassGenerator", "2.1.1057.0")] + [System.Xml.Serialization.XmlTypeAttribute("PluginExecutionConfiguration", AnonymousType=true)] + public partial class PluginExecutionConfiguration + { + + [System.Xml.Serialization.XmlIgnoreAttribute()] + private System.Collections.ObjectModel.Collection _any; + + [System.Xml.Serialization.XmlAnyElementAttribute()] + public System.Collections.ObjectModel.Collection Any + { + get + { + return _any; + } + private set + { + _any = value; + } + } + + /// + /// Gets a value indicating whether the Any collection is empty. + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool AnySpecified + { + get + { + return (this.Any.Count != 0); + } + } + + /// + /// Initializes a new instance of the class. + /// + public PluginExecutionConfiguration() + { + this._any = new System.Collections.ObjectModel.Collection(); + } + } + + [System.CodeDom.Compiler.GeneratedCodeAttribute("XmlSchemaClassGenerator", "2.1.1057.0")] + [System.Xml.Serialization.XmlTypeAttribute("PluginDependencies", AnonymousType=true)] + public partial class PluginDependencies + { + + [System.Xml.Serialization.XmlIgnoreAttribute()] + private System.Collections.ObjectModel.Collection _dependency; + + [System.Xml.Serialization.XmlElementAttribute("dependency")] + public System.Collections.ObjectModel.Collection Dependency + { + get + { + return _dependency; + } + private set + { + _dependency = value; + } + } + + /// + /// Gets a value indicating whether the Dependency collection is empty. + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool DependencySpecified + { + get + { + return (this.Dependency.Count != 0); + } + } + + /// + /// Initializes a new instance of the class. + /// + public PluginDependencies() + { + this._dependency = new System.Collections.ObjectModel.Collection(); + } + } + + [System.CodeDom.Compiler.GeneratedCodeAttribute("XmlSchemaClassGenerator", "2.1.1057.0")] + [System.Xml.Serialization.XmlTypeAttribute("PluginGoals", AnonymousType=true)] + public partial class PluginGoals + { + + [System.Xml.Serialization.XmlIgnoreAttribute()] + private System.Collections.ObjectModel.Collection _any; + + [System.Xml.Serialization.XmlAnyElementAttribute()] + public System.Collections.ObjectModel.Collection Any + { + get + { + return _any; + } + private set + { + _any = value; + } + } + + /// + /// Gets a value indicating whether the Any collection is empty. + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool AnySpecified + { + get + { + return (this.Any.Count != 0); + } + } + + /// + /// Initializes a new instance of the class. + /// + public PluginGoals() + { + this._any = new System.Collections.ObjectModel.Collection(); + } + } + + [System.CodeDom.Compiler.GeneratedCodeAttribute("XmlSchemaClassGenerator", "2.1.1057.0")] + [System.Xml.Serialization.XmlTypeAttribute("PluginConfiguration", AnonymousType=true)] + public partial class PluginConfiguration + { + + [System.Xml.Serialization.XmlIgnoreAttribute()] + private System.Collections.ObjectModel.Collection _any; + + [System.Xml.Serialization.XmlAnyElementAttribute()] + public System.Collections.ObjectModel.Collection Any + { + get + { + return _any; + } + private set + { + _any = value; + } + } + + /// + /// Gets a value indicating whether the Any collection is empty. + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool AnySpecified + { + get + { + return (this.Any.Count != 0); + } + } + + /// + /// Initializes a new instance of the class. + /// + public PluginConfiguration() + { + this._any = new System.Collections.ObjectModel.Collection(); + } + } + + [System.CodeDom.Compiler.GeneratedCodeAttribute("XmlSchemaClassGenerator", "2.1.1057.0")] + [System.Xml.Serialization.XmlTypeAttribute("BuildPlugins", AnonymousType=true)] + public partial class BuildPlugins + { + + [System.Xml.Serialization.XmlIgnoreAttribute()] + private System.Collections.ObjectModel.Collection _plugin; + + [System.Xml.Serialization.XmlElementAttribute("plugin")] + public System.Collections.ObjectModel.Collection Plugin + { + get + { + return _plugin; + } + private set + { + _plugin = value; + } + } + + /// + /// Gets a value indicating whether the Plugin collection is empty. + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool PluginSpecified + { + get + { + return (this.Plugin.Count != 0); + } + } + + /// + /// Initializes a new instance of the class. + /// + public BuildPlugins() + { + this._plugin = new System.Collections.ObjectModel.Collection(); + } + } + + [System.CodeDom.Compiler.GeneratedCodeAttribute("XmlSchemaClassGenerator", "2.1.1057.0")] + [System.Xml.Serialization.XmlTypeAttribute("ModelReports", AnonymousType=true)] + public partial class ModelReports + { + + [System.Xml.Serialization.XmlIgnoreAttribute()] + private System.Collections.ObjectModel.Collection _any; + + [System.Xml.Serialization.XmlAnyElementAttribute()] + public System.Collections.ObjectModel.Collection Any + { + get + { + return _any; + } + private set + { + _any = value; + } + } + + /// + /// Gets a value indicating whether the Any collection is empty. + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool AnySpecified + { + get + { + return (this.Any.Count != 0); + } + } + + /// + /// Initializes a new instance of the class. + /// + public ModelReports() + { + this._any = new System.Collections.ObjectModel.Collection(); + } + } + + /// + /// 4.0.0+ + /// Section for management of reports and their configuration. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("XmlSchemaClassGenerator", "2.1.1057.0")] + [System.Xml.Serialization.XmlTypeAttribute("Reporting")] + public partial class Reporting + { + + /// + /// 4.0.0+ + /// If true, then the default reports are not included in the site generation. + /// This includes the reports in the "Project Info" menu. Note: While the type + /// of this field is <code>String</code> for technical reasons, the semantic type is actually + /// <code>Boolean</code>. Default value is <code>false</code>. + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("excludeDefaults")] + public string ExcludeDefaults { get; set; } + + /// + /// 4.0.0+ + /// Where to store all of the generated reports. The default is + /// <code>${project.build.directory}/site</code>. + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("outputDirectory")] + public string OutputDirectory { get; set; } + + [System.Xml.Serialization.XmlIgnoreAttribute()] + private System.Collections.ObjectModel.Collection _plugins; + + /// + /// 4.0.0+ + /// The reporting plugins to use and their configuration. + /// + [System.Xml.Serialization.XmlArrayAttribute("plugins")] + [System.Xml.Serialization.XmlArrayItemAttribute("plugin")] + public System.Collections.ObjectModel.Collection Plugins + { + get + { + return _plugins; + } + private set + { + _plugins = value; + } + } + + /// + /// Gets a value indicating whether the Plugins collection is empty. + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool PluginsSpecified + { + get + { + return (this.Plugins.Count != 0); + } + } + + /// + /// Initializes a new instance of the class. + /// + public Reporting() + { + this._plugins = new System.Collections.ObjectModel.Collection(); + } + } + + [System.CodeDom.Compiler.GeneratedCodeAttribute("XmlSchemaClassGenerator", "2.1.1057.0")] + [System.Xml.Serialization.XmlTypeAttribute("ReportingPlugins", AnonymousType=true)] + public partial class ReportingPlugins + { + + [System.Xml.Serialization.XmlIgnoreAttribute()] + private System.Collections.ObjectModel.Collection _plugin; + + [System.Xml.Serialization.XmlElementAttribute("plugin")] + public System.Collections.ObjectModel.Collection Plugin + { + get + { + return _plugin; + } + private set + { + _plugin = value; + } + } + + /// + /// Gets a value indicating whether the Plugin collection is empty. + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool PluginSpecified + { + get + { + return (this.Plugin.Count != 0); + } + } + + /// + /// Initializes a new instance of the class. + /// + public ReportingPlugins() + { + this._plugin = new System.Collections.ObjectModel.Collection(); + } + } + + /// + /// 4.0.0+ + /// The <code>&lt;plugin&gt;</code> element contains informations required for a report plugin. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("XmlSchemaClassGenerator", "2.1.1057.0")] + [System.Xml.Serialization.XmlTypeAttribute("ReportPlugin")] + public partial class ReportPlugin + { + + [System.Xml.Serialization.XmlIgnoreAttribute()] + private string _groupId = "org.apache.maven.plugins"; + + /// + /// 4.0.0+ + /// The group ID of the reporting plugin in the repository. + /// + [System.ComponentModel.DefaultValueAttribute("org.apache.maven.plugins")] + [System.Xml.Serialization.XmlElementAttribute("groupId")] + public string GroupId + { + get + { + return _groupId; + } + set + { + _groupId = value; + } + } + + /// + /// 4.0.0+ + /// The artifact ID of the reporting plugin in the repository. + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("artifactId")] + public string ArtifactId { get; set; } + + /// + /// 4.0.0+ + /// The version of the reporting plugin to be used. + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("version")] + public string Version { get; set; } + + [System.Xml.Serialization.XmlIgnoreAttribute()] + private System.Collections.ObjectModel.Collection _reportSets; + + /// + /// 4.0.0+ + /// Multiple specifications of a set of reports, each having (possibly) different + /// configuration. This is the reporting parallel to an <code>execution</code> in the build. + /// + [System.Xml.Serialization.XmlArrayAttribute("reportSets")] + [System.Xml.Serialization.XmlArrayItemAttribute("reportSet")] + public System.Collections.ObjectModel.Collection ReportSets + { + get + { + return _reportSets; + } + private set + { + _reportSets = value; + } + } + + /// + /// Gets a value indicating whether the ReportSets collection is empty. + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool ReportSetsSpecified + { + get + { + return (this.ReportSets.Count != 0); + } + } + + /// + /// Initializes a new instance of the class. + /// + public ReportPlugin() + { + this._reportSets = new System.Collections.ObjectModel.Collection(); + } + + /// + /// 4.0.0+ + /// Whether any configuration should be propagated to child POMs. Note: While the type + /// of this field is <code>String</code> for technical reasons, the semantic type is actually + /// <code>Boolean</code>. Default value is <code>true</code>. + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("inherited")] + public string Inherited { get; set; } + + /// + /// 0.0.0+ + /// <p>The configuration as DOM object.</p> + /// <p>By default, every element content is trimmed, but starting with Maven 3.1.0, you can add + /// <code>xml:space="preserve"</code> to elements you want to preserve whitespace.</p> + /// <p>You can control how child POMs inherit configuration from parent POMs by adding <code>combine.children</code> + /// or <code>combine.self</code> attributes to the children of the configuration element:</p> + /// <ul> + /// <li><code>combine.children</code>: available values are <code>merge</code> (default) and <code>append</code>,</li> + /// <li><code>combine.self</code>: available values are <code>merge</code> (default) and <code>override</code>.</li> + /// </ul> + /// <p>See <a href="https://maven.apache.org/pom.html#Plugins">POM Reference documentation</a> and + /// <a href="https://codehaus-plexus.github.io/plexus-utils/apidocs/org/codehaus/plexus/util/xml/Xpp3DomUtils.html">Xpp3DomUtils</a> + /// for more information.</p> + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("configuration")] + public ReportPluginConfiguration Configuration { get; set; } + } + + [System.CodeDom.Compiler.GeneratedCodeAttribute("XmlSchemaClassGenerator", "2.1.1057.0")] + [System.Xml.Serialization.XmlTypeAttribute("ReportPluginReportSets", AnonymousType=true)] + public partial class ReportPluginReportSets + { + + [System.Xml.Serialization.XmlIgnoreAttribute()] + private System.Collections.ObjectModel.Collection _reportSet; + + [System.Xml.Serialization.XmlElementAttribute("reportSet")] + public System.Collections.ObjectModel.Collection ReportSet + { + get + { + return _reportSet; + } + private set + { + _reportSet = value; + } + } + + /// + /// Gets a value indicating whether the ReportSet collection is empty. + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool ReportSetSpecified + { + get + { + return (this.ReportSet.Count != 0); + } + } + + /// + /// Initializes a new instance of the class. + /// + public ReportPluginReportSets() + { + this._reportSet = new System.Collections.ObjectModel.Collection(); + } + } + + /// + /// 4.0.0+ + /// Represents a set of reports and configuration to be used to generate them. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("XmlSchemaClassGenerator", "2.1.1057.0")] + [System.Xml.Serialization.XmlTypeAttribute("ReportSet")] + public partial class ReportSet + { + + [System.Xml.Serialization.XmlIgnoreAttribute()] + private string _id = "default"; + + /// + /// 0.0.0+ + /// The unique id for this report set, to be used during POM inheritance and profile injection + /// for merging of report sets. + /// + [System.ComponentModel.DefaultValueAttribute("default")] + [System.Xml.Serialization.XmlElementAttribute("id")] + public string Id + { + get + { + return _id; + } + set + { + _id = value; + } + } + + [System.Xml.Serialization.XmlIgnoreAttribute()] + private System.Collections.ObjectModel.Collection _reports; + + /// + /// 4.0.0+ + /// The list of reports from this plugin which should be generated from this set. + /// + [System.Xml.Serialization.XmlArrayAttribute("reports")] + [System.Xml.Serialization.XmlArrayItemAttribute("report")] + public System.Collections.ObjectModel.Collection Reports + { + get + { + return _reports; + } + private set + { + _reports = value; + } + } + + /// + /// Gets a value indicating whether the Reports collection is empty. + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool ReportsSpecified + { + get + { + return (this.Reports.Count != 0); + } + } + + /// + /// Initializes a new instance of the class. + /// + public ReportSet() + { + this._reports = new System.Collections.ObjectModel.Collection(); + } + + /// + /// 4.0.0+ + /// Whether any configuration should be propagated to child POMs. Note: While the type + /// of this field is <code>String</code> for technical reasons, the semantic type is actually + /// <code>Boolean</code>. Default value is <code>true</code>. + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("inherited")] + public string Inherited { get; set; } + + /// + /// 0.0.0+ + /// <p>The configuration as DOM object.</p> + /// <p>By default, every element content is trimmed, but starting with Maven 3.1.0, you can add + /// <code>xml:space="preserve"</code> to elements you want to preserve whitespace.</p> + /// <p>You can control how child POMs inherit configuration from parent POMs by adding <code>combine.children</code> + /// or <code>combine.self</code> attributes to the children of the configuration element:</p> + /// <ul> + /// <li><code>combine.children</code>: available values are <code>merge</code> (default) and <code>append</code>,</li> + /// <li><code>combine.self</code>: available values are <code>merge</code> (default) and <code>override</code>.</li> + /// </ul> + /// <p>See <a href="https://maven.apache.org/pom.html#Plugins">POM Reference documentation</a> and + /// <a href="https://codehaus-plexus.github.io/plexus-utils/apidocs/org/codehaus/plexus/util/xml/Xpp3DomUtils.html">Xpp3DomUtils</a> + /// for more information.</p> + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("configuration")] + public ReportSetConfiguration Configuration { get; set; } + } + + [System.CodeDom.Compiler.GeneratedCodeAttribute("XmlSchemaClassGenerator", "2.1.1057.0")] + [System.Xml.Serialization.XmlTypeAttribute("ReportSetReports", AnonymousType=true)] + public partial class ReportSetReports + { + + [System.Xml.Serialization.XmlIgnoreAttribute()] + private System.Collections.ObjectModel.Collection _report; + + [System.Xml.Serialization.XmlElementAttribute("report")] + public System.Collections.ObjectModel.Collection Report + { + get + { + return _report; + } + private set + { + _report = value; + } + } + + /// + /// Gets a value indicating whether the Report collection is empty. + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool ReportSpecified + { + get + { + return (this.Report.Count != 0); + } + } + + /// + /// Initializes a new instance of the class. + /// + public ReportSetReports() + { + this._report = new System.Collections.ObjectModel.Collection(); + } + } + + [System.CodeDom.Compiler.GeneratedCodeAttribute("XmlSchemaClassGenerator", "2.1.1057.0")] + [System.Xml.Serialization.XmlTypeAttribute("ReportSetConfiguration", AnonymousType=true)] + public partial class ReportSetConfiguration + { + + [System.Xml.Serialization.XmlIgnoreAttribute()] + private System.Collections.ObjectModel.Collection _any; + + [System.Xml.Serialization.XmlAnyElementAttribute()] + public System.Collections.ObjectModel.Collection Any + { + get + { + return _any; + } + private set + { + _any = value; + } + } + + /// + /// Gets a value indicating whether the Any collection is empty. + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool AnySpecified + { + get + { + return (this.Any.Count != 0); + } + } + + /// + /// Initializes a new instance of the class. + /// + public ReportSetConfiguration() + { + this._any = new System.Collections.ObjectModel.Collection(); + } + } + + [System.CodeDom.Compiler.GeneratedCodeAttribute("XmlSchemaClassGenerator", "2.1.1057.0")] + [System.Xml.Serialization.XmlTypeAttribute("ReportPluginConfiguration", AnonymousType=true)] + public partial class ReportPluginConfiguration + { + + [System.Xml.Serialization.XmlIgnoreAttribute()] + private System.Collections.ObjectModel.Collection _any; + + [System.Xml.Serialization.XmlAnyElementAttribute()] + public System.Collections.ObjectModel.Collection Any + { + get + { + return _any; + } + private set + { + _any = value; + } + } + + /// + /// Gets a value indicating whether the Any collection is empty. + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool AnySpecified + { + get + { + return (this.Any.Count != 0); + } + } + + /// + /// Initializes a new instance of the class. + /// + public ReportPluginConfiguration() + { + this._any = new System.Collections.ObjectModel.Collection(); + } + } + + [System.CodeDom.Compiler.GeneratedCodeAttribute("XmlSchemaClassGenerator", "2.1.1057.0")] + [System.Xml.Serialization.XmlTypeAttribute("ModelProfiles", AnonymousType=true)] + public partial class ModelProfiles + { + + [System.Xml.Serialization.XmlIgnoreAttribute()] + private System.Collections.ObjectModel.Collection _profile; + + [System.Xml.Serialization.XmlElementAttribute("profile")] + public System.Collections.ObjectModel.Collection Profile + { + get + { + return _profile; + } + private set + { + _profile = value; + } + } + + /// + /// Gets a value indicating whether the Profile collection is empty. + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool ProfileSpecified + { + get + { + return (this.Profile.Count != 0); + } + } + + /// + /// Initializes a new instance of the class. + /// + public ModelProfiles() + { + this._profile = new System.Collections.ObjectModel.Collection(); + } + } + + /// + /// 4.0.0+ + /// Modifications to the build process which is activated based on environmental + /// parameters or command line arguments. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("XmlSchemaClassGenerator", "2.1.1057.0")] + [System.Xml.Serialization.XmlTypeAttribute("Profile")] + public partial class Profile + { + + [System.Xml.Serialization.XmlIgnoreAttribute()] + private string _id = "default"; + + /// + /// 4.0.0+ + /// The identifier of this build profile. This is used for command line + /// activation, and identifies profiles to be merged. + /// + [System.ComponentModel.DefaultValueAttribute("default")] + [System.Xml.Serialization.XmlElementAttribute("id")] + public string Id + { + get + { + return _id; + } + set + { + _id = value; + } + } + + /// + /// 4.0.0+ + /// The conditional logic which will automatically trigger the inclusion of this + /// profile. + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("activation")] + public Activation Activation { get; set; } + + /// + /// 4.0.0+ + /// Information required to build the project. + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("build")] + public BuildBase Build { get; set; } + + [System.Xml.Serialization.XmlIgnoreAttribute()] + private System.Collections.ObjectModel.Collection _modules; + + /// + /// 4.0.0+ + /// The modules (sometimes called subprojects) to build as a part of this + /// project. Each module listed is a relative path to the directory containing the module. + /// To be consistent with the way default urls are calculated from parent, it is recommended + /// to have module names match artifact ids. + /// + [System.Xml.Serialization.XmlArrayAttribute("modules")] + [System.Xml.Serialization.XmlArrayItemAttribute("module")] + public System.Collections.ObjectModel.Collection Modules + { + get + { + return _modules; + } + private set + { + _modules = value; + } + } + + /// + /// Gets a value indicating whether the Modules collection is empty. + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool ModulesSpecified + { + get + { + return (this.Modules.Count != 0); + } + } + + /// + /// Initializes a new instance of the class. + /// + public Profile() + { + this._modules = new System.Collections.ObjectModel.Collection(); + this._dependencies = new System.Collections.ObjectModel.Collection(); + this._repositories = new System.Collections.ObjectModel.Collection(); + this._pluginRepositories = new System.Collections.ObjectModel.Collection(); + } + + /// + /// 4.0.0+ + /// Distribution information for a project that enables deployment of the site + /// and artifacts to remote web servers and repositories respectively. + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("distributionManagement")] + public DistributionManagement DistributionManagement { get; set; } + + /// + /// 4.0.0+ + /// Properties that can be used throughout the POM as a substitution, and + /// are used as filters in resources if enabled. + /// The format is <code>&lt;name&gt;value&lt;/name&gt;</code>. + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("properties")] + public ProfileProperties Properties { get; set; } + + /// + /// 4.0.0+ + /// Default dependency information for projects that inherit from this one. The + /// dependencies in this section are not immediately resolved. Instead, when a POM derived + /// from this one declares a dependency described by a matching groupId and artifactId, the + /// version and other values from this section are used for that dependency if they were not + /// already specified. + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("dependencyManagement")] + public DependencyManagement DependencyManagement { get; set; } + + [System.Xml.Serialization.XmlIgnoreAttribute()] + private System.Collections.ObjectModel.Collection _dependencies; + + /// + /// 3.0.0+ + /// This element describes all of the dependencies associated with a + /// project. + /// These dependencies are used to construct a classpath for your + /// project during the build process. They are automatically downloaded from the + /// repositories defined in this project. + /// See <a href="https://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html">the + /// dependency mechanism</a> for more information. + /// + [System.Xml.Serialization.XmlArrayAttribute("dependencies")] + [System.Xml.Serialization.XmlArrayItemAttribute("dependency")] + public System.Collections.ObjectModel.Collection Dependencies + { + get + { + return _dependencies; + } + private set + { + _dependencies = value; + } + } + + /// + /// Gets a value indicating whether the Dependencies collection is empty. + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool DependenciesSpecified + { + get + { + return (this.Dependencies.Count != 0); + } + } + + [System.Xml.Serialization.XmlIgnoreAttribute()] + private System.Collections.ObjectModel.Collection _repositories; + + /// + /// 4.0.0+ + /// The lists of the remote repositories for discovering dependencies and + /// extensions. + /// + [System.Xml.Serialization.XmlArrayAttribute("repositories")] + [System.Xml.Serialization.XmlArrayItemAttribute("repository")] + public System.Collections.ObjectModel.Collection Repositories + { + get + { + return _repositories; + } + private set + { + _repositories = value; + } + } + + /// + /// Gets a value indicating whether the Repositories collection is empty. + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool RepositoriesSpecified + { + get + { + return (this.Repositories.Count != 0); + } + } + + [System.Xml.Serialization.XmlIgnoreAttribute()] + private System.Collections.ObjectModel.Collection _pluginRepositories; + + /// + /// 4.0.0+ + /// The lists of the remote repositories for discovering plugins for builds and + /// reports. + /// + [System.Xml.Serialization.XmlArrayAttribute("pluginRepositories")] + [System.Xml.Serialization.XmlArrayItemAttribute("pluginRepository")] + public System.Collections.ObjectModel.Collection PluginRepositories + { + get + { + return _pluginRepositories; + } + private set + { + _pluginRepositories = value; + } + } + + /// + /// Gets a value indicating whether the PluginRepositories collection is empty. + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool PluginRepositoriesSpecified + { + get + { + return (this.PluginRepositories.Count != 0); + } + } + + /// + /// 4.0.0+ + /// <b>Deprecated</b>. Now ignored by Maven. + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("reports")] + public ProfileReports Reports { get; set; } + + /// + /// 4.0.0+ + /// This element includes the specification of report plugins to use + /// to generate the reports on the Maven-generated site. + /// These reports will be run when a user executes <code>mvn site</code>. + /// All of the reports will be included in the navigation bar for browsing. + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("reporting")] + public Reporting Reporting { get; set; } + } + + /// + /// 4.0.0+ + /// The conditions within the build runtime environment which will trigger the + /// automatic inclusion of the build profile. Multiple conditions can be defined, which must + /// be all satisfied to activate the profile. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("XmlSchemaClassGenerator", "2.1.1057.0")] + [System.Xml.Serialization.XmlTypeAttribute("Activation")] + public partial class Activation + { + + [System.Xml.Serialization.XmlIgnoreAttribute()] + private bool _activeByDefault = false; + + /// + /// 4.0.0+ + /// If set to true, this profile will be active unless another profile in this + /// pom is activated using the command line -P option or by one of that profile's + /// activators. + /// + [System.ComponentModel.DefaultValueAttribute(false)] + [System.Xml.Serialization.XmlElementAttribute("activeByDefault")] + public bool ActiveByDefault + { + get + { + return _activeByDefault; + } + set + { + _activeByDefault = value; + } + } + + /// + /// 4.0.0+ + /// Specifies that this profile will be activated when a matching JDK is detected. + /// For example, <code>1.4</code> only activates on JDKs versioned 1.4, + /// while <code>!1.4</code> matches any JDK that is not version 1.4. Ranges are supported too: + /// <code>[1.5,)</code> activates when the JDK is 1.5 minimum. + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("jdk")] + public string Jdk { get; set; } + + /// + /// 4.0.0+ + /// Specifies that this profile will be activated when matching operating system + /// attributes are detected. + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("os")] + public ActivationOs Os { get; set; } + + /// + /// 4.0.0+ + /// Specifies that this profile will be activated when this system property is + /// specified. + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("property")] + public ActivationProperty Property { get; set; } + + /// + /// 4.0.0+ + /// Specifies that this profile will be activated based on existence of a file. + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("file")] + public ActivationFile File { get; set; } + } + + /// + /// 4.0.0+ + /// This is an activator which will detect an operating system's attributes in order + /// to activate its profile. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("XmlSchemaClassGenerator", "2.1.1057.0")] + [System.Xml.Serialization.XmlTypeAttribute("ActivationOS")] + public partial class ActivationOs + { + + /// + /// 4.0.0+ + /// The name of the operating system to be used to activate the profile. This must be an exact match + /// of the <code>${os.name}</code> Java property, such as <code>Windows XP</code>. + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("name")] + public string Name { get; set; } + + /// + /// 4.0.0+ + /// The general family of the OS to be used to activate the profile, such as + /// <code>windows</code> or <code>unix</code>. + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("family")] + public string Family { get; set; } + + /// + /// 4.0.0+ + /// The architecture of the operating system to be used to activate the + /// profile. + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("arch")] + public string Arch { get; set; } + + /// + /// 4.0.0+ + /// The version of the operating system to be used to activate the + /// profile. + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("version")] + public string Version { get; set; } + } + + /// + /// 4.0.0+ + /// This is the property specification used to activate a profile. If the value field + /// is empty, then the existence of the named property will activate the profile, otherwise it + /// does a case-sensitive match against the property value as well. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("XmlSchemaClassGenerator", "2.1.1057.0")] + [System.Xml.Serialization.XmlTypeAttribute("ActivationProperty")] + public partial class ActivationProperty + { + + /// + /// 4.0.0+ + /// The name of the property to be used to activate a profile. + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("name")] + public string Name { get; set; } + + /// + /// 4.0.0+ + /// The value of the property required to activate a profile. + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("value")] + public string Value { get; set; } + } + + /// + /// 4.0.0+ + /// This is the file specification used to activate the profile. The <code>missing</code> value + /// is the location of a file that needs to exist, and if it doesn't, the profile will be + /// activated. On the other hand, <code>exists</code> will test for the existence of the file and if it is + /// there, the profile will be activated.<br> + /// Variable interpolation for these file specifications is limited to <code>${basedir}</code>, + /// System properties and request properties. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("XmlSchemaClassGenerator", "2.1.1057.0")] + [System.Xml.Serialization.XmlTypeAttribute("ActivationFile")] + public partial class ActivationFile + { + + /// + /// 4.0.0+ + /// The name of the file that must be missing to activate the + /// profile. + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("missing")] + public string Missing { get; set; } + + /// + /// 4.0.0+ + /// The name of the file that must exist to activate the profile. + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("exists")] + public string Exists { get; set; } + } + + /// + /// 3.0.0+ + /// Generic informations for a build. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("XmlSchemaClassGenerator", "2.1.1057.0")] + [System.Xml.Serialization.XmlTypeAttribute("BuildBase")] + public partial class BuildBase + { + + /// + /// 3.0.0+ + /// The default goal (or phase in Maven 2) to execute when none is specified for + /// the project. Note that in case of a multi-module build, only the default goal of the top-level + /// project is relevant, i.e. the default goals of child modules are ignored. Since Maven 3, + /// multiple goals/phases can be separated by whitespace. + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("defaultGoal")] + public string DefaultGoal { get; set; } + + [System.Xml.Serialization.XmlIgnoreAttribute()] + private System.Collections.ObjectModel.Collection _resources; + + /// + /// 3.0.0+ + /// This element describes all of the classpath resources such as properties + /// files associated with a project. These resources are often included in the final + /// package. + /// The default value is <code>src/main/resources</code>. + /// + [System.Xml.Serialization.XmlArrayAttribute("resources")] + [System.Xml.Serialization.XmlArrayItemAttribute("resource")] + public System.Collections.ObjectModel.Collection Resources + { + get + { + return _resources; + } + private set + { + _resources = value; + } + } + + /// + /// Gets a value indicating whether the Resources collection is empty. + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool ResourcesSpecified + { + get + { + return (this.Resources.Count != 0); + } + } + + /// + /// Initializes a new instance of the class. + /// + public BuildBase() + { + this._resources = new System.Collections.ObjectModel.Collection(); + this._testResources = new System.Collections.ObjectModel.Collection(); + this._filters = new System.Collections.ObjectModel.Collection(); + this._plugins = new System.Collections.ObjectModel.Collection(); + } + + [System.Xml.Serialization.XmlIgnoreAttribute()] + private System.Collections.ObjectModel.Collection _testResources; + + /// + /// 4.0.0+ + /// This element describes all of the classpath resources such as properties + /// files associated with a project's unit tests. + /// The default value is <code>src/test/resources</code>. + /// + [System.Xml.Serialization.XmlArrayAttribute("testResources")] + [System.Xml.Serialization.XmlArrayItemAttribute("testResource")] + public System.Collections.ObjectModel.Collection TestResources + { + get + { + return _testResources; + } + private set + { + _testResources = value; + } + } + + /// + /// Gets a value indicating whether the TestResources collection is empty. + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool TestResourcesSpecified + { + get + { + return (this.TestResources.Count != 0); + } + } + + /// + /// 4.0.0+ + /// The directory where all files generated by the build are placed. + /// The default value is <code>target</code>. + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("directory")] + public string Directory { get; set; } + + /// + /// 4.0.0+ + /// The filename (excluding the extension, and with no path information) that + /// the produced artifact will be called. + /// The default value is <code>${artifactId}-${version}</code>. + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("finalName")] + public string FinalName { get; set; } + + [System.Xml.Serialization.XmlIgnoreAttribute()] + private System.Collections.ObjectModel.Collection _filters; + + /// + /// 4.0.0+ + /// The list of filter properties files that are used when filtering is enabled. + /// + [System.Xml.Serialization.XmlArrayAttribute("filters")] + [System.Xml.Serialization.XmlArrayItemAttribute("filter")] + public System.Collections.ObjectModel.Collection Filters + { + get + { + return _filters; + } + private set + { + _filters = value; + } + } + + /// + /// Gets a value indicating whether the Filters collection is empty. + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool FiltersSpecified + { + get + { + return (this.Filters.Count != 0); + } + } + + /// + /// 4.0.0+ + /// Default plugin information to be made available for reference by projects + /// derived from this one. This plugin configuration will not be resolved or bound to the + /// lifecycle unless referenced. Any local configuration for a given plugin will override + /// the plugin's entire definition here. + /// + [System.Diagnostics.CodeAnalysis.AllowNullAttribute()] + [System.Diagnostics.CodeAnalysis.MaybeNullAttribute()] + [System.Xml.Serialization.XmlElementAttribute("pluginManagement")] + public PluginManagement PluginManagement { get; set; } + + [System.Xml.Serialization.XmlIgnoreAttribute()] + private System.Collections.ObjectModel.Collection _plugins; + + /// + /// 4.0.0+ + /// The list of plugins to use. + /// + [System.Xml.Serialization.XmlArrayAttribute("plugins")] + [System.Xml.Serialization.XmlArrayItemAttribute("plugin")] + public System.Collections.ObjectModel.Collection Plugins + { + get + { + return _plugins; + } + private set + { + _plugins = value; + } + } + + /// + /// Gets a value indicating whether the Plugins collection is empty. + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool PluginsSpecified + { + get + { + return (this.Plugins.Count != 0); + } + } + } + + [System.CodeDom.Compiler.GeneratedCodeAttribute("XmlSchemaClassGenerator", "2.1.1057.0")] + [System.Xml.Serialization.XmlTypeAttribute("BuildBaseResources", AnonymousType=true)] + public partial class BuildBaseResources + { + + [System.Xml.Serialization.XmlIgnoreAttribute()] + private System.Collections.ObjectModel.Collection _resource; + + [System.Xml.Serialization.XmlElementAttribute("resource")] + public System.Collections.ObjectModel.Collection Resource + { + get + { + return _resource; + } + private set + { + _resource = value; + } + } + + /// + /// Gets a value indicating whether the Resource collection is empty. + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool ResourceSpecified + { + get + { + return (this.Resource.Count != 0); + } + } + + /// + /// Initializes a new instance of the class. + /// + public BuildBaseResources() + { + this._resource = new System.Collections.ObjectModel.Collection(); + } + } + + [System.CodeDom.Compiler.GeneratedCodeAttribute("XmlSchemaClassGenerator", "2.1.1057.0")] + [System.Xml.Serialization.XmlTypeAttribute("BuildBaseTestResources", AnonymousType=true)] + public partial class BuildBaseTestResources + { + + [System.Xml.Serialization.XmlIgnoreAttribute()] + private System.Collections.ObjectModel.Collection _testResource; + + [System.Xml.Serialization.XmlElementAttribute("testResource")] + public System.Collections.ObjectModel.Collection TestResource + { + get + { + return _testResource; + } + private set + { + _testResource = value; + } + } + + /// + /// Gets a value indicating whether the TestResource collection is empty. + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool TestResourceSpecified + { + get + { + return (this.TestResource.Count != 0); + } + } + + /// + /// Initializes a new instance of the class. + /// + public BuildBaseTestResources() + { + this._testResource = new System.Collections.ObjectModel.Collection(); + } + } + + [System.CodeDom.Compiler.GeneratedCodeAttribute("XmlSchemaClassGenerator", "2.1.1057.0")] + [System.Xml.Serialization.XmlTypeAttribute("BuildBaseFilters", AnonymousType=true)] + public partial class BuildBaseFilters + { + + [System.Xml.Serialization.XmlIgnoreAttribute()] + private System.Collections.ObjectModel.Collection _filter; + + [System.Xml.Serialization.XmlElementAttribute("filter")] + public System.Collections.ObjectModel.Collection Filter + { + get + { + return _filter; + } + private set + { + _filter = value; + } + } + + /// + /// Gets a value indicating whether the Filter collection is empty. + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool FilterSpecified + { + get + { + return (this.Filter.Count != 0); + } + } + + /// + /// Initializes a new instance of the class. + /// + public BuildBaseFilters() + { + this._filter = new System.Collections.ObjectModel.Collection(); + } + } + + [System.CodeDom.Compiler.GeneratedCodeAttribute("XmlSchemaClassGenerator", "2.1.1057.0")] + [System.Xml.Serialization.XmlTypeAttribute("BuildBasePlugins", AnonymousType=true)] + public partial class BuildBasePlugins + { + + [System.Xml.Serialization.XmlIgnoreAttribute()] + private System.Collections.ObjectModel.Collection _plugin; + + [System.Xml.Serialization.XmlElementAttribute("plugin")] + public System.Collections.ObjectModel.Collection Plugin + { + get + { + return _plugin; + } + private set + { + _plugin = value; + } + } + + /// + /// Gets a value indicating whether the Plugin collection is empty. + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool PluginSpecified + { + get + { + return (this.Plugin.Count != 0); + } + } + + /// + /// Initializes a new instance of the class. + /// + public BuildBasePlugins() + { + this._plugin = new System.Collections.ObjectModel.Collection(); + } + } + + [System.CodeDom.Compiler.GeneratedCodeAttribute("XmlSchemaClassGenerator", "2.1.1057.0")] + [System.Xml.Serialization.XmlTypeAttribute("ProfileModules", AnonymousType=true)] + public partial class ProfileModules + { + + [System.Xml.Serialization.XmlIgnoreAttribute()] + private System.Collections.ObjectModel.Collection _module; + + [System.Xml.Serialization.XmlElementAttribute("module")] + public System.Collections.ObjectModel.Collection Module + { + get + { + return _module; + } + private set + { + _module = value; + } + } + + /// + /// Gets a value indicating whether the Module collection is empty. + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool ModuleSpecified + { + get + { + return (this.Module.Count != 0); + } + } + + /// + /// Initializes a new instance of the class. + /// + public ProfileModules() + { + this._module = new System.Collections.ObjectModel.Collection(); + } + } + + [System.CodeDom.Compiler.GeneratedCodeAttribute("XmlSchemaClassGenerator", "2.1.1057.0")] + [System.Xml.Serialization.XmlTypeAttribute("ProfileProperties", AnonymousType=true)] + public partial class ProfileProperties + { + + [System.Xml.Serialization.XmlIgnoreAttribute()] + private System.Collections.ObjectModel.Collection _any; + + [System.Xml.Serialization.XmlAnyElementAttribute()] + public System.Collections.ObjectModel.Collection Any + { + get + { + return _any; + } + private set + { + _any = value; + } + } + + /// + /// Gets a value indicating whether the Any collection is empty. + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool AnySpecified + { + get + { + return (this.Any.Count != 0); + } + } + + /// + /// Initializes a new instance of the class. + /// + public ProfileProperties() + { + this._any = new System.Collections.ObjectModel.Collection(); + } + } + + [System.CodeDom.Compiler.GeneratedCodeAttribute("XmlSchemaClassGenerator", "2.1.1057.0")] + [System.Xml.Serialization.XmlTypeAttribute("ProfileDependencies", AnonymousType=true)] + public partial class ProfileDependencies + { + + [System.Xml.Serialization.XmlIgnoreAttribute()] + private System.Collections.ObjectModel.Collection _dependency; + + [System.Xml.Serialization.XmlElementAttribute("dependency")] + public System.Collections.ObjectModel.Collection Dependency + { + get + { + return _dependency; + } + private set + { + _dependency = value; + } + } + + /// + /// Gets a value indicating whether the Dependency collection is empty. + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool DependencySpecified + { + get + { + return (this.Dependency.Count != 0); + } + } + + /// + /// Initializes a new instance of the class. + /// + public ProfileDependencies() + { + this._dependency = new System.Collections.ObjectModel.Collection(); + } + } + + [System.CodeDom.Compiler.GeneratedCodeAttribute("XmlSchemaClassGenerator", "2.1.1057.0")] + [System.Xml.Serialization.XmlTypeAttribute("ProfileRepositories", AnonymousType=true)] + public partial class ProfileRepositories + { + + [System.Xml.Serialization.XmlIgnoreAttribute()] + private System.Collections.ObjectModel.Collection _repository; + + [System.Xml.Serialization.XmlElementAttribute("repository")] + public System.Collections.ObjectModel.Collection Repository + { + get + { + return _repository; + } + private set + { + _repository = value; + } + } + + /// + /// Gets a value indicating whether the Repository collection is empty. + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool RepositorySpecified + { + get + { + return (this.Repository.Count != 0); + } + } + + /// + /// Initializes a new instance of the class. + /// + public ProfileRepositories() + { + this._repository = new System.Collections.ObjectModel.Collection(); + } + } + + [System.CodeDom.Compiler.GeneratedCodeAttribute("XmlSchemaClassGenerator", "2.1.1057.0")] + [System.Xml.Serialization.XmlTypeAttribute("ProfilePluginRepositories", AnonymousType=true)] + public partial class ProfilePluginRepositories + { + + [System.Xml.Serialization.XmlIgnoreAttribute()] + private System.Collections.ObjectModel.Collection _pluginRepository; + + [System.Xml.Serialization.XmlElementAttribute("pluginRepository")] + public System.Collections.ObjectModel.Collection PluginRepository + { + get + { + return _pluginRepository; + } + private set + { + _pluginRepository = value; + } + } + + /// + /// Gets a value indicating whether the PluginRepository collection is empty. + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool PluginRepositorySpecified + { + get + { + return (this.PluginRepository.Count != 0); + } + } + + /// + /// Initializes a new instance of the class. + /// + public ProfilePluginRepositories() + { + this._pluginRepository = new System.Collections.ObjectModel.Collection(); + } + } + + [System.CodeDom.Compiler.GeneratedCodeAttribute("XmlSchemaClassGenerator", "2.1.1057.0")] + [System.Xml.Serialization.XmlTypeAttribute("ProfileReports", AnonymousType=true)] + public partial class ProfileReports + { + + [System.Xml.Serialization.XmlIgnoreAttribute()] + private System.Collections.ObjectModel.Collection _any; + + [System.Xml.Serialization.XmlAnyElementAttribute()] + public System.Collections.ObjectModel.Collection Any + { + get + { + return _any; + } + private set + { + _any = value; + } + } + + /// + /// Gets a value indicating whether the Any collection is empty. + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool AnySpecified + { + get + { + return (this.Any.Count != 0); + } + } + + /// + /// Initializes a new instance of the class. + /// + public ProfileReports() + { + this._any = new System.Collections.ObjectModel.Collection(); + } + } +} diff --git a/src/Java.Interop.Tools.Maven/Models/ResolvedDependency.cs b/src/Java.Interop.Tools.Maven/Models/ResolvedDependency.cs new file mode 100644 index 000000000..884372b4b --- /dev/null +++ b/src/Java.Interop.Tools.Maven/Models/ResolvedDependency.cs @@ -0,0 +1,125 @@ +using System; +using System.Diagnostics.CodeAnalysis; +using System.Linq; +using Java.Interop.Tools.Maven.Extensions; + +namespace Java.Interop.Tools.Maven.Models; + +public class ResolvedDependency +{ + public ResolvedProject Project { get; } + public string ArtifactId { get; } + public string? Classifier { get; } + public string GroupId { get; } + public string? Optional { get; } + public string Scope { get; } + public string? Type { get; } + public string Version { get; } + + public string ArtifactString => $"{GroupId}:{ArtifactId}"; + public string VersionedArtifactString => $"{GroupId}:{ArtifactId}:{Version}"; + + public ResolvedDependency (ResolvedProject project, Dependency dependency) + : this (project, dependency, false) + { } + + internal ResolvedDependency (ResolvedProject project, Dependency dependency, bool shallow) + { + Project = project; + + // First fill these in with values from the dependency + ArtifactId = dependency.ArtifactId.OrEmpty (); + GroupId = dependency.GroupId.OrEmpty (); + Classifier = dependency.Classifier; + Optional = dependency.Optional.OrEmpty (); + Scope = dependency.Scope.OrEmpty (); + Type = dependency.Type; + Version = dependency.Version.OrEmpty (); + + // If we're not shallow, fill in any still missing properties with parent values + if (!shallow) { + if (!Classifier.HasValue ()) + Classifier = GetInheritedProperty (this, project, d => d.Classifier); + + if (!Optional.HasValue ()) + Optional = GetInheritedProperty (this, project, d => d.Optional); + + if (!Scope.HasValue ()) + Scope = GetInheritedProperty (this, project, d => d.Scope); + + if (!Type.HasValue ()) + Type = GetInheritedProperty (this, project, d => d.Type); + + if (!Version.HasValue ()) + Version = GetInheritedProperty (this, project, d => d.Version); + } + + // Default scope to "compile" if not specified + if (!Scope.HasValue ()) + Scope = "compile"; + + // Default optional to "false" if not specified + if (!Optional.HasValue ()) + Optional = "false"; + } + + public override string ToString () => $"{VersionedArtifactString} - {Scope}"; + + static string GetInheritedProperty (ResolvedDependency dependency, ResolvedProject project, Func property) + { + // Check our section + if (CheckDependencyManagementSection (project, dependency, property, out var result)) + return result; + + // Check imported POMs + foreach (var imported in project.ImportedPomProjects) { + var value = GetInheritedProperty (dependency, imported, property); + + if (value.HasValue ()) + return value; + } + + // Check parent POM + if (project.Parent is not null && !project.Parent.IsSuperPom) + return GetInheritedProperty (dependency, project.Parent, property); + + return string.Empty; + } + + static bool CheckImportedPoms (ResolvedDependency dependency, ResolvedProject project, Func property, [NotNullWhen (true)] out string? result) + { + result = null; + + foreach (var imported in project.ImportedPomProjects) { + var imported_dep = imported.Resolved.DependencyManagement?.Dependencies.FirstOrDefault (x => x.ArtifactId == dependency.ArtifactId && x.GroupId == dependency.GroupId); + + if (imported_dep != null) { + result = property (new ResolvedDependency (imported, imported_dep, true)); + + if (result.HasValue ()) + return true; + } + + // Recurse, as imported POMs can also import POMs + if (CheckImportedPoms (dependency, imported, property, out result)) + return true; + } + + return false; + } + + static bool CheckDependencyManagementSection (ResolvedProject project, ResolvedDependency dependency, Func property, [NotNullWhen (true)] out string? result) + { + result = null; + + // Check + var dep_man = project.Resolved.DependencyManagement?.Dependencies.FirstOrDefault (x => x.ArtifactId == dependency.ArtifactId && x.GroupId == dependency.GroupId); + + if (dep_man != null) { + result = property (new ResolvedDependency (project, dep_man, true)) ?? string.Empty; + return result.HasValue (); + } + + return false; + } +} diff --git a/src/Java.Interop.Tools.Maven/Models/ResolvedProject.cs b/src/Java.Interop.Tools.Maven/Models/ResolvedProject.cs new file mode 100644 index 000000000..9b089966b --- /dev/null +++ b/src/Java.Interop.Tools.Maven/Models/ResolvedProject.cs @@ -0,0 +1,186 @@ +using System; +using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; +using System.Linq; +using Java.Interop.Tools.Maven.Extensions; + +namespace Java.Interop.Tools.Maven.Models; + +public class ResolvedProject +{ + readonly ResolvedProject? parent; + readonly IProjectResolver? resolver; + + Project? resolved_project; + + public Project Raw { get; } + public Project Resolved => resolved_project ?? throw new InvalidOperationException ("Call the Resolve method before accessing this."); + + public virtual bool IsSuperPom => false; + public string ArtifactId => Resolved.ArtifactId.OrEmpty (); + public string GroupId => Resolved.GroupId.HasValue () || IsSuperPom ? Resolved.GroupId.OrEmpty () : Parent.GroupId; + public string Version => Resolved.Version.HasValue () || IsSuperPom ? Resolved.Version.OrEmpty () : Parent.Version; + public string Name => Resolved.Name.HasValue () || IsSuperPom ? Resolved.Name.OrEmpty () : Parent.Name; + + public List Dependencies { get; } = new List (); + public List ImportedPomProjects { get; } = new (); // Projects imported via a scope = "import", type = "pom" dependencyManagement section + + public ResolvedProject Parent { + get { + if (parent is null && IsSuperPom) + throw new InvalidOperationException ("Super POM does not have a parent, check IsSuperPom before calling"); + + return parent ?? throw new InvalidOperationException ("Parent should not be null"); + } + } + + public ResolvedProject (Project project, ResolvedProject parent, IProjectResolver resolver) + { + Raw = project; + this.parent = parent; + this.resolver = resolver; + } + + public void Resolve () => ResolveCore (new PropertyStack ()); + + public static ResolvedProject FromArtifact (Artifact artifact, IProjectResolver resolver) + { + var project = FromArtifactCore (artifact, resolver); + project.Resolve (); + + return project; + } + + static ResolvedProject FromArtifactCore (Artifact artifact, IProjectResolver resolver) + { + var raw = resolver.Resolve (artifact); + + // POM has a parent, resolve it + if (raw.TryGetParentPomArtifact (out var parentArtifact)) { + var parent = FromArtifactCore (parentArtifact, resolver); + return new ResolvedProject (raw, parent, resolver); + } + + var project = new ResolvedProject (raw, SuperPom.Instance, resolver); + + return project; + } + + void ResolveCore (PropertyStack properties) + { + if (IsSuperPom) + return; + + // A newly constructed ResolvedProject contains only raw values. We need to + // go through every Project value and replace any specified properties + // (ex: ${project.version} or ${mavenVersion}) with the resolved values. This has to + // start at the child and work its way up to the parent, because properties + // specified in the child override those in the parent. + var xml = Raw.ToXml (); + xml = ReplaceProperties (xml, this, properties); + + resolved_project = Project.Parse (xml); + + properties.Push (Raw.Properties); + parent?.ResolveCore (properties); + + // Now that we've resolved all properties, we can figure out our dependencies. + ImportDependencyManagementPoms (); + ResolveDependencies (); + } + + [return: NotNullIfNotNull (nameof (value))] + string? ReplaceProperties (string? value, ResolvedProject project, PropertyStack properties) + { + if (value is null) + return null; + + if (!value.Contains ("${") || project.IsSuperPom) + return value; + + properties.Push (project.Raw.Properties); + + var old_value = string.Empty; + + // Properties can be nested, so we need to keep replacing until we don't find any more. + // We check against the old value to make sure we don't get stuck in an infinite loop. + while (value.Contains ("${") && value != old_value) { + old_value = value; + + // Replace ${project.*} properties + value = ReplaceProjectProperties (value, project); + + // Replace explicit properties + value = properties.Apply (value); + } + + value = ReplaceProperties (value, project.Parent, properties); + properties.Pop (); + + return value; + } + + string ReplaceProjectProperties (string value, ResolvedProject project) + { + // Technically this can be any element in the XML, but we're only going to suppport + // some common ones for now to keep things simple. + if (project.Raw.GroupId.HasValue ()) + value = value.Replace ("${project.groupId}", project.Raw.GroupId); + + if (project.Raw.ArtifactId.HasValue ()) + value = value.Replace ("${project.artifactId}", project.Raw.ArtifactId); + + if (project.Raw.Version.HasValue ()) + value = value.Replace ("${project.version}", project.Raw.Version); + + if (project.Raw.Name.HasValue ()) + value = value.Replace ("${project.name}", project.Raw.Name); + + if (project.Raw.Parent?.Version.HasValue () == true) + value = value.Replace ("${project.parent.version}", project.Raw.Parent.Version); + + if (project.Raw.Parent?.GroupId.HasValue () == true) + value = value.Replace ("${project.parent.groupId}", project.Raw.Parent.GroupId); + + return value; + } + + void ImportDependencyManagementPoms () + { + if (resolver is null) + return; + + foreach (var pom_import in GetPomImportDependencies ()) { + var pom = FromArtifact (pom_import.ToArtifact (), resolver); + pom.Resolve (); + ImportedPomProjects.Add (pom); + } + } + + IEnumerable GetPomImportDependencies () + => Resolved.DependencyManagement?.Dependencies.Where (x => x.Type == "pom" && x.Scope == "import") ?? Array.Empty (); + + void ResolveDependencies () + { + // Add _our_ specified dependencies + foreach (var dependency in Resolved.Dependencies) + Dependencies.Add (new ResolvedDependency (this, dependency)); + + // Add dependencies from our parent (the null check is for the super POM) + if (parent is ResolvedProject rp && !rp.IsSuperPom) + foreach (var dependency in parent!.Dependencies) + Dependencies.Add (dependency); + } +} + +// Sentinel class for the super POM, which every POM implicitly inherits if it doesn't specify a parent +public class SuperPom : ResolvedProject +{ + SuperPom () : base (new Project (), null!, null!) + { + } + + public override bool IsSuperPom => true; + + public static SuperPom Instance { get; } = new SuperPom (); +} diff --git a/src/Java.Interop.Tools.Maven/Repositories/CachedMavenRepository.cs b/src/Java.Interop.Tools.Maven/Repositories/CachedMavenRepository.cs new file mode 100644 index 000000000..65552af47 --- /dev/null +++ b/src/Java.Interop.Tools.Maven/Repositories/CachedMavenRepository.cs @@ -0,0 +1,93 @@ +using System.Diagnostics.CodeAnalysis; +using System.IO; +using System.Threading; +using System.Threading.Tasks; +using Java.Interop.Tools.Maven.Models; + +namespace Java.Interop.Tools.Maven.Repositories; + +/// +/// Wraps an and caches files in a local directory. +/// +public class CachedMavenRepository : IMavenRepository +{ + public string CacheDirectory { get; } + + public string Name => repository.Name; + + readonly IMavenRepository repository; + + public CachedMavenRepository (string directory, IMavenRepository repository) + { + CacheDirectory = directory; + this.repository = repository; + } + + public bool TryGetFile (Artifact artifact, string filename, [NotNullWhen (true)] out Stream? stream) + { + stream = null; + + if (TryGetFilePath (artifact, filename, out var path)) { + stream = File.OpenRead (path); + return true; + } + + return false; + } + + public bool TryGetFilePath (Artifact artifact, string filename, [NotNullWhen (true)] out string? path) + { + path = null; + + var directory = GetArtifactDirectory (artifact); + var file = Path.Combine (directory, filename); + + if (File.Exists (file)) { + path = file; + return true; + } + + if (repository.TryGetFile (artifact, filename, out var repo_stream)) { + Directory.CreateDirectory (directory); + + using (var sw = File.Create (file)) + using (repo_stream) + repo_stream.CopyTo (sw); + + path = file; + return true; + } + + return false; + } + + public async Task GetFilePathAsync (Artifact artifact, string filename, CancellationToken cancellationToken) + { + var directory = GetArtifactDirectory (artifact); + var file = Path.Combine (directory, filename); + + if (File.Exists (file)) + return file; + + if (repository.TryGetFile (artifact, filename, out var repo_stream)) { + Directory.CreateDirectory (directory); + + using (var sw = File.Create (file)) + using (repo_stream) + await repo_stream.CopyToAsync (sw, 81920, cancellationToken); + + + return file; + } + + return null; + } + + string GetArtifactDirectory (Artifact artifact) + { + var version = artifact.Version; + var output_directory = Path.Combine (CacheDirectory, repository.Name, artifact.GroupId, artifact.Id, version); + + return output_directory; + } +} diff --git a/src/Java.Interop.Tools.Maven/Repositories/IMavenRepository.cs b/src/Java.Interop.Tools.Maven/Repositories/IMavenRepository.cs new file mode 100644 index 000000000..d09ba0ac3 --- /dev/null +++ b/src/Java.Interop.Tools.Maven/Repositories/IMavenRepository.cs @@ -0,0 +1,13 @@ +using System.Diagnostics.CodeAnalysis; +using System.IO; +using Java.Interop.Tools.Maven.Models; + +namespace Java.Interop.Tools.Maven.Repositories; + +public interface IMavenRepository +{ + // The on-disk cache for this repository will be in a sub-directory with this name, and thus must be + // compatible with file system naming rules. For example, "central" or "google". + string Name { get; } + bool TryGetFile (Artifact artifact, string filename, [NotNullWhen (true)] out Stream? stream); +} diff --git a/src/Java.Interop.Tools.Maven/Repositories/MavenRepository.cs b/src/Java.Interop.Tools.Maven/Repositories/MavenRepository.cs new file mode 100644 index 000000000..9b54887b9 --- /dev/null +++ b/src/Java.Interop.Tools.Maven/Repositories/MavenRepository.cs @@ -0,0 +1,33 @@ +using System.Diagnostics.CodeAnalysis; +using System.IO; +using System.Net.Http; +using Java.Interop.Tools.Maven.Models; + +namespace Java.Interop.Tools.Maven.Repositories; + +public class MavenRepository : IMavenRepository +{ + readonly string base_url; + static readonly HttpClient client = new HttpClient (); + + public string Name { get; } + + public MavenRepository (string baseUrl, string name) + { + Name = name; + base_url = baseUrl.TrimEnd ('/'); + } + + public bool TryGetFile (Artifact artifact, string filename, [NotNullWhen (true)] out Stream? stream) + { + // ex: https://repo1.maven.org/maven2/dev/chrisbanes/snapper/snapper/0.3.0/{filename} + var file = $"{base_url}/{artifact.GroupId.Replace ('.', '/')}/{artifact.Id}/{artifact.Version}/{filename}"; + stream = client.GetStreamAsync (file).Result; + + return true; + } + + public static readonly MavenRepository Google = new MavenRepository ("https://dl.google.com/android/maven2/", "google"); + + public static readonly MavenRepository Central = new MavenRepository ("https://repo1.maven.org/maven2/", "central"); +} diff --git a/tests/Java.Interop.Tools.Maven-Tests/DependenciesTests.cs b/tests/Java.Interop.Tools.Maven-Tests/DependenciesTests.cs new file mode 100644 index 000000000..903771349 --- /dev/null +++ b/tests/Java.Interop.Tools.Maven-Tests/DependenciesTests.cs @@ -0,0 +1,57 @@ +using System; +using System.Linq; +using Java.Interop.Tools.Maven.Models; +using Java.Interop.Tools.Maven_Tests.Extensions; + +namespace Java.Interop.Tools.Maven_Tests; + +public class DependenciesTests +{ + [Test] + [TestCase ("dev.chrisbanes.snapper:snapper:0.3.0", "androidx.compose.foundation:foundation:1.2.1 - compile;org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.21 - compile")] + [TestCase ("com.squareup.wire:wire-runtime:4.4.3", "com.squareup.okio:okio:3.0.0 - runtime;org.jetbrains.kotlin:kotlin-stdlib-common:1.6.10 - runtime")] + [TestCase ("org.jboss:jboss-vfs:3.2.17.Final", "org.jboss.logging:jboss-logging:3.1.4.GA - compile")] + [TestCase ("com.squareup.okio:okio:1.17.4", "org.codehaus.mojo:animal-sniffer-annotations:1.10 - compile")] + [TestCase ("org.jetbrains.kotlin:kotlin-stdlib:1.6.20", "org.jetbrains:annotations:13.0 - compile;org.jetbrains.kotlin:kotlin-stdlib-common:1.6.20 - compile")] + [TestCase ("com.github.bumptech.glide:glide:4.13.2", "androidx.exifinterface:exifinterface:1.2.0 - compile;androidx.fragment:fragment:1.3.1 - compile;androidx.tracing:tracing:1.0.0 - compile;androidx.vectordrawable:vectordrawable-animated:1.0.0 - compile;com.github.bumptech.glide:annotations:4.13.2 - compile;com.github.bumptech.glide:disklrucache:4.13.2 - compile;com.github.bumptech.glide:gifdecoder:4.13.2 - compile")] + [TestCase ("io.reactivex.rxjava3:rxandroid:3.0.0", "io.reactivex.rxjava3:rxjava:3.0.0 - compile")] + [TestCase ("com.jakewharton.timber:timber:5.0.1", "org.jetbrains:annotations:20.1.0 - runtime;org.jetbrains.kotlin:kotlin-stdlib:1.5.21 - compile")] + [TestCase ("org.greenrobot:eventbus:3.3.1", "org.greenrobot:eventbus-java:3.3.1 - compile")] + [TestCase ("com.squareup.picasso:picasso:2.8", "androidx.annotation:annotation:1.0.0 - compile;androidx.exifinterface:exifinterface:1.0.0 - compile;com.squareup.okhttp3:okhttp:3.10.0 - compile")] + [TestCase ("pub.devrel:easypermissions:3.0.0", "androidx.annotation:annotation:1.1.0 - compile;androidx.appcompat:appcompat:1.1.0 - compile;androidx.core:core:1.3.0 - compile;androidx.fragment:fragment:1.2.5 - compile")] + [TestCase ("com.squareup.okio:samples:1.17.6", "com.squareup.okio:okio:1.17.6 - compile")] + [TestCase ("com.android.volley:volley:1.2.1", "")] + [TestCase ("as.leap:LAS-cloudcode-sdk:2.3.6", "com.fasterxml.jackson.core:jackson-core:2.5.3 - compile;com.fasterxml.jackson.core:jackson-databind:2.5.3 - compile")] + [TestCase ("ai.grakn:grakn-dist:1.4.1", "ai.grakn:grakn-engine:1.4.1 - compile;ai.grakn:grakn-factory:1.4.1 - compile;ai.grakn:grakn-graql-shell:1.4.1 - compile;ai.grakn:migration-csv:1.4.1 - compile;ai.grakn:migration-export:1.4.1 - compile;ai.grakn:migration-json:1.4.1 - compile;ai.grakn:migration-sql:1.4.1 - compile;ai.grakn:migration-xml:1.4.1 - compile;ch.qos.logback:logback-classic:1.2.3 - compile;ch.qos.logback:logback-core:1.2.3 - compile;io.airlift:airline:0.6 - compile;org.codehaus.janino:janino:2.7.8 - compile;org.slf4j:slf4j-api:1.7.20 - compile")] + [TestCase ("at.crea-doo.homer:shell.data:1.0.11", "at.crea-doo.homer:processing.data:1.0.11 - compile;joda-time:joda-time:2.9.9 - compile;org.apache.karaf.shell:org.apache.karaf.shell.core:4.0.9 - compile")] + [TestCase ("at.crea-doo.homer:connector.ifttt.maker:1.0.11", "at.ac.ait.hbs.homer:at.ac.ait.hbs.homer.core.common:1.2.51 - compile;com.google.code.gson:gson:2.8.1 - compile;commons-codec:commons-codec:1.10 - compile;commons-logging:commons-logging:1.2 - compile;org.apache.httpcomponents:httpclient:4.5.3 - compile;org.apache.httpcomponents:httpcore:4.4.6 - compile")] + [TestCase ("at.reilaender.asciidoctorj.bootconfig2adoc:bootconfig2adoc-adoc:0.1.3", "at.reilaender.asciidoctorj.bootconfig2adoc:bootconfig2adoc-core:0.1.3 - compile")] + [TestCase ("at.researchstudio.sat:won-bot:0.9", "at.researchstudio.sat:won-core:0.9 - compile;at.researchstudio.sat:won-cryptography:0.9 - compile;at.researchstudio.sat:won-matcher:0.9 - compile;at.researchstudio.sat:won-owner:0.9 - compile;at.researchstudio.sat:won-sockets-tx:0.9 - compile;at.researchstudio.sat:won-utils-conversation:0.9 - compile;at.researchstudio.sat:won-utils-goals:0.9 - compile;ch.qos.logback:logback-classic:1.0.13 - compile;ch.qos.logback:logback-core:1.0.13 - compile;commons-io:commons-io:2.4 - compile;org.apache.commons:commons-email:1.3.1 - compile;org.apache.commons:commons-lang3:3.4 - compile;org.apache.httpcomponents:httpclient:4.5 - compile;org.apache.jena:jena-arq:3.5.0 - compile;org.apache.jena:jena-core:3.5.0 - compile;org.aspectj:aspectjweaver:1.5.4 - compile;org.bouncycastle:bcpkix-jdk15on:1.64 - compile;org.bouncycastle:bcprov-jdk15on:1.64 - compile;org.javasimon:javasimon-core:3.4.0 - compile;org.javasimon:javasimon-spring:3.4.0 - compile;org.jsoup:jsoup:1.7.3 - compile;org.quartz-scheduler:quartz:2.2.1 - compile;org.slf4j:slf4j-api:1.6.6 - compile;org.springframework:spring-core:4.3.18.RELEASE - compile;org.springframework.boot:spring-boot:1.5.17.RELEASE - compile;org.springframework.data:spring-data-commons:1.13.16.RELEASE - compile;org.springframework.data:spring-data-mongodb:1.10.3.RELEASE - compile")] + [TestCase ("au.csiro:elk-distribution-owlapi4:0.5.0", "au.csiro:elk-owlapi4:0.5.0 - compile;org.liveontologies:owlapi-proof:0.1.0 - compile;org.liveontologies:puli:0.1.0 - compile")] + [TestCase ("au.csiro:elk-distribution-owlapi5:0.5.0", "au.csiro:elk-distribution-owlapi4:0.5.0 - compile;au.csiro:elk-distribution-owlapi4:0.5.0 - compile;au.csiro:elk-owlapi5:0.5.0 - compile;org.liveontologies:owlapi-proof:0.1.0 - compile;org.liveontologies:puli:0.1.0 - compile")] + [TestCase ("au.gov.amsa.risky:ais:0.6.17", "au.gov.amsa.risky:formats:0.6.17 - compile;au.gov.amsa.risky:formats:0.6.17 - compile;au.gov.amsa.risky:streams:0.6.17 - compile;com.github.davidmoten:rxjava-extras:0.8.0.20 - compile;com.github.davidmoten:rxjava-slf4j:0.7.0 - compile;com.google.guava:guava:32.1.3-jre - compile;io.reactivex:rxjava-string:1.1.1 - compile;io.reactivex:rxjava:1.3.8 - compile;org.slf4j:slf4j-api:2.0.9 - compile")] + [TestCase ("am.ik.springmvc:new-controller:0.2.0", "me.geso:routes:0.6.0 - compile;org.slf4j:slf4j-api:1.7.8 - compile;org.springframework:spring-webmvc:4.1.4.RELEASE - compile")] + [TestCase ("me.drakeet.multitype:multitype:3.5.0", "androidx.annotation:annotation:1.0.0 - compile;androidx.recyclerview:recyclerview:1.0.0 - compile")] + [TestCase ("com.facebook.fresco:fresco:2.6.0", "com.facebook.fresco:drawee:2.6.0 - compile;com.facebook.fresco:fbcore:2.6.0 - compile;com.facebook.fresco:imagepipeline-native:2.6.0 - compile;com.facebook.fresco:imagepipeline:2.6.0 - compile;com.facebook.fresco:memory-type-ashmem:2.6.0 - compile;com.facebook.fresco:memory-type-java:2.6.0 - compile;com.facebook.fresco:memory-type-native:2.6.0 - compile;com.facebook.fresco:nativeimagefilters:2.6.0 - compile;com.facebook.fresco:nativeimagetranscoder:2.6.0 - compile;com.facebook.fresco:soloader:2.6.0 - runtime;com.facebook.fresco:ui-common:2.6.0 - runtime;com.facebook.soloader:nativeloader:0.10.1 - runtime")] + [TestCase ("com.tencent.mm.opensdk:wechat-sdk-android-without-mta:6.8.0", "")] + [TestCase ("com.facebook.android:facebook-android-sdk:14.1.1", "com.facebook.android:facebook-applinks:14.1.1 - compile;com.facebook.android:facebook-common:14.1.1 - compile;com.facebook.android:facebook-core:14.1.1 - compile;com.facebook.android:facebook-gamingservices:14.1.1 - compile;com.facebook.android:facebook-login:14.1.1 - compile;com.facebook.android:facebook-messenger:14.1.1 - compile;com.facebook.android:facebook-share:14.1.1 - compile;org.jetbrains.kotlin:kotlin-stdlib:1.5.10 - compile")] + [TestCase ("com.airbnb.android:lottie:5.2.0", "androidx.appcompat:appcompat:1.3.1 - runtime;com.squareup.okio:okio:1.17.4 - runtime")] + public void TestMavenCentralResolvedDependencies (string artifact, string expected) + => TestResolvedDependencies (MavenProjectResolver.Central, artifact, expected); + + void TestResolvedDependencies (MavenProjectResolver resolver, string artifact, string expected) + { + var art = Artifact.Parse (artifact); + var project = ResolvedProject.FromArtifact (art, resolver); + var dependencies = project.Dependencies.Where (d => d.Scope == "compile" || d.Scope == "runtime").OrderBy (d => d.ToString ()).ToList (); + + if (dependencies.FirstOrDefault (d => string.IsNullOrEmpty (d.Version)) is ResolvedDependency rd) + throw new Exception ($"Missing version - {rd}"); + + if (dependencies.FirstOrDefault (d => d.Version.Contains ('$')) is ResolvedDependency rd2) + throw new Exception ("Unresolved variable in version"); + + Console.WriteLine (string.Join (';', dependencies)); + Assert.AreEqual (expected, string.Join (';', dependencies)); + } +} diff --git a/tests/Java.Interop.Tools.Maven-Tests/Extensions/MavenProjectResolver.cs b/tests/Java.Interop.Tools.Maven-Tests/Extensions/MavenProjectResolver.cs new file mode 100644 index 000000000..1d208c327 --- /dev/null +++ b/tests/Java.Interop.Tools.Maven-Tests/Extensions/MavenProjectResolver.cs @@ -0,0 +1,40 @@ +using System; +using System.IO; +using Java.Interop.Tools.Maven; +using Java.Interop.Tools.Maven.Models; +using Java.Interop.Tools.Maven.Repositories; + +namespace Java.Interop.Tools.Maven_Tests.Extensions; + +class MavenProjectResolver : IProjectResolver +{ + readonly IMavenRepository repository; + + public MavenProjectResolver (IMavenRepository repository) + { + this.repository = repository; + } + + static MavenProjectResolver () + { + var cache_path = Path.Combine (Environment.GetFolderPath (Environment.SpecialFolder.LocalApplicationData), "dotnet-android", "MavenCacheDirectory"); + + Central = new MavenProjectResolver (new CachedMavenRepository (cache_path, MavenRepository.Central)); + Google = new MavenProjectResolver (new CachedMavenRepository (cache_path, MavenRepository.Google)); + } + + public Project Resolve (Artifact artifact) + { + if (repository.TryGetFile (artifact, $"{artifact.Id}-{artifact.Version}.pom", out var stream)) { + using (stream) { + return Project.Load (stream) ?? throw new InvalidOperationException ($"Could not deserialize POM for {artifact}"); + } + } + + throw new InvalidOperationException ($"No POM found for {artifact}"); + } + + public static MavenProjectResolver Google { get; } + + public static MavenProjectResolver Central { get; } +} diff --git a/tests/Java.Interop.Tools.Maven-Tests/Extensions/TestDataExtensions.cs b/tests/Java.Interop.Tools.Maven-Tests/Extensions/TestDataExtensions.cs new file mode 100644 index 000000000..cbee38348 --- /dev/null +++ b/tests/Java.Interop.Tools.Maven-Tests/Extensions/TestDataExtensions.cs @@ -0,0 +1,39 @@ +using System.Xml.Linq; +using Java.Interop.Tools.Maven.Models; + +namespace Java.Interop.Tools.Maven_Tests.Extensions; + +static class TestDataExtensions +{ + public static Project CreateProject (Artifact artifact, Project? parent = null) + { + var xml = new XDocument ( + new XElement ("project", + new XElement ("modelVersion", "4.0.0"), + new XElement ("groupId", artifact.GroupId), + new XElement ("artifactId", artifact.Id), + new XElement ("version", artifact.Version) + ) + ); + + if (parent is not null) { + var parent_xml = new XElement ("parent", + new XElement ("groupId", parent.GroupId), + new XElement ("artifactId", parent.ArtifactId), + new XElement ("version", parent.Version) + ); + + xml.Root!.Add (parent_xml); + } + + return Project.Parse (xml.ToString ()); + } + + public static void AddProperty (this Project project, string key, string value) + { + var xml = new XElement (key, value); + + project.Properties ??= new ModelProperties (); + project.Properties.Any.Add (xml); + } +} diff --git a/tests/Java.Interop.Tools.Maven-Tests/Java.Interop.Tools.Maven-Tests.csproj b/tests/Java.Interop.Tools.Maven-Tests/Java.Interop.Tools.Maven-Tests.csproj new file mode 100644 index 000000000..3856610c0 --- /dev/null +++ b/tests/Java.Interop.Tools.Maven-Tests/Java.Interop.Tools.Maven-Tests.csproj @@ -0,0 +1,31 @@ + + + + $(DotNetTargetFramework) + enable + false + true + + + + + + $(TestOutputFullPath) + + + + + + + + + + + + + + + + + + diff --git a/tests/Java.Interop.Tools.Maven-Tests/MavenVersionRangeTests.cs b/tests/Java.Interop.Tools.Maven-Tests/MavenVersionRangeTests.cs new file mode 100644 index 000000000..02575bb7f --- /dev/null +++ b/tests/Java.Interop.Tools.Maven-Tests/MavenVersionRangeTests.cs @@ -0,0 +1,61 @@ +using System.Linq; +using Java.Interop.Tools.Maven.Models; + +namespace Java.Interop.Tools.Maven_Tests; + +public class MavenVersionRangeTests +{ + [Test] + public void ParseTest () + { + TestSingleRange ("1.0", "1.0", null, true, false, true, false); + TestSingleRange ("(,1.0]", null, "1.0", false, true, false, true); + TestSingleRange ("[1.0]", "1.0", "1.0", true, true, true, true); + TestSingleRange ("[1.2,1.3]", "1.2", "1.3", true, true, true, true); + TestSingleRange ("[1.0,2.0)", "1.0", "2.0", true, true, true, false); + TestSingleRange ("[1.5,)", "1.5", null, true, false, true, false); + + var multi_range_1 = MavenVersionRange.Parse ("(,1.0],[1.2,)").ToArray (); + TestSingleRange (multi_range_1 [0], null, "1.0", false, true, false, true); + TestSingleRange (multi_range_1 [1], "1.2", null, true, false, true, false); + + var multi_range_2 = MavenVersionRange.Parse ("(,1.1),(1.1,)").ToArray (); + TestSingleRange (multi_range_2 [0], null, "1.1", false, true, false, false); + TestSingleRange (multi_range_2 [1], "1.1", null, true, false, false, false); + } + + [Test] + public void ContainsVersionTest () + { + TestContainsVersion ("1.0", false, true, true, true, true); + TestContainsVersion ("(,1.0]", true, true, false, false, false); + TestContainsVersion ("[1.0]", false, true, false, false, false); + TestContainsVersion ("[1.0,2.0]", false, true, true, true, false); + TestContainsVersion ("(1.0,2.0)", false, false, true, false, false); + TestContainsVersion ("[1.5,)", false, false, true, true, true); + } + + static void TestSingleRange (string value, string? minVersion, string? maxVersion, bool hasLowerBound, bool hasUpperBound, bool isMinInclusive, bool isMaxInclusive) + => TestSingleRange (MavenVersionRange.Parse (value).Single (), minVersion, maxVersion, hasLowerBound, hasUpperBound, isMinInclusive, isMaxInclusive); + + static void TestSingleRange (MavenVersionRange range, string? minVersion, string? maxVersion, bool hasLowerBound, bool hasUpperBound, bool isMinInclusive, bool isMaxInclusive) + { + Assert.AreEqual (hasLowerBound, range.HasLowerBound); + Assert.AreEqual (hasUpperBound, range.HasUpperBound); + Assert.AreEqual (minVersion, range.MinVersion); + Assert.AreEqual (maxVersion, range.MaxVersion); + Assert.AreEqual (isMinInclusive, range.IsMinInclusive); + Assert.AreEqual (isMaxInclusive, range.IsMaxInclusive); + } + + static void TestContainsVersion (string value, bool contains0_8, bool contains1_0, bool contains1_5, bool contains2_0, bool contains2_5) + { + var range = MavenVersionRange.Parse (value).Single (); + + Assert.AreEqual (contains0_8, range.ContainsVersion (MavenVersion.Parse ("0.8"))); + Assert.AreEqual (contains1_0, range.ContainsVersion (MavenVersion.Parse ("1.0"))); + Assert.AreEqual (contains1_5, range.ContainsVersion (MavenVersion.Parse ("1.5"))); + Assert.AreEqual (contains2_0, range.ContainsVersion (MavenVersion.Parse ("2.0"))); + Assert.AreEqual (contains2_5, range.ContainsVersion (MavenVersion.Parse ("2.5"))); + } +} diff --git a/tests/Java.Interop.Tools.Maven-Tests/MavenVersionTests.cs b/tests/Java.Interop.Tools.Maven-Tests/MavenVersionTests.cs new file mode 100644 index 000000000..3140d7dcb --- /dev/null +++ b/tests/Java.Interop.Tools.Maven-Tests/MavenVersionTests.cs @@ -0,0 +1,72 @@ +using System.Linq; +using Java.Interop.Tools.Maven.Models; + +namespace Java.Interop.Tools.Maven_Tests; + +public class MavenVersionTests +{ + [Test] + public void ParseTest () + { + TestParse ("", null, null, null, false); + TestParse ("1", "1", null, null, true); + TestParse ("1.2", "1", "2", null, true); + TestParse ("1.2.3", "1", "2", "3", true); + + TestParse ("1-BETA", "1-BETA", null, null, true); + TestParse ("1-ALPHA.2-BETA", "1-ALPHA", "2-BETA", null, true); + TestParse ("1-ALPHA.2-BETA.3-GAMMA", "1-ALPHA", "2-BETA", "3-GAMMA", true); + + TestParse ("1-ALPHA-RC3.2.3", "1-ALPHA-RC3", "2", "3", true); + + // 4th part isn't valid + TestParse ("1.2.3.4", "1", "2", "3", false); + + // Versions must be numeric + TestParse ("A.B.C", "A", "B", "C", false); + TestParse ("A-B.2.3", "A-B", "2", "3", false); + } + + [Test] + public void SortTest () + { + // Normal versions + TestSort ("1,2", "1", "2"); + TestSort ("1,2", "2", "1"); + TestSort ("1.1,1.2", "1.2", "1.1"); + TestSort ("1.1.1,1.1.2", "1.1.2", "1.1.1"); + + // Qualifiers are always "before" "release" versions when version numbers are equal + TestSort ("1.2-beta-2,1.2", "1.2", "1.2-beta-2"); + TestSort ("1-beta-2,1", "1", "1-beta-2"); + TestSort ("1.1.1-beta-2,1.1.1", "1.1.1", "1.1.1-beta-2"); + + // Qualifiers don't matter if the versions don't match + TestSort ("1-RC,2", "1-RC", "2"); + TestSort ("1,2-RC", "1", "2-RC"); + + // Qualifiers are sorted with simple string sort + TestSort ("1.2-alpha-6,1.2-beta-2", "1.2-alpha-6", "1.2-beta-2"); + + // If any version is "nonstandard", a simple string sort is used + TestSort ("1.0.1.0,1.0.10.1,1.0.10.2,1.0.9.3", "1.0.9.3", "1.0.10.1", "1.0.1.0", "1.0.10.2"); + } + + static void TestParse (string input, string? major, string? minor, string? patch, bool isValid) + { + var v = MavenVersion.Parse (input); + + Assert.AreEqual (major, v.Major); + Assert.AreEqual (minor, v.Minor); + Assert.AreEqual (patch, v.Patch); + Assert.AreEqual (isValid, v.IsValid); + } + + static void TestSort (string expected, params string [] values) + { + var sorted = values.Select (v => MavenVersion.Parse (v)).Order (); + var formatted = string.Join (',', sorted.Select (v => v.RawVersion)); + + Assert.AreEqual (expected, formatted); + } +} diff --git a/tests/Java.Interop.Tools.Maven-Tests/ProjectResolverTests.cs b/tests/Java.Interop.Tools.Maven-Tests/ProjectResolverTests.cs new file mode 100644 index 000000000..716e7ebdc --- /dev/null +++ b/tests/Java.Interop.Tools.Maven-Tests/ProjectResolverTests.cs @@ -0,0 +1,76 @@ +using System; +using Java.Interop.Tools.Maven; +using Java.Interop.Tools.Maven.Models; +using Java.Interop.Tools.Maven_Tests.Extensions; + +namespace Java.Interop.Tools.Maven_Tests; + +public class ProjectResolverTests +{ + [Test] + public void ResolveRawProject_Success () + { + var artifact = new Artifact ("bar", "foo", "1.0"); + var project = TestDataExtensions.CreateProject (artifact); + var resolver = new DefaultProjectResolver (); + + resolver.Register (project); + + var result = resolver.Resolve (artifact); + + Assert.AreEqual (project, result); + } + + [Test] + public void ResolveRawProject_PomNotFound () + { + var resolver = new DefaultProjectResolver (); + + Assert.Throws (() => resolver.Resolve (new Artifact ("bar", "foo", "1.0"))); + } + + [Test] + public void Resolve_Success () + { + var artifact = new Artifact ("bar", "foo", "1.0"); + var parent_artifact = new Artifact ("bar-parent", "foo", "1.0"); + + var parent_project = TestDataExtensions.CreateProject (parent_artifact); + var project = TestDataExtensions.CreateProject (artifact, parent_project); + + var resolver = new DefaultProjectResolver (); + + resolver.Register (project); + resolver.Register (parent_project); + + var result = ResolvedProject.FromArtifact (artifact, resolver); + + Assert.AreEqual (project, result.Raw); + Assert.AreEqual (parent_project, result.Parent.Raw); + } + + [Test] + public void Resolve_ParentPomNotFound () + { + var artifact = new Artifact ("bar", "foo", "1.0"); + var parent_artifact = new Artifact ("bar-parent", "foo", "1.0"); + + var parent_project = TestDataExtensions.CreateProject (parent_artifact); + var project = TestDataExtensions.CreateProject (artifact, parent_project); + + var resolver = new DefaultProjectResolver (); + + // Note we are not adding the parent project to the resolver, so it will not be found + resolver.Register (project); + + Assert.Throws (() => ResolvedProject.FromArtifact (artifact, resolver)); + } + + [Test] + public void Resolve_PomNotFound () + { + var resolver = new DefaultProjectResolver (); + + Assert.Throws (() => resolver.Resolve (new Artifact ("bar", "foo", "1.0"))); + } +} diff --git a/tests/Java.Interop.Tools.Maven-Tests/PropertySubstitutionTests.cs b/tests/Java.Interop.Tools.Maven-Tests/PropertySubstitutionTests.cs new file mode 100644 index 000000000..ac6110c2b --- /dev/null +++ b/tests/Java.Interop.Tools.Maven-Tests/PropertySubstitutionTests.cs @@ -0,0 +1,161 @@ +using Java.Interop.Tools.Maven; +using Java.Interop.Tools.Maven.Models; +using Java.Interop.Tools.Maven_Tests.Extensions; + +namespace Java.Interop.Tools.Maven_Tests; + +public class PropertySubstitutionTests +{ + [Test] + public void Resolve_ExplicitProperty () + { + // This POM: + // ${mavenVersion} + // + // 3.0 + // + var artifact = new Artifact ("bar", "foo", "${mavenVersion}"); + + var project = TestDataExtensions.CreateProject (artifact); + project.AddProperty ("mavenVersion", "2.0.6"); + + var resolver = new DefaultProjectResolver (); + resolver.Register (project); + + var result = ResolvedProject.FromArtifact (artifact, resolver); + + Assert.AreEqual ("2.0.6", result.Version); + } + + [Test] + public void Resolve_ExplicitPropertyFromParent () + { + // This POM: + // ${mavenVersion} + // Parent POM: + // + // 3.0 + // + var artifact = new Artifact ("bar", "foo", "${mavenVersion}"); + var parent_artifact = new Artifact ("bar-parent", "foo", "1.0"); + + var parent_project = TestDataExtensions.CreateProject (parent_artifact); + var project = TestDataExtensions.CreateProject (artifact, parent_project); + + parent_project.AddProperty ("mavenVersion", "2.0.6"); + + var resolver = new DefaultProjectResolver (); + resolver.Register (parent_project); + resolver.Register (project); + + var result = ResolvedProject.FromArtifact (artifact, resolver); + + Assert.AreEqual ("2.0.6", result.Version); + } + + [Test] + public void Resolve_ProjectProperty () + { + // This POM: + // bar + // foo + // 2.0 + // ${project.groupId}:${project.artifactId}:${project.version} + var artifact = new Artifact ("bar", "foo", "2.0"); + + var project = TestDataExtensions.CreateProject (artifact); + project.Name = "${project.groupId}:${project.artifactId}:${project.version}"; + + var resolver = new DefaultProjectResolver (); + resolver.Register (project); + + var result = ResolvedProject.FromArtifact (artifact, resolver); + + Assert.AreEqual ("bar:foo:2.0", result.Name); + } + + [Test] + public void Resolve_ProjectPropertyFromParent () + { + // This POM: + // bar + // foo + // ${project.groupId}:${project.artifactId}:${project.version} + // Parent POM: + // 2.0 + var artifact = new Artifact ("bar", "foo", ""); + var parent_artifact = new Artifact ("bar-parent", "foo", "2.0"); + + var parent_project = TestDataExtensions.CreateProject (parent_artifact); + var project = TestDataExtensions.CreateProject (artifact, parent_project); + + project.Name = "${project.groupId}:${project.artifactId}:${project.version}"; + + var resolver = new DefaultProjectResolver (); + resolver.Register (parent_project); + resolver.Register (project); + + var result = ResolvedProject.FromArtifact (artifact, resolver); + + Assert.AreEqual ("bar:foo:2.0", result.Name); + } + + [Test] + public void Resolve_RecursiveProperties () + { + // This POM: + // bar + // foo + // ${mavenVersion} + // Parent POM: + // 2.0 + // + // ${project.version} + // + var artifact = new Artifact ("bar", "foo", "${mavenVersion}"); + var parent_artifact = new Artifact ("bar-parent", "foo", "2.0"); + + var parent_project = TestDataExtensions.CreateProject (parent_artifact); + var project = TestDataExtensions.CreateProject (artifact, parent_project); + + parent_project.AddProperty ("mavenVersion", "${project.version}"); + + var resolver = new DefaultProjectResolver (); + resolver.Register (parent_project); + resolver.Register (project); + + var result = ResolvedProject.FromArtifact (artifact, resolver); + + Assert.AreEqual ("2.0", result.Version); + } + + [Test] + public void Resolve_ChildPropertiesTakePrecedenceOverParentProperties () + { + // This POM: + // + // 2.0 + // + // Parent POM: + // ${mavenVersion} + // + // 1.0 + // + var artifact = new Artifact ("bar", "foo", ""); + var parent_artifact = new Artifact ("bar-parent", "foo", "${mavenVersion}"); + + var parent_project = TestDataExtensions.CreateProject (parent_artifact); + var project = TestDataExtensions.CreateProject (artifact, parent_project); + + project.AddProperty ("mavenVersion", "2.0"); + parent_project.AddProperty ("mavenVersion", "1.0"); + + var resolver = new DefaultProjectResolver (); + resolver.Register (parent_project); + resolver.Register (project); + + var result = ResolvedProject.FromArtifact (artifact, resolver); + + Assert.AreEqual ("2.0", result.Version); + } +}