You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by rf...@apache.org on 2014/11/02 21:16:23 UTC

git commit: [MNG-5717] Enrich toolchain xml with merge information Pushing version forward from 1.0.0 to 1.1.0

Repository: maven
Updated Branches:
  refs/heads/master 2d086fde2 -> 21c13ca48


[MNG-5717] Enrich toolchain xml with merge information
Pushing version forward from 1.0.0 to 1.1.0


Project: http://git-wip-us.apache.org/repos/asf/maven/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven/commit/21c13ca4
Tree: http://git-wip-us.apache.org/repos/asf/maven/tree/21c13ca4
Diff: http://git-wip-us.apache.org/repos/asf/maven/diff/21c13ca4

Branch: refs/heads/master
Commit: 21c13ca4843ce5aa376ce33a41a510c092599808
Parents: 2d086fd
Author: Robert Scholte <rf...@codehaus.org>
Authored: Sun Nov 2 21:15:50 2014 +0100
Committer: Robert Scholte <rf...@codehaus.org>
Committed: Sun Nov 2 21:15:50 2014 +0100

----------------------------------------------------------------------
 maven-core/pom.xml                     |  2 +-
 maven-core/src/main/mdo/toolchains.mdo | 46 +++++++++++++++++++++++++++++
 2 files changed, 47 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/21c13ca4/maven-core/pom.xml
----------------------------------------------------------------------
diff --git a/maven-core/pom.xml b/maven-core/pom.xml
index a6b6557..ca55bf9 100644
--- a/maven-core/pom.xml
+++ b/maven-core/pom.xml
@@ -187,7 +187,7 @@
         <groupId>org.codehaus.modello</groupId>
         <artifactId>modello-maven-plugin</artifactId>
         <configuration>
-          <version>1.0.0</version>
+          <version>1.1.0</version>
           <models>
             <model>src/main/mdo/toolchains.mdo</model>
           </models>

http://git-wip-us.apache.org/repos/asf/maven/blob/21c13ca4/maven-core/src/main/mdo/toolchains.mdo
----------------------------------------------------------------------
diff --git a/maven-core/src/main/mdo/toolchains.mdo b/maven-core/src/main/mdo/toolchains.mdo
index a9e2d21..c844e4d 100644
--- a/maven-core/src/main/mdo/toolchains.mdo
+++ b/maven-core/src/main/mdo/toolchains.mdo
@@ -47,8 +47,53 @@
     </defaults>
 
     <classes>
+    <class java.clone="deep">
+	      <name>TrackableBase</name>
+	      <version>1.1.0+</version>
+	      <description>
+	        common base class that contains code to track the source for
+	        this instance (USER|GLOBAL)
+	      </description>
+	      <codeSegments>
+	        <codeSegment>
+	          <version>1.1.0+</version>
+	          <code>
+	            <![CDATA[
+	    public static final String USER_LEVEL = "user-level";
+	    public static final String GLOBAL_LEVEL = "global-level";
+	
+	    private String sourceLevel = USER_LEVEL;
+	    private boolean sourceLevelSet = false;
+	
+	    public void setSourceLevel( String sourceLevel )
+	    {
+	        if ( sourceLevelSet )
+	        {
+	            throw new IllegalStateException( "Cannot reset sourceLevel attribute; it is already set to: " + sourceLevel );
+	        }
+	        else if ( !( USER_LEVEL.equals( sourceLevel ) || GLOBAL_LEVEL.equals( sourceLevel ) ) )
+	        {
+	            throw new IllegalArgumentException( "sourceLevel must be one of: {" + USER_LEVEL + "," + GLOBAL_LEVEL + "}" );
+	        }
+	        else
+	        {
+	            this.sourceLevel = sourceLevel;
+	            this.sourceLevelSet = true;
+	        }
+	    }
+	
+	    public String getSourceLevel()
+	    {
+	        return sourceLevel;
+	    }
+	            ]]>
+	          </code>
+	        </codeSegment>
+	      </codeSegments>
+	    </class>
         <class rootElement="true" xml.tagName="toolchains" xsd.compositor="sequence">
             <name>PersistedToolchains</name>
+            <superClass>TrackableBase</superClass>
             <description><![CDATA[
          The <code>&lt;toolchains&gt;</code> element is the root of the descriptor.
          The following table lists all of the possible child elements.
@@ -68,6 +113,7 @@
         </class>
         <class>
             <name>ToolchainModel</name>
+            <superClass>TrackableBase</superClass>
             <version>1.0.0+</version>
             <description>Definition of a toolchain instance.</description>
             <fields>