You are viewing a plain text version of this content. The canonical link for it is here.
Posted to nmaven-commits@incubator.apache.org by si...@apache.org on 2006/12/10 23:44:12 UTC

svn commit: r485313 [8/15] - in /incubator/nmaven/trunk: components/ components/dotnet-artifact/ components/dotnet-artifact/src/ components/dotnet-artifact/src/main/ components/dotnet-artifact/src/main/java/ components/dotnet-artifact/src/main/java/org...

Added: incubator/nmaven/trunk/components/dotnet-registry/src/main/java/org/apache/maven/dotnet/registry/Repository.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/components/dotnet-registry/src/main/java/org/apache/maven/dotnet/registry/Repository.java?view=auto&rev=485313
==============================================================================
--- incubator/nmaven/trunk/components/dotnet-registry/src/main/java/org/apache/maven/dotnet/registry/Repository.java (added)
+++ incubator/nmaven/trunk/components/dotnet-registry/src/main/java/org/apache/maven/dotnet/registry/Repository.java Sun Dec 10 15:43:51 2006
@@ -0,0 +1,76 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.maven.dotnet.registry;
+
+import java.io.InputStream;
+import java.io.IOException;
+import java.util.Hashtable;
+
+/**
+ * The interface for repositories managed by the <code>RepositoryRegistry</code>. The implementing classes should
+ * provide the methods for accessing the domain specific data.
+ *
+ * @author Shane Isbell
+ */
+
+public interface Repository
+{
+
+    /**
+     * Loads the configuration file and configuration properties. In the case below, the <code>inputStream</code>
+     * contains the adapters.txt file and the <code>properties</code> holds the init-params. The init params should be
+     * used to specialize the repository configuration.  The example below shows that you can add new properties
+     * to <code>MyRepository</code> but not delete them.
+     * <pre>
+     * &lt;registry-config&gt;
+     * &lt;repositories&gt;
+     * &lt;repository&gt;
+     * &lt;repository-name&gt;adapter&lt;/repository-name&gt;
+     * &lt;repository-class&gt;org.jvending.sample.MyRepository&lt;/repository-class&gt;
+     * &lt;repository-config&gt;${basedir}/adapters.txt&lt;/repository-config&gt;
+     * &lt;init-param&gt;
+     * &lt;param-name&gt;add&lt;/param-name&gt;
+     * &lt;param-value&gt;true&lt;/param-value&gt;
+     * &lt;/init-param&gt;
+     * &lt;init-param&gt;
+     * &lt;param-name&gt;delete&lt;/param-name&gt;
+     * &lt;param-value&gt;false&lt;/param-value&gt;
+     * &lt;/init-param&gt;
+     * &lt;/repository&gt;
+     * &lt;/repositories&gt;
+     * &lt;/registry-config&gt;
+     * </pre>
+     * <p/>
+     * Since this method uses an <code>InputStream</code> parameter, the configuration file can be loaded off of the
+     * local file system or from a specific URL located at an HTTP address.
+     *
+     * @param inputStream the configuration file
+     * @param properties  the properties used to configure the repository
+     * @throws IOException thrown on interrupted I/O. Implementing class may also use this exception to throw
+     *                     other exceptions like invalid properties.
+     */
+    void load( InputStream inputStream, Hashtable properties )
+        throws IOException;
+
+    /**
+     * @param repositoryRegistry
+     */
+    void setRepositoryRegistry( RepositoryRegistry repositoryRegistry );
+
+}
\ No newline at end of file

Propchange: incubator/nmaven/trunk/components/dotnet-registry/src/main/java/org/apache/maven/dotnet/registry/Repository.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/nmaven/trunk/components/dotnet-registry/src/main/java/org/apache/maven/dotnet/registry/RepositoryLoader.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/components/dotnet-registry/src/main/java/org/apache/maven/dotnet/registry/RepositoryLoader.java?view=auto&rev=485313
==============================================================================
--- incubator/nmaven/trunk/components/dotnet-registry/src/main/java/org/apache/maven/dotnet/registry/RepositoryLoader.java (added)
+++ incubator/nmaven/trunk/components/dotnet-registry/src/main/java/org/apache/maven/dotnet/registry/RepositoryLoader.java Sun Dec 10 15:43:51 2006
@@ -0,0 +1,59 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.maven.dotnet.registry;
+
+import java.util.Hashtable;
+import java.io.IOException;
+
+/**
+ * Provides services for loading repositories into the registry.
+ *
+ * @author Shane Isbell
+ */
+
+public interface RepositoryLoader
+{
+
+    /**
+     * Takes information from the registry-config file and dynamically builds a <code>Repository</code>
+     *
+     * @param fileUri         name of the repository's configuration file. It may be located on the file system
+     *                        or within a jar.
+     * @param repositoryClass name of the repository class
+     * @param initParams      <code>Hashtable</code> containing the repository's configuration parameters.
+     * @return instance of repository
+     * @throws IOException
+     */
+
+    Repository loadRepository( String fileUri, String repositoryClass, Hashtable initParams )
+        throws IOException;
+
+    /**
+     * Accessor for the name of the <code>RepositoryLoader</code>. Typically will be the class name.
+     *
+     * @return name of the repository loader
+     */
+    String getLoaderName();
+
+    /**
+     * @param repositoryRegistry
+     */
+    void setRepositoryRegistry( RepositoryRegistry repositoryRegistry );
+
+}

Propchange: incubator/nmaven/trunk/components/dotnet-registry/src/main/java/org/apache/maven/dotnet/registry/RepositoryLoader.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/nmaven/trunk/components/dotnet-registry/src/main/java/org/apache/maven/dotnet/registry/RepositoryRegistry.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/components/dotnet-registry/src/main/java/org/apache/maven/dotnet/registry/RepositoryRegistry.java?view=auto&rev=485313
==============================================================================
--- incubator/nmaven/trunk/components/dotnet-registry/src/main/java/org/apache/maven/dotnet/registry/RepositoryRegistry.java (added)
+++ incubator/nmaven/trunk/components/dotnet-registry/src/main/java/org/apache/maven/dotnet/registry/RepositoryRegistry.java Sun Dec 10 15:43:51 2006
@@ -0,0 +1,124 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.maven.dotnet.registry;
+
+import java.io.InputStream;
+import java.io.IOException;
+import java.util.Set;
+
+/**
+ * Provides services for loading registry config files and accessing and managing repositories.
+ *
+ * @author Shane Isbell
+ */
+
+public interface RepositoryRegistry
+{
+
+    /**
+     * Role used to register component implementations with the container.
+     */
+    String ROLE = RepositoryRegistry.class.getName();
+
+    /**
+     * Mutator for setting the <code>RepositoryLoader</code>
+     *
+     * @param repositoryLoader
+     */
+    void setRepositoryLoader( RepositoryLoader repositoryLoader );
+
+    /**
+     * Mutator for setting the <code>RegistryLoader</code>
+     *
+     * @param registryLoader
+     */
+    void setRegistryLoader( RegistryLoader registryLoader );
+
+    /**
+     * Loads the registry from inputStream. Multiple config files may be loaded into the registry.
+     *
+     * @param inputStream contains the jvending-config file.
+     * @throws java.io.IOException thrown on interrupted I/O
+     */
+    void loadFromInputStream( InputStream inputStream )
+        throws IOException;
+
+    /**
+     * Convenience method for loading a file off of a file system.
+     *
+     * @param fileName relative or absolute path of the file
+     * @throws IOException thrown on interrupted I/O
+     */
+    void loadFromFile( String fileName )
+        throws IOException;
+
+
+    /**
+     * Convenience method for loading from a JAR or Resource.
+     *
+     * @param fileName relative or absolute path of the file
+     * @throws IOException thrown on interrupted I/O
+     */
+    void loadFromResource( String fileName, Class sourceClass )
+        throws IOException;
+
+    /**
+     * Adds a repository to the registry. If the repository name already exists, this method will overwrite the old
+     * Repository instance within the registry.
+     *
+     * @param name       name of the repository
+     * @param repository instance of the repository
+     */
+    void addRepository( String name, Repository repository );
+
+    /**
+     * Finds a repository from the registry.
+     *
+     * @param name name of the repository.
+     * @return instance of the Repository or null if instance does not exist
+     */
+    Repository find( String name );
+
+    /**
+     * Removes a repository from the registry
+     *
+     * @param name name of the repository
+     */
+    void removeRepository( String name );
+
+    /**
+     * Accessor for repository names.
+     *
+     * @return unmodifiable set of repository names
+     */
+    Set getRepositoryNames();
+
+    /**
+     * Empties all of the repositories from the registry.
+     */
+    void empty();
+
+    /**
+     * Returns true if the registry is empty, otherwise returns true.
+     *
+     * @return true if the registry is empty, otherwise returns true.
+     */
+    boolean isEmpty();
+
+}

