maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sisb...@apache.org
Subject svn commit: r677513 - in /maven/sandbox/branches/SI_MAVEN_2_1_A/maven-project/src/main/java/org/apache/maven/project: DefaultMavenProjectBuilder.java builder/PomClassicTransformer.java builder/ProjectUri.java
Date Thu, 17 Jul 2008 06:55:22 GMT
Author: sisbell
Date: Wed Jul 16 23:55:21 2008
New Revision: 677513

URL: http://svn.apache.org/viewvc?rev=677513&view=rev
Log:
New inheritance rules.

Modified:
    maven/sandbox/branches/SI_MAVEN_2_1_A/maven-project/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java
    maven/sandbox/branches/SI_MAVEN_2_1_A/maven-project/src/main/java/org/apache/maven/project/builder/PomClassicTransformer.java
    maven/sandbox/branches/SI_MAVEN_2_1_A/maven-project/src/main/java/org/apache/maven/project/builder/ProjectUri.java

Modified: maven/sandbox/branches/SI_MAVEN_2_1_A/maven-project/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java
URL: http://svn.apache.org/viewvc/maven/sandbox/branches/SI_MAVEN_2_1_A/maven-project/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java?rev=677513&r1=677512&r2=677513&view=diff
==============================================================================
--- maven/sandbox/branches/SI_MAVEN_2_1_A/maven-project/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java
(original)
+++ maven/sandbox/branches/SI_MAVEN_2_1_A/maven-project/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java
Wed Jul 16 23:55:21 2008
@@ -516,7 +516,7 @@
                 true,
                 true );
 
-              project.getModel().setParent(parent);
+        project.getModel().setParent(parent);
         PomClassicDomainModel domainModel = null;
         PomClassicDomainModel legacy_domainModel = null;
         try {
@@ -551,7 +551,7 @@
             e.printStackTrace();
         }
         
-        return legacy_project;
+        return project;
     }
 
     private Model findModelFromRepository( Artifact artifact,

Modified: maven/sandbox/branches/SI_MAVEN_2_1_A/maven-project/src/main/java/org/apache/maven/project/builder/PomClassicTransformer.java
URL: http://svn.apache.org/viewvc/maven/sandbox/branches/SI_MAVEN_2_1_A/maven-project/src/main/java/org/apache/maven/project/builder/PomClassicTransformer.java?rev=677513&r1=677512&r2=677513&view=diff
==============================================================================
--- maven/sandbox/branches/SI_MAVEN_2_1_A/maven-project/src/main/java/org/apache/maven/project/builder/PomClassicTransformer.java
(original)
+++ maven/sandbox/branches/SI_MAVEN_2_1_A/maven-project/src/main/java/org/apache/maven/project/builder/PomClassicTransformer.java
Wed Jul 16 23:55:21 2008
@@ -25,10 +25,15 @@
                 ProjectUri.Build.Extensions.xUri,
                 ProjectUri.Build.PluginManagement.Plugins.xUri,
                 ProjectUri.Build.Plugins.xUri,
+                ProjectUri.Build.Plugins.Plugin.configuration,
                 ProjectUri.Build.Plugins.Plugin.Dependencies.xUri,
                 ProjectUri.Build.Plugins.Plugin.Executions.xUri,
                 ProjectUri.Build.Resources.xUri,
+                ProjectUri.Build.Resources.Resource.includes,
+                ProjectUri.Build.Resources.Resource.excludes,
                 ProjectUri.Build.TestResources.xUri,
+                //ProjectUri.Build.TestResources.TestResource.Includes.xUri,
+              //  ProjectUri.Build.TestResources.TestResource.excludes,
 
                 ProjectUri.CiManagement.Notifiers.xUri,
 
@@ -41,6 +46,7 @@
                 ProjectUri.DependencyManagement.Dependencies.Dependency.Exclusions.xUri,
 
                 ProjectUri.Developers.xUri,
+                ProjectUri.Developers.Developer.roles,
                 ProjectUri.Licenses.xUri,
                 ProjectUri.MailingLists.xUri,
                 ProjectUri.Modules.xUri,
@@ -239,26 +245,12 @@
                 }
             }
 
