Ejemplo n.º 1
0
        internal void LoadBuildContainer(PomElement element, IBuildContainer container)
        {
            var propertiesElement = element.SingleOrNull("properties");

            if (propertiesElement != null)
            {
                container.Properties = propertiesElement.Elements().Select(LoadProperty).ToList();
            }

            container.Modules = element
                                .ReadElements("modules", "module")
                                .Select(LoadModule)
                                .ToList();

            container.Dependencies = element
                                     .ReadElements("dependencies", "dependency")
                                     .Select(LoadDependency)
                                     .ToList();

            container.DependencyManagement = element
                                             .ReadElements("dependencyManagement", "dependencies", "dependency")
                                             .Select(LoadDependency)
                                             .ToList();

            container.Plugins = element.ReadElements("build", "plugins", "plugin")
                                .Select(LoadPlugin).ToList();

            container.PluginManagement = element.ReadElements("build", "pluginManagement", "plugins", "plugin")
                                         .Select(LoadPlugin).ToList();

            container.TestResources = new BlackBox(element.SingleOrNull("build", "testResources"));
        }
Ejemplo n.º 2
0
        internal IPlugin LoadPlugin(PomElement element)
        {
            var plugin = _dataFactory.CreatePlugin();

            LoadProjectReference(element, plugin);

            bool extensions;

            plugin.Extensions = bool.TryParse(element.ReadElementValueOrNull("extensions"), out extensions) && extensions;

            plugin.Executions    = new BlackBox(element.SingleOrNull("executions"));
            plugin.Configuration = new BlackBox(element.SingleOrNull("configuration"));

            plugin.Dependencies = element
                                  .ReadElements("dependencies", "dependency")
                                  .Select(LoadDependency)
                                  .ToList();

            return(plugin);
        }