Propchange: incubator/nmaven/trunk/components/dotnet-registry/src/main/java/org/apache/maven/dotnet/registry/RepositoryRegistry.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/nmaven/trunk/components/dotnet-registry/src/main/java/org/apache/maven/dotnet/registry/impl/RepositoryRegistryImpl.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/components/dotnet-registry/src/main/java/org/apache/maven/dotnet/registry/impl/RepositoryRegistryImpl.java?view=auto&rev=485313
==============================================================================
--- incubator/nmaven/trunk/components/dotnet-registry/src/main/java/org/apache/maven/dotnet/registry/impl/RepositoryRegistryImpl.java (added)
+++ incubator/nmaven/trunk/components/dotnet-registry/src/main/java/org/apache/maven/dotnet/registry/impl/RepositoryRegistryImpl.java Sun Dec 10 15:43:51 2006
@@ -0,0 +1,201 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.maven.dotnet.registry.impl;
+
+import org.apache.maven.dotnet.registry.RepositoryRegistry;
+import org.apache.maven.dotnet.registry.RepositoryLoader;
+import org.apache.maven.dotnet.registry.RegistryLoader;
+import org.apache.maven.dotnet.registry.Repository;
+
+import java.util.Hashtable;
+import java.util.Properties;
+import java.util.Set;
+import java.util.Collections;
+import java.io.InputStream;
+import java.io.IOException;
+import java.io.FileInputStream;
+
+import org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable;
+import org.codehaus.plexus.personality.plexus.lifecycle.phase.InitializationException;
+
+/**
+ * @author Shane Isbell
+ */
+public class RepositoryRegistryImpl
+    implements RepositoryRegistry, Initializable
+{
+
+    private Hashtable repositories = new Hashtable();
+
+    private RepositoryLoader repositoryLoader;
+
+    private RegistryLoader registryLoader;
+
+    /**
+     * @see org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable#initialize() 
+     */
+    public void initialize()
+        throws InitializationException
+    {
+        try
+        {
+            loadFromResource( "/META-INF/nmaven/registry-config.xml", this.getClass() );
+        }
+        catch ( IOException e )
+        {
+            throw new InitializationException( "NMAVEN-000-000:", e );
+        }
+    }
+
+    public boolean isEmpty()
+    {
+        return repositories.isEmpty();
+    }
+
+    public synchronized void setRepositoryLoader( RepositoryLoader loader )
+    {
+        repositoryLoader = loader;
+    }
+
+    public synchronized void setRegistryLoader( RegistryLoader loader )
+    {
+        registryLoader = loader;
+    }
+
+    public synchronized void loadFromInputStream( InputStream inputStream )
+        throws IOException
+    {
+
+        if ( repositoryLoader == null || registryLoader == null )
+        {
+            InputStream stream =
+                org.apache.maven.dotnet.registry.RepositoryRegistry.class.getResourceAsStream( "/registry.properties" );
+            if ( stream == null )
+            {
+                throw new IOException( "JV-000-001: Could not find /registry.properties file with the jar" );
+            }
+
+            Properties prop = new Properties();
+            prop.load( stream );
+
+            if ( repositoryLoader == null )
+            {
+                String loaderClassName = prop.getProperty( "repositoryLoader" );
+                if ( loaderClassName == null )
+                {
+                    throw new IOException( "JV-000-002: Missing the repositoryLoader from the /registry.properties" );
+                }
+
+                String message = "Repository Loader = " + loaderClassName;
+                try
+                {
+                    Class c = Class.forName( loaderClassName );
+                    repositoryLoader = (RepositoryLoader) c.newInstance();
+                }
+                catch ( Exception e )
+                {
+                    throw new IOException( "JV-000-003: " + e.toString() + " : " + message );
+                }
+                catch ( Error e )
+                {
+                    throw new IOException( "JV-000-004: " + e.toString() + " : " + message );
+                }
+            }
+
+            if ( registryLoader == null )
+            {
+                String loaderClassName = prop.getProperty( "registryLoader" );
+                if ( loaderClassName == null )
+                {
+                    throw new IOException( "JV-000-005: Missing the registryLoader from the /registry.properties" );
+                }
+
+                String message = "Registry Loader = " + loaderClassName;
+                try
+                {
+                    Class c = Class.forName( loaderClassName );
+                    registryLoader = (RegistryLoader) c.newInstance();
+                }
+                catch ( Exception e )
+                {
+                    throw new IOException( "JV-000-006: " + e.toString() + " : " + message );
+                }
+                catch ( Error e )
+                {
+                    throw new IOException( "JV-000-007: " + e.toString() + " : " + message );
+                }
+            }
+        }
+        repositoryLoader.setRepositoryRegistry( this );
+        registryLoader.setRepositoryLoader( repositoryLoader );
+        registryLoader.loadRegistry( inputStream );
+        repositories.putAll( registryLoader.getRepositories() );
+    }
+
+    public synchronized void loadFromFile( String fileName )
+        throws IOException
+    {
+        FileInputStream fis = new FileInputStream( fileName );
+        loadFromInputStream( fis );
+    }
+
+
+    public synchronized void loadFromResource( String fileName, Class sourceClass )
+        throws IOException
+    {
+        if ( sourceClass == null )
+        {
+            throw new IOException( "JV-000-008: The class cannot be null when loading from a resource" );
+        }
+        InputStream stream = sourceClass.getResourceAsStream( fileName );
+
+        if ( stream == null )
+        {
+            throw new IOException( "JV-000-009: Could not locate resource: File Name = " + fileName );
+        }
+        loadFromInputStream( stream );
+    }
+
+    public synchronized void addRepository( String name, Repository repository )
+    {
+        repositories.put( name, repository );
+    }
+
+
+    public synchronized Repository find( String name )
+    {
+        return (Repository) repositories.get( name );
+    }
+
+    public synchronized void removeRepository( String name )
+    {
+        repositories.remove( name );
+    }
+
+    public synchronized Set getRepositoryNames()
+    {
+        return Collections.unmodifiableSet( repositories.keySet() );
+    }
+
+    public synchronized void empty()
+    {
+        repositories.clear();
+    }
+}
+