-            //Ordered Dependency Rule
-            /*
-            if (domainModels.size() > 1) {
-                ModelDataSource source = new DefaultModelDataSource();
-                source.init(tmp, Arrays.asList(new ArtifactModelContainerFactory(), new IdModelContainerFactory()));
-                List<ModelContainer> containers;
-                try {
-                    containers = source.queryFor(ProjectUri.Dependencies.Dependency.xUri);
-                } catch (IllegalArgumentException e) {
-                    throw new IllegalArgumentException(source.getEventHistory(), e);
-                }
-                int index = tmp.indexOf(getPropertyFor(ProjectUri.Dependencies.xUri, tmp));
-                if (index > -1) {
-                    for (ModelContainer container : containers) {
-                        tmp.removeAll(container.getProperties());
-                        tmp.addAll(index + 1, container.getProperties());
-                    }
-                }
-            }
-            */
+            //Build Test Resources Inheritance Rule
+            for(ModelProperty mp : tmp) {
+               if(domainModels.indexOf(domainModel) > 0 && mp.getUri().startsWith(ProjectUri.Build.TestResources.xUri)){
+                   clearedProperties.add(mp);
+               }
+           }
 
             ModelProperty artifactId = getPropertyFor(ProjectUri.artifactId, tmp);
             if(artifactId != null) {

Modified: maven/sandbox/branches/SI_MAVEN_2_1_A/maven-project/src/main/java/org/apache/maven/project/builder/ProjectUri.java
URL: http://svn.apache.org/viewvc/maven/sandbox/branches/SI_MAVEN_2_1_A/maven-project/src/main/java/org/apache/maven/project/builder/ProjectUri.java?rev=677513&r1=677512&r2=677513&view=diff
==============================================================================
--- maven/sandbox/branches/SI_MAVEN_2_1_A/maven-project/src/main/java/org/apache/maven/project/builder/ProjectUri.java
(original)
+++ maven/sandbox/branches/SI_MAVEN_2_1_A/maven-project/src/main/java/org/apache/maven/project/builder/ProjectUri.java
Wed Jul 16 23:55:21 2008
@@ -83,7 +83,7 @@
             public static String url = "http://apache.org/maven/project/developers#collection/developer/url";
             public static String organization = "http://apache.org/maven/project/developers#collection/developer/organization";
             public static String organizationUrl = "http://apache.org/maven/project/developers#collection/developer/organizationUrl";
-            public static String roles = "http://apache.org/maven/project/developers#collection/developer/roles";
+            public static String roles = "http://apache.org/maven/project/developers#collection/developer/roles#collection";
             public static String timezone = "http://apache.org/maven/project/developers#collection/developer/timezone";
             public static String properties = "http://apache.org/maven/project/developers#collection/developer/properties";
         }
@@ -99,7 +99,7 @@
             public static String url = "http://apache.org/maven/project/contributors#collection/contributor/url";
             public static String organization = "http://apache.org/maven/project/contributors#collection/contributor/organization";
             public static String organizationUrl = "http://apache.org/maven/project/contributors#collection/contributor/organizationUrl";
-            public static String roles = "http://apache.org/maven/project/contributors#collection/contributor/roles";
+            public static String roles = "http://apache.org/maven/project/contributors#collection/contributor/roles#collection";
             public static String timezone = "http://apache.org/maven/project/contributors#collection/contributor/timezone";
             public static String properties = "http://apache.org/maven/project/contributors#collection/contributor/properties";
         }
@@ -160,8 +160,8 @@
                 public static String targetPath = "http://apache.org/maven/project/build/resources#collection/resource/targetPath";
                 public static String filtering = "http://apache.org/maven/project/build/resources#collection/resource/filtering";
                 public static String directory = "http://apache.org/maven/project/build/resources#collection/resource/directory";
-                public static String includes = "http://apache.org/maven/project/build/resources#collection/resource/includes";
-                public static String excludes = "http://apache.org/maven/project/build/resources#collection/resource/excludes";
+                public static String includes = "http://apache.org/maven/project/build/resources#collection/resource/includes#collection";
+                public static String excludes = "http://apache.org/maven/project/build/resources#collection/resource/excludes#collection";
             }
         }
 
@@ -173,8 +173,11 @@
                 public static String targetPath = "http://apache.org/maven/project/build/testResources#collection/testResource/targetPath";
                 public static String filtering = "http://apache.org/maven/project/build/testResources#collection/testResource/filtering";
                 public static String directory = "http://apache.org/maven/project/build/testResources#collection/testResource/directory";
-                public static String includes = "http://apache.org/maven/project/build/testResources#collection/testResource/includes";
                 public static String excludes = "http://apache.org/maven/project/build/testResources#collection/testResource/excludes";
+                public static class Includes {
+                    public static String xUri = "http://apache.org/maven/project/build/testResources#collection/testResource/includes";
+                    public static String include = "http://apache.org/maven/project/build/testResources#collection/testResource/includes/include";
+                }
             }
         }
 
@@ -237,7 +240,7 @@
 
                     public static String goals = "http://apache.org/maven/project/build/pluginManagement/plugins#collection/plugin/goals";
                     public static String inherited = "http://apache.org/maven/project/build/pluginManagement/plugins#collection/plugin/inherited";