Propchange: incubator/nmaven/trunk/components/dotnet-registry/src/main/java/org/apache/maven/dotnet/registry/impl/RepositoryRegistryImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/nmaven/trunk/components/dotnet-registry/src/main/java/org/apache/maven/dotnet/registry/impl/StandardRegistryLoader.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/components/dotnet-registry/src/main/java/org/apache/maven/dotnet/registry/impl/StandardRegistryLoader.java?view=auto&rev=485313
==============================================================================
--- incubator/nmaven/trunk/components/dotnet-registry/src/main/java/org/apache/maven/dotnet/registry/impl/StandardRegistryLoader.java (added)
+++ incubator/nmaven/trunk/components/dotnet-registry/src/main/java/org/apache/maven/dotnet/registry/impl/StandardRegistryLoader.java Sun Dec 10 15:43:51 2006
@@ -0,0 +1,378 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.maven.dotnet.registry.impl;
+
+import org.apache.maven.dotnet.registry.RegistryLoader;
+import org.apache.maven.dotnet.registry.Repository;
+import org.apache.maven.dotnet.registry.RepositoryLoader;
+
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.Hashtable;
+import java.io.InputStream;
+import java.io.IOException;
+
+import org.kxml2.io.KXmlParser;
+import org.xmlpull.v1.XmlPullParserException;
+import org.xmlpull.v1.XmlPullParser;
+
+/**
+ * The default loader for the registry-config.xml file.
+ *
+ * @author Shane Isbell
+ */
+
+public class StandardRegistryLoader
+    implements RegistryLoader
+{
+    /**
+     * Internal list of <code>RepositoryObject</code>s
+     */
+    private List repositories = new ArrayList();
+
+    private Hashtable repoMap = new Hashtable();
+
+    private RepositoryLoader repositoryLoader;
+
+    public void setRepositoryLoader( RepositoryLoader repositoryLoader )
+    {
+        this.repositoryLoader = repositoryLoader;
+    }
+
+    /**
+     * Loads the registry-config file
+     *
+     * @param inputStream inputstream containing registry-config file
+     * @throws java.io.IOException
+     */
+    public final void loadRegistry( InputStream inputStream )
+        throws IOException
+    {
+
+        KXmlParser parser = new KXmlParser();
+        try
+        {
+            parser.setInput( inputStream, null );
+        }
+        catch ( XmlPullParserException e )
+        {
+            throw new IOException( e.toString() );
+        }
+        try
+        {
+            parser.nextTag();
+            parser.require( XmlPullParser.START_TAG, null, "registry-config" );
+            parser.nextTag();
+            parser.require( XmlPullParser.START_TAG, null, "repositories" );
+
+            while ( parser.nextTag() == XmlPullParser.START_TAG )
+            {
+                parser.require( XmlPullParser.START_TAG, null, "repository" );
+                repositories.add( getRepositoryObject( parser ) );
+            }
+        }
+        catch ( XmlPullParserException e )
+        {
+            throw new IOException( "JV-000-010:" + e.toString() );
+        }
+        loadIntoRegistry();
+    }
+
+    public final Hashtable getRepositories()
+    {
+        return repoMap;
+    }
+
+
+    /**
+     * Resolves system variables within the path
+     *
+     * @param fileName name of the configuration file
+     * @return path of the file with resolved system variables. Default value is '.'
+     */
+    private String toPath( String fileName )
+    {
+        byte[] path = fileName.getBytes();
+        int length = path.length;
+        StringBuffer env = new StringBuffer();
+        StringBuffer filePath = new StringBuffer();
+        for ( int i = 0; i < length; )
+        {
+            if ( i >= length - 2 )
+            {
+                filePath.append( (char) path[i++] );
+            }
+            else if ( path[i] == 36 )
+            {
+                if ( path[++i] == 123 )
+                {
+                    i++;
+                    while ( i < length - 1 && path[i] != 125 )
+                    {
+                        env.append( (char) path[i++] );
+                    }
+                    if ( path[i] == 125 )
+                    {
+                        i++;
+                    }
+                }
+                else
+                {
+                    i--;
+                    i--;
+                }
+                String pathEnv = System.getProperty( env.toString().trim(), "." );
+                filePath.append( pathEnv.toString() );
+            }
+            else
+            {
+                filePath.append( (char) path[i++] );
+            }
+        }//end for:i
+        return filePath.toString();
+    }
+
+    /**
+     * Loads all of the repositories into the registry
+     *
+     * @throws IOException
+     */
+    private void loadIntoRegistry()
+        throws IOException
+    {
+        if ( repositoryLoader == null )
+        {
+            throw new IOException( "JV-000-011: Repository Loader does not exist" );
+        }
+        for ( Iterator i = repositories.iterator(); i.hasNext(); )
+        {
+            RepositoryObject repositoryObject = (RepositoryObject) i.next();
+            String repositoryName = repositoryObject.getRepositoryName();
+            String className = repositoryObject.getRepositoryClass();
+            String fileName = repositoryObject.getRepositoryConfig();
+            //instantiate class based on info in the registry-config file
+            Repository repository =
+                repositoryLoader.loadRepository( toPath( fileName ), className, repositoryObject.getInitParams() );
+
+            if ( repository != null )
+            {
+                repoMap.put( repositoryName, repository );
+            }
+        }
+    }
+
+    /**
+     * Constructs a <code>RepositoryObject</code> from the registry-config file
+     *
+     * @param parser
+     * @return <code>RepositoryObject</code>
+     * @throws IOException
+     * @throws XmlPullParserException
+     */
+    private RepositoryObject getRepositoryObject( KXmlParser parser )
+        throws IOException, XmlPullParserException
+    {
+        RepositoryObject repositoryObject = new RepositoryObject();
+        Hashtable initParams = new Hashtable();
+        for ( int i = 0; parser.nextTag() == XmlPullParser.START_TAG; i++ )
+        {
+            switch ( i )
+            {
+                case 0:
+                    parser.require( XmlPullParser.START_TAG, null, "repository-name" );
+                    repositoryObject.setRepositoryName( parser.nextText() );
+                    break;
+                case 1:
+                    parser.require( XmlPullParser.START_TAG, null, "repository-class" );
+                    repositoryObject.setRepositoryClass( parser.nextText() );
+                    break;
+                case 2:
+                    parser.require( XmlPullParser.START_TAG, null, "repository-config" );
+                    repositoryObject.setRepositoryConfig( parser.nextText() );
+                    break;
+                default:
+                    parser.require( XmlPullParser.START_TAG, null, "init-param" );
+
+                    String paramName = null;
+                    String paramValue = null;
+                    for ( int j = 0; parser.nextTag() == XmlPullParser.START_TAG; j++ )
+                    {
+
+                        switch ( j )
+                        {
+                            case 0:
+                                parser.require( XmlPullParser.START_TAG, null, "param-name" );
+                                paramName = parser.nextText();
+                                break;
+                            case 1:
+                                parser.require( XmlPullParser.START_TAG, null, "param-value" );
+                                paramValue = parser.nextText();
+                                break;
+                            default:
+                                throw new IOException();
+                        }
+                    }//end params
+                    if ( paramName != null && paramValue != null )
+                    {
+                        initParams.put( paramName, paramValue );
+                    }
+            }//end all tags
+            repositoryObject.setInitParams( initParams );
+        }
+
+        return repositoryObject;
+    }
+
+    /**
+     * Value Object for Repository Information
+     */
+    private class RepositoryObject
+    {
+
+        /**
+         * Name of the repository
+         */
+        private String repositoryName;
+
+        /**
+         * package and class name of the repository
+         */
+        private String repositoryClass;
+
+        /*Path and name of the repository config file*/
+        private String repositoryConfig;
+
+        /**
+         * Initialization parameters of the repository
+         */
+        private Hashtable initParams;
+
+        /**
+         * Empty Constructor
+         */
+        RepositoryObject()
+        {
+        }
+
+        /**
+         * Constructor
+         *
+         * @param repositoryName   name of the repository
+         * @param repositoryClass  path and name of the repository config file
+         * @param repositoryConfig Path and name of the repository config fil
+         */
+        RepositoryObject( String repositoryName, String repositoryClass, String repositoryConfig )
+        {
+            this.repositoryName = repositoryName;
+            this.repositoryClass = repositoryClass;
+            this.repositoryConfig = repositoryConfig;
+        }
+
+        String getRepositoryName()
+        {
+            return repositoryName;
+        }
+
+        void setRepositoryName( String repositoryName )
+        {
+            this.repositoryName = repositoryName;
+        }
+
+        String getRepositoryClass()
+        {
+            return repositoryClass;
+        }
+
+        void setRepositoryClass( String repositoryClass )
+        {
+            this.repositoryClass = repositoryClass;
+        }
+
+        String getRepositoryConfig()
+        {
+            return repositoryConfig;
+        }
+
+        void setRepositoryConfig( String repositoryConfig )
+        {
+            this.repositoryConfig = repositoryConfig;
+        }
+
+        Hashtable getInitParams()
+        {
+            return initParams;
+        }
+
+        void setInitParams( Hashtable initParams )
+        {
+            this.initParams = initParams;
+        }
+
+        /**
+         * Classes are equal if they have the same values for class, config and name
+         */
+        public boolean equals( Object o )
+        {
+            if ( this == o )
+            {
+                return true;
+            }
+            if ( !( o instanceof RepositoryObject ) )
+            {
+                return false;
+            }
+
+            final RepositoryObject repositoryObject = (RepositoryObject) o;
+
+            if ( !repositoryClass.equals( repositoryObject.repositoryClass ) )
+            {
+                return false;
+            }
+            if ( !repositoryConfig.equals( repositoryObject.repositoryConfig ) )
+            {
+                return false;
+            }
+            if ( !repositoryName.equals( repositoryObject.repositoryName ) )
+            {
+                return false;
+            }
+
+            return true;
+        }
+
+        /**
+         * Classes have identical hash code if they have the same values for class, config and name
+         */
+        public int hashCode()
+        {
+            int result;
+            result = repositoryName.hashCode();
+            result = 29 * result + repositoryClass.hashCode();
+            result = 29 * result + repositoryConfig.hashCode();
+            return result;
+        }
+
+        public String toString()
+        {
+            return "Name = " + repositoryName + ", Class = " + repositoryClass + ", Config = " + repositoryConfig;
+        }
+    }
+
+}

Propchange: incubator/nmaven/trunk/components/dotnet-registry/src/main/java/org/apache/maven/dotnet/registry/impl/StandardRegistryLoader.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/nmaven/trunk/components/dotnet-registry/src/main/java/org/apache/maven/dotnet/registry/impl/StandardRepositoryLoader.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/components/dotnet-registry/src/main/java/org/apache/maven/dotnet/registry/impl/StandardRepositoryLoader.java?view=auto&rev=485313
==============================================================================
--- incubator/nmaven/trunk/components/dotnet-registry/src/main/java/org/apache/maven/dotnet/registry/impl/StandardRepositoryLoader.java (added)
+++ incubator/nmaven/trunk/components/dotnet-registry/src/main/java/org/apache/maven/dotnet/registry/impl/StandardRepositoryLoader.java Sun Dec 10 15:43:51 2006
@@ -0,0 +1,128 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.maven.dotnet.registry.impl;
+
+import org.apache.maven.dotnet.registry.Repository;
+import org.apache.maven.dotnet.registry.RepositoryLoader;
+import org.apache.maven.dotnet.registry.RepositoryRegistry;
+
+import java.util.Hashtable;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.FileInputStream;
+
+/**
+ * The default repository loader. This class can be extended
+ *
+ * @author Shane Isbell
+ */
+
+public class StandardRepositoryLoader
+    implements RepositoryLoader
+{
+
+    private RepositoryRegistry repositoryRegistry;
+
+    /**
+     * Takes information from the registry-config file and dynamically builds a <code>Repository</code>
+     *
+     * @param fileUri         name of the repository's configuration file. It may be located on the file system
+     *                        or within a jar.
+     * @param repositoryClass name of the repository class
+     * @param initParams      <code>Hashtable</code> containing the repository's configuration parameters.
+     * @return instance of repository
+     * @throws java.io.IOException
+     */
+
+    public Repository loadRepository( String fileUri, String repositoryClass, Hashtable initParams )
+        throws IOException
+    {
+        if ( repositoryRegistry == null )
+        {
+            throw new IOException( "JV-000-106: The repository registry has not been set." );
+        }
+
+        Hashtable props = ( initParams != null ) ? initParams : new Hashtable();
+
+        if ( fileUri == null || fileUri.trim().equals( "" ) )
+        {
+            throw new IOException( "JV-000-100: File uri must be provided." );
+        }
+        if ( repositoryClass == null || repositoryClass.trim().equals( "" ) )
+        {
+            throw new IOException( "JV-000-101: Repository class name must be provided: File Name = " + fileUri +
+                ", Properties = " + props.toString() );
+        }
+
+        InputStream stream;
+        Repository repository;
+        try
+        {
+            stream = new FileInputStream( fileUri );
+        }
+        catch ( IOException e )
+        {
+            stream = this.getClass().getResourceAsStream( fileUri );
+        }
+        String message =
+            "File Name = " + fileUri + ", Repository Class = " + repositoryClass + ", Properties = " + props.toString();
+        boolean optional = ( initParams.containsKey( "optional" ) &&
+            ( (String) initParams.get( "optional" ) ).equalsIgnoreCase( "true" ) );
+        if ( stream == null && !optional )
+        {
+            throw new IOException( "JV-000-102: Unable to loadRegistry config file: " + message );
+        }
+        else if ( stream == null && optional )
+        {
+            return null;
+        }
+
+        try
+        {
+            Class c = Class.forName( repositoryClass );
+            repository = (Repository) c.newInstance();
+            repository.setRepositoryRegistry( repositoryRegistry );
+            repository.load( stream, props );
+
+        }
+        catch ( IOException e )
+        {
+            throw new IOException( "JV-000-103: " + e.toString() + " : " + message );
+        }
+        catch ( Exception e )
+        {
+            throw new IOException( "JV-000-104: " + e.toString() + " : " + message );
+        }
+        catch ( Error e )
+        {
+            throw new IOException( "JV-000-105: " + e.toString() + " : " + message );
+        }
+        return repository;
+    }
+
+    public String getLoaderName()
+    {
+        return this.getClass().getName();
+    }
+
+    public void setRepositoryRegistry( RepositoryRegistry repositoryRegistry )
+    {
+        this.repositoryRegistry = repositoryRegistry;
+    }
+}

Propchange: incubator/nmaven/trunk/components/dotnet-registry/src/main/java/org/apache/maven/dotnet/registry/impl/StandardRepositoryLoader.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/nmaven/trunk/components/dotnet-registry/src/main/resources/META-INF/plexus/components.xml
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/components/dotnet-registry/src/main/resources/META-INF/plexus/components.xml?view=auto&rev=485313
==============================================================================
--- incubator/nmaven/trunk/components/dotnet-registry/src/main/resources/META-INF/plexus/components.xml (added)
+++ incubator/nmaven/trunk/components/dotnet-registry/src/main/resources/META-INF/plexus/components.xml Sun Dec 10 15:43:51 2006
@@ -0,0 +1,8 @@
+<component-set>
+    <components>
+        <component>
+            <role>org.apache.maven.dotnet.registry.RepositoryRegistry</role>
+            <implementation>org.apache.maven.dotnet.registry.impl.RepositoryRegistryImpl</implementation>
+        </component>
+    </components>
+</component-set>

Propchange: incubator/nmaven/trunk/components/dotnet-registry/src/main/resources/META-INF/plexus/components.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/nmaven/trunk/components/dotnet-registry/src/main/resources/registry.properties
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/components/dotnet-registry/src/main/resources/registry.properties?view=auto&rev=485313
==============================================================================
--- incubator/nmaven/trunk/components/dotnet-registry/src/main/resources/registry.properties (added)
+++ incubator/nmaven/trunk/components/dotnet-registry/src/main/resources/registry.properties Sun Dec 10 15:43:51 2006
@@ -0,0 +1,2 @@
+registryLoader=org.apache.maven.dotnet.registry.impl.StandardRegistryLoader
+repositoryLoader=org.apache.maven.dotnet.registry.impl.StandardRepositoryLoader
\ No newline at end of file