-                    public static String configuration = "http://apache.org/maven/project/build/pluginManagement/plugins#collection/plugin/configuration";
+                    public static String configuration = "http://apache.org/maven/project/build/pluginManagement/plugins#collection/plugin/configuration#collection";
                 }
             }
         }
@@ -294,7 +297,7 @@
 
                 public static String goals = "http://apache.org/maven/project/build/plugins#collection/plugin/goals";
                 public static String inherited = "http://apache.org/maven/project/build/plugins#collection/plugin/inherited";
-                public static String configuration = "http://apache.org/maven/project/build/plugins#collection/plugin/configuration";
+                public static String configuration = "http://apache.org/maven/project/build/plugins#collection/plugin/configuration#collection";
             }
         }
     }
@@ -337,29 +340,30 @@
                 public static String defaultGoal = "http://apache.org/maven/project/profiles#collection/profile/build/defaultGoal";
 
                 public static class Resources {
-                    public static String xUri = "http://apache.org/maven/project/profiles#collection/profile/build/resources";
+                    public static String xUri = "http://apache.org/maven/project/profiles#collection/profile/build/resources#collection";
 
                     public static class Resource {
-                        public static String xUri = "http://apache.org/maven/project/profiles#collection/profile/build/resources/resource";
-                        public static String targetPath = "http://apache.org/maven/project/profiles#collection/profile/build/resources/resource/targetPath";
-                        public static String filtering = "http://apache.org/maven/project/profiles#collection/profile/build/resources/resource/filtering";
-                        public static String directory = "http://apache.org/maven/project/profiles#collection/profile/build/resources/resource/directory";
-                        public static String includes = "http://apache.org/maven/project/profiles#collection/profile/build/resources/resource/includes";
-                        public static String excludes = "http://apache.org/maven/project/profiles#collection/profile/build/resources/resource/excludes";
+                        public static String xUri = "http://apache.org/maven/project/profiles#collection/profile/build/resources#collection/resource";
+                        public static String targetPath = "http://apache.org/maven/project/profiles#collection/profile/build/resources#collection/resource/targetPath";
+                        public static String filtering = "http://apache.org/maven/project/profiles#collection/profile/build/resources#collection/resource/filtering";
+                        public static String directory = "http://apache.org/maven/project/profiles#collection/profile/build/resources#collection/resource/directory";
+                        public static String includes = "http://apache.org/maven/project/profiles#collection/profile/build/resources#collection/resource/includes#collection";
+                        public static String excludes = "http://apache.org/maven/project/profiles#collection/profile/build/resources#collection/resource/excludes#collection";
                     }
                 }
 
                 public static class TestResources {
-                    public static String xUri = "http://apache.org/maven/project/profiles#collection/profile/build/testResources";
+                    public static String xUri = "http://apache.org/maven/project/profiles#collection/profile/build/testResources#collection";
 
                     public static class TestResource {
-                        public static String xUri = "http://apache.org/maven/project/profiles#collection/profile/build/testResources/testResource";
-                        public static String targetPath = "http://apache.org/maven/project/profiles#collection/profile/build/testResources/testResource/targetPath";
-                        public static String filtering = "http://apache.org/maven/project/profiles#collection/profile/build/testResources/testResource/filtering";
-                        public static String directory = "http://apache.org/maven/project/profiles#collection/profile/build/testResources/testResource/directory";
-                        public static String includes = "http://apache.org/maven/project/profiles#collection/profile/build/testResources/testResource/includes";
-                        public static String excludes = "http://apache.org/maven/project/profiles#collection/profile/build/testResources/testResource/excludes";
-                    }
+                        public static String xUri = "http://apache.org/maven/project/profiles#collection/profile/build/testResources#collection/testResource";
+                        public static String targetPath = "http://apache.org/maven/project/profiles#collection/profile/build/testResources#collection/testResource/targetPath";
+                        public static String filtering = "http://apache.org/maven/project/profiles#collection/profile/build/testResources#collection/testResource/filtering";
+                        public static String directory = "http://apache.org/maven/project/profiles#collection/profile/build/testResources#collection/testResource/directory";
+                        public static String includes = "http://apache.org/maven/project/profiles#collection/profile/build/testResources#collection/testResource/includes#collection";
+                        public static String excludes = "http://apache.org/maven/project/profiles#collection/profile/build/testResources#collection/testResource/excludes#collection";
+
+                   }
                 }
 
                 public static String directory = "http://apache.org/maven/project/profiles#collection/profile/build/directory";



Mime
View raw message