Propchange: incubator/nmaven/trunk/components/dotnet-registry/src/main/resources/registry.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/nmaven/trunk/components/dotnet-vendor/pom.xml
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/components/dotnet-vendor/pom.xml?view=auto&rev=485313
==============================================================================
--- incubator/nmaven/trunk/components/dotnet-vendor/pom.xml (added)
+++ incubator/nmaven/trunk/components/dotnet-vendor/pom.xml Sun Dec 10 15:43:51 2006
@@ -0,0 +1,41 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <parent>
+        <groupId>org.apache.maven.dotnet</groupId>
+        <version>0.14-SNAPSHOT</version>
+        <artifactId>dotnet-components</artifactId>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+    <groupId>org.apache.maven.dotnet</groupId>
+    <artifactId>dotnet-vendor</artifactId>
+    <version>0.14-SNAPSHOT</version>
+    <name>dotnet-vendor</name>
+    <description>
+        NMaven
+    </description>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.maven.dotnet</groupId>
+            <artifactId>dotnet-core</artifactId>
+            <version>0.14-SNAPSHOT</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.maven.dotnet</groupId>
+            <artifactId>dotnet-model-settings</artifactId>
+            <version>0.14-SNAPSHOT</version>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <configuration>
+                    <source>1.5</source>
+                    <target>1.5</target>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+</project>
\ No newline at end of file

Propchange: incubator/nmaven/trunk/components/dotnet-vendor/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/nmaven/trunk/components/dotnet-vendor/src/main/java/org/apache/maven/dotnet/vendor/IllegalStateException.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/components/dotnet-vendor/src/main/java/org/apache/maven/dotnet/vendor/IllegalStateException.java?view=auto&rev=485313
==============================================================================
--- incubator/nmaven/trunk/components/dotnet-vendor/src/main/java/org/apache/maven/dotnet/vendor/IllegalStateException.java (added)
+++ incubator/nmaven/trunk/components/dotnet-vendor/src/main/java/org/apache/maven/dotnet/vendor/IllegalStateException.java Sun Dec 10 15:43:51 2006
@@ -0,0 +1,69 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.maven.dotnet.vendor;
+
+/**
+ * Exception thrown when the framework detects a vendor info state that it does not recognize or that it cannot handle. 
+ *
+ * @author Shane Isbell
+ */
+public class IllegalStateException
+    extends Exception
+{
+    static final long serialVersionUID = 34879179013427894L;
+
+    /**
+     * Constructs an <code>IllegalStateException</code>  with no exception message.
+     */
+    public IllegalStateException()
+    {
+        super();
+    }
+
+    /**
+     * Constructs an <code>IllegalStateException</code> with the specified exception message.
+     *
+     * @param message the exception message
+     */
+    public IllegalStateException( String message )
+    {
+        super( message );
+    }
+
+    /**
+     * Constructs an <code>IllegalStateException</code> with the specified exception message and cause of the exception.
+     *
+     * @param message the exception message
+     * @param cause   the cause of the exception
+     */
+    public IllegalStateException( String message, Throwable cause )
+    {
+        super( message, cause );
+    }
+
+    /**
+     * Constructs an <code>IllegalStateException</code> with the cause of the exception.
+     *
+     * @param cause the cause of the exception
+     */
+    public IllegalStateException( Throwable cause )
+    {
+        super( cause );
+    }
+}

Propchange: incubator/nmaven/trunk/components/dotnet-vendor/src/main/java/org/apache/maven/dotnet/vendor/IllegalStateException.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/nmaven/trunk/components/dotnet-vendor/src/main/java/org/apache/maven/dotnet/vendor/InvalidVersionFormatException.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/components/dotnet-vendor/src/main/java/org/apache/maven/dotnet/vendor/InvalidVersionFormatException.java?view=auto&rev=485313
==============================================================================
--- incubator/nmaven/trunk/components/dotnet-vendor/src/main/java/org/apache/maven/dotnet/vendor/InvalidVersionFormatException.java (added)
+++ incubator/nmaven/trunk/components/dotnet-vendor/src/main/java/org/apache/maven/dotnet/vendor/InvalidVersionFormatException.java Sun Dec 10 15:43:51 2006
@@ -0,0 +1,70 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.maven.dotnet.vendor;
+
+/**
+ * Exception thrown when a version is invalid.
+ *
+ * @author Shane Isbell
+ */
+public class InvalidVersionFormatException
+    extends Exception
+{
+
+    static final long serialVersionUID = -788934297433457L;
+
+    /**
+     * Constructs an <code>InvalidVersionFormatException</code>  with no exception message.
+     */
+    public InvalidVersionFormatException()
+    {
+        super();
+    }
+
+    /**
+     * Constructs an <code>InvalidVersionFormatException</code> with the specified exception message.
+     *
+     * @param message the exception message
+     */
+    public InvalidVersionFormatException( String message )
+    {
+        super( message );
+    }
+
+    /**
+     * Constructs an <code>InvalidVersionFormatException</code> with the specified exception message and cause of the exception.
+     *
+     * @param message the exception message
+     * @param cause   the cause of the exception
+     */
+    public InvalidVersionFormatException( String message, Throwable cause )
+    {
+        super( message, cause );
+    }
+
+    /**
+     * Constructs an <code>InvalidVersionFormatException</code> with the cause of the exception.
+     *
+     * @param cause the cause of the exception
+     */
+    public InvalidVersionFormatException( Throwable cause )
+    {
+        super( cause );
+    }
+}

Propchange: incubator/nmaven/trunk/components/dotnet-vendor/src/main/java/org/apache/maven/dotnet/vendor/InvalidVersionFormatException.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/nmaven/trunk/components/dotnet-vendor/src/main/java/org/apache/maven/dotnet/vendor/StateMachineProcessor.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/components/dotnet-vendor/src/main/java/org/apache/maven/dotnet/vendor/StateMachineProcessor.java?view=auto&rev=485313
==============================================================================
--- incubator/nmaven/trunk/components/dotnet-vendor/src/main/java/org/apache/maven/dotnet/vendor/StateMachineProcessor.java (added)
+++ incubator/nmaven/trunk/components/dotnet-vendor/src/main/java/org/apache/maven/dotnet/vendor/StateMachineProcessor.java Sun Dec 10 15:43:51 2006
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.maven.dotnet.vendor;
+
+/**
+ * Provides services for filling in missing vendor info according to its state of completion. An implementation of this
+ * class can use various <code>VendorInfoTransitionRule</code> instances to transition states during processing.
+ *
+ * @author Shane Isbell
+ * @see VendorInfoTransitionRule
+ */
+public interface StateMachineProcessor
+{
+
+    /**
+     * Role used to register component implementations with the container.
+     */
+    String ROLE = StateMachineProcessor.class.getName();
+
+    /**
+     * Processes the specified vendor info by filling in missing information.
+     *
+     * @param vendorInfo the vendor info to fill in
+     * @throws IllegalStateException if the state of the specified vendor info is illegal or cannot be determined
+     */
+    void process( VendorInfo vendorInfo )
+        throws IllegalStateException;
+
+}

Propchange: incubator/nmaven/trunk/components/dotnet-vendor/src/main/java/org/apache/maven/dotnet/vendor/StateMachineProcessor.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/nmaven/trunk/components/dotnet-vendor/src/main/java/org/apache/maven/dotnet/vendor/Vendor.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/components/dotnet-vendor/src/main/java/org/apache/maven/dotnet/vendor/Vendor.java?view=auto&rev=485313
==============================================================================
--- incubator/nmaven/trunk/components/dotnet-vendor/src/main/java/org/apache/maven/dotnet/vendor/Vendor.java (added)
+++ incubator/nmaven/trunk/components/dotnet-vendor/src/main/java/org/apache/maven/dotnet/vendor/Vendor.java Sun Dec 10 15:43:51 2006
@@ -0,0 +1,61 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.maven.dotnet.vendor;
+
+/**
+ * Enumeration of supported vendors.
+ *
+ * @author Shane Isbell
+ */
+public enum Vendor
+{
+    /**Microsoft Vendor*/
+    MICROSOFT( "MICROSOFT" ),
+
+    /**Mono (or Novell) vendor*/
+    MONO( "MONO" ),
+
+    /**DotGNU Vendor*/
+    DOTGNU( "DotGNU" );
+
+    /**
+     * The vendor name
+     */
+    private final String vendorName;
+
+    /**
+     * Constructor
+     *
+     * @param vendorName the vendor name
+     */
+    Vendor( String vendorName )
+    {
+        this.vendorName = vendorName;
+    }
+
+    /**
+     * Returns the vendor name.
+     *
+     * @return the vendor name
+     */
+    public String getVendorName()
+    {
+        return vendorName;
+    }
+}

Propchange: incubator/nmaven/trunk/components/dotnet-vendor/src/main/java/org/apache/maven/dotnet/vendor/Vendor.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/nmaven/trunk/components/dotnet-vendor/src/main/java/org/apache/maven/dotnet/vendor/VendorFactory.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/components/dotnet-vendor/src/main/java/org/apache/maven/dotnet/vendor/VendorFactory.java?view=auto&rev=485313
==============================================================================
--- incubator/nmaven/trunk/components/dotnet-vendor/src/main/java/org/apache/maven/dotnet/vendor/VendorFactory.java (added)
+++ incubator/nmaven/trunk/components/dotnet-vendor/src/main/java/org/apache/maven/dotnet/vendor/VendorFactory.java Sun Dec 10 15:43:51 2006
@@ -0,0 +1,81 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.maven.dotnet.vendor;
+
+import org.apache.maven.dotnet.PlatformUnsupportedException;
+
+/**
+ * Provides services for returning an instance of Vendor based on the OS or name.
+ *
+ * @author Shane Isbell
+ */
+public final class VendorFactory
+{
+
+    /**
+     * Class constructor
+     */
+    private VendorFactory()
+    {
+    }
+
+    /**
+     * Returns the default vendor of the operating system on which the application is running:
+     * Microsoft for windows and Mono for all others.
+     *
+     * @return the default vendor of the operating system on which the application is running
+     * @throws org.apache.maven.dotnet.PlatformUnsupportedException
+     *          if the default vendor cannot be determined
+     */
+    public static synchronized Vendor getDefaultVendorForOS()
+        throws PlatformUnsupportedException
+    {
+        return System.getProperty( "os.name" ).toLowerCase().trim().contains( "windows" )
+            ? VendorFactory.createVendorFromName( "MICROSOFT" ) : VendorFactory.createVendorFromName( "MONO" );
+    }
+
+    /**
+     * Returns a vendor instance for the given vendor name: MICROSOFT, DotGNU, MONO.
+     *
+     * @param vendorName the name of a vendor
+     * @return a vendor instance for the given vendor name: MICROSOFT, DotGNU, MONO
+     * @throws VendorUnsupportedException if the vendor is not known
+     * @throws NullPointerException if the vendor name parameter is null
+     */
+    public static synchronized Vendor createVendorFromName( String vendorName )
+        throws VendorUnsupportedException
+    {
+        if ( vendorName.toLowerCase().trim().equals( "microsoft" ) )
+        {
+            return Vendor.MICROSOFT;
+        }
+        else if ( vendorName.toLowerCase().trim().equals( "mono" ) )
+        {
+            return Vendor.MONO;
+        }
+        else if ( vendorName.toLowerCase().trim().equals( "dotgnu" ) )
+        {
+            return Vendor.DOTGNU;
+        }
+        else
+        {
+            throw new VendorUnsupportedException( "NAMVEN-100-000: Unknown vendor: Name = " + vendorName );
+        }
+    }
+}

Propchange: incubator/nmaven/trunk/components/dotnet-vendor/src/main/java/org/apache/maven/dotnet/vendor/VendorFactory.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/nmaven/trunk/components/dotnet-vendor/src/main/java/org/apache/maven/dotnet/vendor/VendorInfo.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/components/dotnet-vendor/src/main/java/org/apache/maven/dotnet/vendor/VendorInfo.java?view=auto&rev=485313
==============================================================================
--- incubator/nmaven/trunk/components/dotnet-vendor/src/main/java/org/apache/maven/dotnet/vendor/VendorInfo.java (added)
+++ incubator/nmaven/trunk/components/dotnet-vendor/src/main/java/org/apache/maven/dotnet/vendor/VendorInfo.java Sun Dec 10 15:43:51 2006
@@ -0,0 +1,193 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.maven.dotnet.vendor;
+
+import java.io.File;
+
+/**
+ * Provides accessors for obtaining information about a vendor. 
+ *
+ * @author Shane Isbell
+ */
+public interface VendorInfo
+{
+
+    /**
+     * Returns vendor
+     *
+     * @return vendor
+     */
+    Vendor getVendor();
+
+    /**
+     * @param vendor
+     */
+    void setVendor( Vendor vendor );
+
+    /**
+     * Returns vendor version.
+     *
+     * @return vendor version
+     */
+    String getVendorVersion();
+
+    /**
+     * Sets vendor version
+     *
+     * @param vendorVersion the vendor version
+     */
+    void setVendorVersion( String vendorVersion );
+
+    /**
+     * Returns framework version of the executable
+     *
+     * @return the framework version of the executable
+     */
+    String getFrameworkVersion();
+
+    /**
+     * Sets the framework version of the executable
+     *
+     * @param frameworkVersion
+     */
+    void setFrameworkVersion( String frameworkVersion );
+
+    /**
+     * Returns the path where the executable lives.
+     *
+     * @return the path where the executable lives
+     */
+    File getExecutablePath();
+
+    /**
+     * Sets the path where the executable lives.
+     *
+     * @param executablePath the path where the executable lives
+     */
+    void setExecutablePath( File executablePath );
+
+    /**
+     * If the vendor information is the default (or preferred) value for a given vendor, returns true,
+     * otherwise returns false. This allows the vendor matching framework to choose a specific version of the
+     * compiler vendor (such as MONO 1.1.13.8 vs 1.1.18) if such a version is not specified within the pom.
+     *
+     * @return If the vendor information is the default (or preferred) value for a given vendor, returns true,
+     *         otherwise returns false.
+     */
+    boolean isDefault();
+
+    /**
+     * Set to true if the vendor information is the default, otherwise set to false.
+     *
+     * @param isDefault
+     */
+    void setDefault( boolean isDefault );
+
+    /**
+     * Provides factory services for creating a default instance of vendor info.
+     */
+    public static class Factory
+    {
+        /**
+         * Default constructor
+         */
+        private Factory()
+        {
+        }
+
+        /**
+         * Creates a default implementation of vendor info.
+         *
+         * @return a default implementation of vendor info
+         */
+        public static VendorInfo createDefaultVendorInfo()
+        {
+            return new VendorInfo()
+            {
+                private Vendor vendor;
+
+                private String vendorVersion;
+
+                private String frameworkVersion;
+
+                private File executablePath;
+
+                private boolean isDefault;
+
+                public boolean isDefault()
+                {
+                    return isDefault;
+                }
+
+                public void setDefault( boolean aDefault )
+                {
+                    isDefault = aDefault;
+                }
+
+                public File getExecutablePath()
+                {
+                    return executablePath;
+                }
+
+                public void setExecutablePath( File executablePath )
+                {
+                    this.executablePath = executablePath;
+                }
+
+                public Vendor getVendor()
+                {
+                    return vendor;
+                }
+
+                public void setVendor( Vendor vendor )
+                {
+                    this.vendor = vendor;
+                }
+
+                public String getVendorVersion()
+                {
+                    return vendorVersion;
+                }
+
+                public void setVendorVersion( String vendorVersion )
+                {
+                    this.vendorVersion = vendorVersion;
+                }
+
+                public String getFrameworkVersion()
+                {
+                    return frameworkVersion;
+                }
+
+                public void setFrameworkVersion( String frameworkVersion )
+                {
+                    this.frameworkVersion = frameworkVersion;
+                }
+
+                public String toString()
+                {
+                    return "Vendor = " + vendor + ", Vendor Version = " + vendorVersion + ", Framework Version = " +
+                        frameworkVersion + ", Executable Path = " +
+                        ( ( executablePath != null ) ? executablePath.getAbsolutePath() : "" );
+                }
+            };
+        }
+    }
+
+}

Propchange: incubator/nmaven/trunk/components/dotnet-vendor/src/main/java/org/apache/maven/dotnet/vendor/VendorInfo.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/nmaven/trunk/components/dotnet-vendor/src/main/java/org/apache/maven/dotnet/vendor/VendorInfoMatchPolicy.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/components/dotnet-vendor/src/main/java/org/apache/maven/dotnet/vendor/VendorInfoMatchPolicy.java?view=auto&rev=485313
==============================================================================
--- incubator/nmaven/trunk/components/dotnet-vendor/src/main/java/org/apache/maven/dotnet/vendor/VendorInfoMatchPolicy.java (added)
+++ incubator/nmaven/trunk/components/dotnet-vendor/src/main/java/org/apache/maven/dotnet/vendor/VendorInfoMatchPolicy.java Sun Dec 10 15:43:51 2006
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.maven.dotnet.vendor;
+
+/**
+ * Provides services for matching vendor information.
+ *
+ * @author Shane Isbell
+ */
+public interface VendorInfoMatchPolicy
+{
+    /**
+     * Returns true if the policy matches the given vendor information, otherwise returns false.
+     *
+     * @param vendorInfo the vendor info to match
+     * @return true if the policy matches the given vendor information, otherwise returns false
+     */
+    boolean match( VendorInfo vendorInfo );
+}

Propchange: incubator/nmaven/trunk/components/dotnet-vendor/src/main/java/org/apache/maven/dotnet/vendor/VendorInfoMatchPolicy.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/nmaven/trunk/components/dotnet-vendor/src/main/java/org/apache/maven/dotnet/vendor/VendorInfoRepository.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/components/dotnet-vendor/src/main/java/org/apache/maven/dotnet/vendor/VendorInfoRepository.java?view=auto&rev=485313
==============================================================================
--- incubator/nmaven/trunk/components/dotnet-vendor/src/main/java/org/apache/maven/dotnet/vendor/VendorInfoRepository.java (added)
+++ incubator/nmaven/trunk/components/dotnet-vendor/src/main/java/org/apache/maven/dotnet/vendor/VendorInfoRepository.java Sun Dec 10 15:43:51 2006
@@ -0,0 +1,102 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.maven.dotnet.vendor;
+
+import org.apache.maven.dotnet.vendor.VendorInfo;
+import org.apache.maven.dotnet.PlatformUnsupportedException;
+
+import java.util.List;
+import java.util.Set;
+import java.io.File;
+
+/**
+ * Provides services for matching and obtaining vendor info from the nmaven-settings config file.
+ *
+ * @author Shane Isbell
+ */
+public interface VendorInfoRepository
+{
+
+    /**
+     * Role used to register component implementations with the container.
+     */
+    String ROLE = VendorInfoRepository.class.getName();
+
+    /**
+     * Returns a list of all vendor infos in the repository.
+     *
+     * @return a list of all vendor infos in the repository
+     */
+    List<VendorInfo> getVendorInfos();
+
+    /**
+     * Returns a list of vendor infos for the specified vendor name, vendor version and framework version.
+     *
+     * @param vendorName       the vendor name (Microsoft, Mono, DotGNU) to match. If this value is null,
+     *                         this method will match all vendor names.
+     * @param vendorVersion    the vendor version to match. If this value is null, this method will match all vendor
+     *                         versions.
+     * @param frameworkVersion the framework version to match. If this value is null, this method will match all framework
+     *                         versions.
+     * @param isDefault        if true, this method will filter out vendor info entries that do not have a default field
+     * @return a list of vendor infos for the specified vendor name, vendor version and framework version
+     */
+    List<VendorInfo> getVendorInfosFor( String vendorName, String vendorVersion, String frameworkVersion,
+                                        boolean isDefault );
+
+    /**
+     * Returns a list of vendor infos for the specified vendor info. This is a convenience method for the
+     * <code>getVendorInfosFor(String, String, String, boolean)</code>. This method allows the use
+     * of a vendor info parameter directly.
+     *
+     * @param vendorInfo the vendor info to match. This value may be incomplete, in which case, this method will return
+     *                   all possible vendor infos that could match.
+     * @param isDefault  if true, this method will filter out vendor info entries that do not have a default field
+     * @return a list of vendor infos for the specified vendorInfo
+     */
+    List<VendorInfo> getVendorInfosFor( VendorInfo vendorInfo, boolean isDefault );
+
+    /**
+     * Returns the maximum version of the given set of versions.
+     *
+     * @param versions a set of versions from which to choose the maximum version
+     * @return the maximum version from the specified set of versions.
+     * @throws InvalidVersionFormatException if the format of one or more of the versions is invalid
+     */
+    String getMaxVersion( Set<String> versions )
+        throws InvalidVersionFormatException;
+
+    /**
+     * Returns file pointing to the .NET framework installation root used for compiling artifacts.
+     *
+     * @param vendorInfo the vendor info
+     * @return file pointing to the .NET framework installation root used for compiling artifacts
+     * @throws org.apache.maven.dotnet.PlatformUnsupportedException
+     */
+    File getInstallRootFor( VendorInfo vendorInfo )
+        throws PlatformUnsupportedException;
+
+    /**
+     * Returns true if this repository exists (and can be used), otherwise returns false.
+     *
+     * @return true if this repository exists (and can be used), otherwise returns false
+     */
+    boolean exists();
+
+}

Propchange: incubator/nmaven/trunk/components/dotnet-vendor/src/main/java/org/apache/maven/dotnet/vendor/VendorInfoRepository.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/nmaven/trunk/components/dotnet-vendor/src/main/java/org/apache/maven/dotnet/vendor/VendorInfoState.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/components/dotnet-vendor/src/main/java/org/apache/maven/dotnet/vendor/VendorInfoState.java?view=auto&rev=485313
==============================================================================
--- incubator/nmaven/trunk/components/dotnet-vendor/src/main/java/org/apache/maven/dotnet/vendor/VendorInfoState.java (added)
+++ incubator/nmaven/trunk/components/dotnet-vendor/src/main/java/org/apache/maven/dotnet/vendor/VendorInfoState.java Sun Dec 10 15:43:51 2006
@@ -0,0 +1,241 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.maven.dotnet.vendor;
+
+/**
+ * Provides a way to know how complete a vendor info object is or more concisely its state of completion.
+ *
+ * @author Shane Isbell
+ */
+public enum VendorInfoState
+{
+    /**
+     * State of VendorInfo object: Vendor is Microsoft, vendor version exists, framework version exists
+     */
+    MTT,
+
+    /**
+     * State of VendorInfo object: Vendor is Microsoft, vendor version exists, framework version does not exist
+     */
+    MTF,
+
+    /**
+     * State of VendorInfo object:  Vendor is Microsoft, vendor version does not exist, framework version exists
+     */
+    MFT,
+
+    /**
+     * State of VendorInfo object:  Vendor is Microsoft, vendor version does not exist, framework version does not exist
+     */
+    MFF,
+
+    /**
+     * State of VendorInfo object: Vendor is Novell, vendor version exists, framework version exists
+     */
+    NTT,
+
+    /**
+     * State of VendorInfo object: Vendor is Novell, vendor version exists, framework version does not exist
+     */
+    NTF,
+
+    /**
+     * State of VendorInfo object:  Vendor is Novell, vendor version does not exist, framework version exists
+     */
+    NFT,
+
+    /**
+     * State of VendorInfo object:  Vendor is Novell, vendor version does not exist, framework version does not exist
+     */
+    NFF,
+
+    /**
+     * State of VendorInfo object: Vendor is GNU, vendor version exists, framework version exists
+     */
+    GTT,
+
+    /**
+     * State of VendorInfo object: Vendor is GNU, vendor version exists, framework version does not exist
+     */
+    GTF,
+
+    /**
+     * State of VendorInfo object:  Vendor is GNU, vendor version does not exist, framework version exists
+     */
+    GFT,
+
+    /**
+     * State of VendorInfo object:  Vendor is GNU vendor version does not exist, framework version does not exist
+     */
+    GFF,
+
+    /**
+     * State of VendorInfo object: Vendor is unknown, vendor version exists, framework version exists
+     */
+    FTT,
+
+    /**
+     * State of VendorInfo object: Vendor is unknown, vendor version exists, framework version does not exist
+     */
+    FTF,
+
+    /**
+     * State of VendorInfo object:  Vendor is unknown, vendor version does not exist, framework version exists
+     */
+    FFT,
+
+    /**
+     * State of VendorInfo object:  Vendor is unknown, vendor version does not exist, framework version does not exist
+     */
+    FFF,
+
+    /**
+     * Exit state of VendorInfo object
+     */
+    EXIT,
+
+    /**
+     * Start state of VendorInfo object
+     */
+    START,
+
+    /**
+     * Null state of VendorInfo object
+     */
+    NULL;
+
+    /**
+     * Returns the completion state of the specified vendor info
+     *
+     * @param vendorInfo the vendor info to determine the state of completion
+     * @return the state of the specified vendor info
+     */
+    public VendorInfoState getState( VendorInfo vendorInfo )
+    {
+        if ( vendorInfo == null )
+        {
+            return NULL;
+        }
+
+        if ( vendorInfo.getVendor() == null )
+        {
+            if ( vendorInfo.getVendorVersion() == null )
+            {
+                if ( vendorInfo.getFrameworkVersion() == null )
+                {
+                    return FFF;
+                }
+                else
+                {
+                    return FFT;
+                }
+            }
+            else
+            {
+                if ( vendorInfo.getFrameworkVersion() == null )
+                {
+                    return FTF;
+                }
+                else
+                {
+                    return FTT;
+                }
+            }
+        }
+        else if ( vendorInfo.getVendor().equals( Vendor.MICROSOFT ) )
+        {
+            if ( vendorInfo.getVendorVersion() == null )
+            {
+                if ( vendorInfo.getFrameworkVersion() == null )
+                {
+                    return MFF;
+                }
+                else
+                {
+                    return MFT;
+                }
+            }
+            else
+            {
+                if ( vendorInfo.getFrameworkVersion() == null )
+                {
+                    return MTF;
+                }
+                else
+                {
+                    return MTT;
+                }
+            }
+        }
+        else if ( vendorInfo.getVendor().equals( Vendor.MONO ) )
+        {
+            if ( vendorInfo.getVendorVersion() == null )
+            {
+                if ( vendorInfo.getFrameworkVersion() == null )
+                {
+                    return NFF;
+                }
+                else
+                {
+                    return NFT;
+                }
+            }
+            else
+            {
+                if ( vendorInfo.getFrameworkVersion() == null )
+                {
+                    return NTF;
+                }
+                else
+                {
+                    return NTT;
+                }
+            }
+        }
+        else if ( vendorInfo.getVendor().equals( Vendor.DOTGNU ) )
+        {
+            if ( vendorInfo.getVendorVersion() == null )
+            {
+                if ( vendorInfo.getFrameworkVersion() == null )
+                {
+                    return GFF;
+                }
+                else
+                {
+                    return GFT;
+                }
+            }
+            else
+            {
+                if ( vendorInfo.getFrameworkVersion() == null )
+                {
+                    return GTF;
+                }
+                else
+                {
+                    return GTT;
+                }
+            }
+        }
+        else
+        {
+            return EXIT;
+        }
+    }
+}

Propchange: incubator/nmaven/trunk/components/dotnet-vendor/src/main/java/org/apache/maven/dotnet/vendor/VendorInfoState.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/nmaven/trunk/components/dotnet-vendor/src/main/java/org/apache/maven/dotnet/vendor/VendorInfoTransitionRule.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/components/dotnet-vendor/src/main/java/org/apache/maven/dotnet/vendor/VendorInfoTransitionRule.java?view=auto&rev=485313
==============================================================================
--- incubator/nmaven/trunk/components/dotnet-vendor/src/main/java/org/apache/maven/dotnet/vendor/VendorInfoTransitionRule.java (added)
+++ incubator/nmaven/trunk/components/dotnet-vendor/src/main/java/org/apache/maven/dotnet/vendor/VendorInfoTransitionRule.java Sun Dec 10 15:43:51 2006
@@ -0,0 +1,38 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.maven.dotnet.vendor;
+
+/**
+ * Provides a service for filling in (or processing) vendor information and transitioning its state. The
+ * <code>StateMachineProcessor</code> is responsible for processing each transition rule within the framework.
+ *
+ * @author Shane Isbell
+ * @see StateMachineProcessor
+ */
+public interface VendorInfoTransitionRule
+{
+
+    /**
+     * Fills in some or all of the specified vendor info object and returns the new state.
+     *
+     * @param vendorInfo the vendor info to fill in
+     * @return the new state of the vendor info parameter
+     */
+    VendorInfoState process( VendorInfo vendorInfo );
+}

Propchange: incubator/nmaven/trunk/components/dotnet-vendor/src/main/java/org/apache/maven/dotnet/vendor/VendorInfoTransitionRule.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/nmaven/trunk/components/dotnet-vendor/src/main/java/org/apache/maven/dotnet/vendor/VendorUnsupportedException.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/components/dotnet-vendor/src/main/java/org/apache/maven/dotnet/vendor/VendorUnsupportedException.java?view=auto&rev=485313
==============================================================================
--- incubator/nmaven/trunk/components/dotnet-vendor/src/main/java/org/apache/maven/dotnet/vendor/VendorUnsupportedException.java (added)
+++ incubator/nmaven/trunk/components/dotnet-vendor/src/main/java/org/apache/maven/dotnet/vendor/VendorUnsupportedException.java Sun Dec 10 15:43:51 2006
@@ -0,0 +1,72 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.maven.dotnet.vendor;
+
+import org.apache.maven.dotnet.PlatformUnsupportedException;
+
+/**
+ * Exception thrown when the vendor is not recognized or is not valid for a specific platform or language.
+ * 
+ * @author Shane Isbell
+ */
+public class VendorUnsupportedException
+    extends PlatformUnsupportedException
+{
+
+    static final long serialVersionUID = -72946723034227L;
+
+    /**
+     * Constructs an <code>VendorUnsupportedException</code>  with no exception message.
+     */
+    public VendorUnsupportedException()
+    {
+        super();
+    }
+
+    /**
+     * Constructs an <code>VendorUnsupportedException</code> with the specified exception message.
+     *
+     * @param message the exception message
+     */
+    public VendorUnsupportedException( String message )
+    {
+        super( message );
+    }
+
+    /**
+     * Constructs an <code>VendorUnsupportedException</code> with the specified exception message and cause of the exception.
+     *
+     * @param message the exception message
+     * @param cause   the cause of the exception
+     */
+    public VendorUnsupportedException( String message, Throwable cause )
+    {
+        super( message, cause );
+    }
+
+    /**
+     * Constructs an <code>VendorUnsupportedException</code> with the cause of the exception.
+     *
+     * @param cause the cause of the exception
+     */
+    public VendorUnsupportedException( Throwable cause )
+    {
+        super( cause );
+    }
+}

Propchange: incubator/nmaven/trunk/components/dotnet-vendor/src/main/java/org/apache/maven/dotnet/vendor/VendorUnsupportedException.java
------------------------------------------------------------------------------
    svn:eol-style = native