incubator-nmaven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sisb...@apache.org
Subject svn commit: r485313 [2/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...
Date Sun, 10 Dec 2006 23:44:12 GMT
Added: incubator/nmaven/trunk/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/ArtifactMatchPolicy.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/ArtifactMatchPolicy.java?view=auto&rev=485313
==============================================================================
--- incubator/nmaven/trunk/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/ArtifactMatchPolicy.java (added)
+++ incubator/nmaven/trunk/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/ArtifactMatchPolicy.java Sun Dec 10 15:43:51 2006
@@ -0,0 +1,39 @@
+/*
+ * 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.artifact;
+
+import org.apache.maven.artifact.Artifact;
+
+/**
+ * Provides a way for a developer to implement custom match policies for an artifact.
+ *
+ * @author Shane Isbell
+ * @see ArtifactContext#getDirectDependenciesFor
+ */
+public interface ArtifactMatchPolicy
+{
+
+    /**
+     * Returns true if <code>Artifact</code> matches the policy implementation, otherwise returns false.
+     *
+     * @param artifact the artifact to match
+     * @return true if <code>Artifact</code> matches the policy implementation, otherwise returns false
+     */
+    boolean match( Artifact artifact );
+}

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

Added: incubator/nmaven/trunk/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/AssemblyRepositoryLayout.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/AssemblyRepositoryLayout.java?view=auto&rev=485313
==============================================================================
--- incubator/nmaven/trunk/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/AssemblyRepositoryLayout.java (added)
+++ incubator/nmaven/trunk/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/AssemblyRepositoryLayout.java Sun Dec 10 15:43:51 2006
@@ -0,0 +1,110 @@
+/*
+ * 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.artifact;
+
+import org.apache.maven.artifact.Artifact;
+import org.apache.maven.artifact.repository.ArtifactRepository;
+import org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout;
+import org.apache.maven.artifact.metadata.ArtifactMetadata;
+
+import java.io.File;
+
+/**
+ * Repository Layout for .NET Assemblies:
+ * follows the format ${groupId}/${artifactId}/${version}/${.classifier}/${id}.{extension}
+ *
+ * @author Shane Isbell
+ */
+public class AssemblyRepositoryLayout
+    implements ArtifactRepositoryLayout
+{
+
+    /**
+     * Default constructor.
+     */
+    public AssemblyRepositoryLayout()
+    {
+    }
+
+    /**
+     * Returns the relative path (from the repository root) of the specified artifact.
+     *
+     * @param artifact the artifact to determine the path of.
+     * @return the relative path (from the repository root) of the specified artifact
+     * @throws NullPointerException if artifact is null
+     */
+    public String pathOf( Artifact artifact )
+    {
+        StringBuffer artifactPath = new StringBuffer();
+        for ( String groupId : artifact.getGroupId().split( "[.]" ) )
+        {
+            artifactPath.append( groupId ).append( File.separator );
+        }
+
+        artifactPath.append( artifact.getArtifactId() ).append( File.separator ).append( artifact.getBaseVersion() ).
+            append( File.separator );
+        if ( artifact.hasClassifier() )
+        {
+            artifactPath.append( artifact.getClassifier() ).append( File.separator );
+        }
+
+        artifactPath.append( artifact.getArtifactId() ).append( "." ).append(
+            ( artifact.getArtifactHandler() ).getExtension() );
+        return artifactPath.toString();
+    }
+
+    /**
+     * Returns the path (relative to the specified local repository) of an artifact's metadata.
+     *
+     * @param metadata   the artifact metadata
+     * @param repository the artifact repository that contains the metadata
+     * @return the path of an artifact's metadata within the specified repository
+     */
+    public String pathOfLocalRepositoryMetadata( ArtifactMetadata metadata, ArtifactRepository repository )
+    {
+        StringBuffer path = new StringBuffer();
+        for ( String groupId : metadata.getGroupId().split( "[.]" ) )
+        {
+            path.append( groupId ).append( File.separator );
+        }
+
+        if ( !metadata.storedInGroupDirectory() )
+        {
+            path.append( metadata.getArtifactId() ).append( File.separator );
+            if ( metadata.storedInArtifactVersionDirectory() )
+            {
+                path.append( metadata.getBaseVersion() ).append( File.separator );
+            }
+        }
+        return path.append( metadata.getLocalFilename( repository ) ).toString();
+    }
+
+    /**
+     * Returns empty string. This method is here because it is part of the required API but it is not used within the context of the
+     * invoking framework.
+     *
+     * @param metadata the artifact metadata. This may be null.
+     * @return empty string
+     */
+    public String pathOfRemoteRepositoryMetadata( ArtifactMetadata metadata )
+    {
+        System.out.println( "CALLING REMOTE : " + metadata.getRemoteFilename() );
+        return "";
+    }
+}

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

Added: incubator/nmaven/trunk/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/AssemblyResolver.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/AssemblyResolver.java?view=auto&rev=485313
==============================================================================
--- incubator/nmaven/trunk/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/AssemblyResolver.java (added)
+++ incubator/nmaven/trunk/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/AssemblyResolver.java Sun Dec 10 15:43:51 2006
@@ -0,0 +1,66 @@
+/*
+ * 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.artifact;
+
+import org.apache.maven.project.MavenProject;
+import org.apache.maven.model.Dependency;
+import org.apache.maven.artifact.Artifact;
+import org.apache.maven.artifact.resolver.ArtifactResolutionException;
+import org.apache.maven.artifact.resolver.ArtifactNotFoundException;
+
+import java.io.File;
+import java.util.List;
+
+/**
+ * Provides services for resolving .NET assembly artifacts.
+ *
+ * @author Shane Isbell
+ */
+public interface AssemblyResolver
+{
+
+    /**
+     * Role used to register component implementations with the container.
+     */
+    String ROLE = AssemblyResolver.class.getName();
+
+    /**
+     * Resolves transitive dependencies for the project.
+     *
+     * @param project             the maven project
+     * @param sourceArtifact      the artifact to which the resolved dependencies belong
+     * @param dependencies        the list of dependencies of the specified artifact
+     * @param pomFile             the pom file of the specified artifact
+     * @param localRepositoryPath the path of the local Maven repository
+     * @param addResolvedDependenciesToProject
+     *                            true, if the resolved dependencies should be added the the specified
+     *                            maven project, otherwise false. This value should be set to false if it is resolving
+     *                            .NET executables that are intended to be executed as an external process. If it is
+     *                            resolving assemblies that the source artifact needs to compile against, this value
+     *                            should be set to true.
+     * @throws ArtifactResolutionException
+     * @throws ArtifactNotFoundException
+     */
+
+    void resolveTransitivelyFor( MavenProject project, Artifact sourceArtifact, List<Dependency> dependencies,
+                                 File pomFile, String localRepositoryPath, boolean addResolvedDependenciesToProject )
+        throws ArtifactResolutionException, ArtifactNotFoundException;
+
+
+}

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

Added: incubator/nmaven/trunk/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/impl/ArtifactContextImpl.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/impl/ArtifactContextImpl.java?view=auto&rev=485313
==============================================================================
--- incubator/nmaven/trunk/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/impl/ArtifactContextImpl.java (added)
+++ incubator/nmaven/trunk/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/impl/ArtifactContextImpl.java Sun Dec 10 15:43:51 2006
@@ -0,0 +1,264 @@
+/*
+ * 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.artifact.impl;
+
+import java.util.*;
+import java.io.File;
+
+import org.apache.maven.dotnet.artifact.*;
+import org.apache.maven.dotnet.registry.RepositoryRegistry;
+import org.codehaus.plexus.logging.LogEnabled;
+import org.codehaus.plexus.logging.Logger;
+import org.apache.maven.artifact.Artifact;
+import org.apache.maven.artifact.factory.ArtifactFactory;
+import org.apache.maven.artifact.versioning.VersionRange;
+import org.apache.maven.artifact.repository.ArtifactRepository;
+import org.apache.maven.artifact.repository.DefaultArtifactRepository;
+import org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout;
+import org.apache.maven.artifact.resolver.*;
+import org.apache.maven.artifact.metadata.ArtifactMetadataSource;
+import org.apache.maven.project.MavenProject;
+import org.apache.maven.model.Dependency;
+
+/**
+ * Provides an implemenation of the <code>ArtifactContext</code> interface.
+ *
+ * @author Shane Isbell
+ */
+public final class ArtifactContextImpl
+    implements ArtifactContext, LogEnabled
+{
+
+    /**
+     * A layout component used in the creation of a .NET artifact repository.
+     */
+    private ArtifactRepositoryLayout layout;
+
+    /**
+     * Metadata component used by the <code>ArtifactResolver</code>.
+     */
+    private ArtifactMetadataSource metadata;
+
+    /**
+     * A factory component for creating artifacts
+     */
+    private ArtifactFactory artifactFactory;
+
+    /**
+     * An installer component for installing artifacts into a local Maven repository.
+     */
+    private org.apache.maven.dotnet.artifact.ArtifactInstaller artifactInstaller;
+
+    /**
+     * A registry component of repository (config) files
+     */
+    private RepositoryRegistry repositoryRegistry;
+
+    /**
+     * An artifact resolver component for locating artifacts and pulling them into the local repo if they do not
+     * already exist.
+     */
+    private ArtifactResolver artifactResolver;
+
+    /**
+     * The maven project
+     */
+    private MavenProject project;
+
+    /**
+     * Root path of the local Maven repository
+     */
+    private String localRepository;
+
+    /**
+     * A logger for writing log messages
+     */
+    private Logger logger;
+
+    /**
+     * Constructor. This method is intended to by invoked by the plexus-container, not by the application developer.
+     */
+    public ArtifactContextImpl()
+    {
+    }
+
+    /**
+     * @see LogEnabled#enableLogging(org.codehaus.plexus.logging.Logger)
+     */
+    public void enableLogging( Logger logger )
+    {
+        this.logger = logger;
+    }
+
+    /**
+     * @see ArtifactContext#getArtifactsFor(String, String, String, String)
+     */
+    public List<Artifact> getArtifactsFor( String groupId, String artifactId, String version, String type )
+    {
+        NetDependenciesRepository repository =
+            (NetDependenciesRepository) repositoryRegistry.find( "net-dependencies" );
+        if ( repository == null )
+        {
+            logger.warn(
+                "NMAVEN-000-009: Could not locate artifact (net dependencies repository not found): Group ID = " +
+                    groupId + ", Artifact ID = " + artifactId + ", Version = " + version + ", Type = " + type );
+            return new ArrayList<Artifact>();
+        }
+        repository.init( artifactFactory );
+        return repository.getArtifactsFor( groupId, artifactId, version, type );
+    }
+
+    /**
+     * @see org.apache.maven.dotnet.artifact.ArtifactContext#getArtifactInstaller()
+     */
+    public ArtifactInstaller getArtifactInstaller()
+    {
+        return artifactInstaller;
+    }
+
+    /**
+     * @see ArtifactContext#getApplicationConfigFor(org.apache.maven.artifact.Artifact)
+     */
+    public ApplicationConfig getApplicationConfigFor( Artifact artifact )
+    {
+        return ApplicationConfig.Factory.createDefaultApplicationConfig( artifact, project );
+    }
+
+    /**
+     * @see ArtifactContext#getDirectDependenciesFor(org.apache.maven.artifact.Artifact,
+     *      java.util.List<org.apache.maven.dotnet.artifact.ArtifactMatchPolicy>)
+     */
+    public List<Artifact> getDirectDependenciesFor( Artifact artifact, List<ArtifactMatchPolicy> matchPolicies )
+        throws ArtifactException
+    {
+        if ( project == null )
+        {
+            throw new ArtifactException( "NMAVEN-000-000: Artifact Context has not been initialized" );
+        }
+
+        if ( artifact == null )
+        {
+            throw new ArtifactException( "NMAVEN-000-001: Cannot get dependenct artifacts of a null artifact" );
+        }
+
+        if ( matchPolicies == null )
+        {
+            matchPolicies = new ArrayList<ArtifactMatchPolicy>();
+        }
+
+        List<Artifact> dependencies = new ArrayList<Artifact>();
+        ArtifactResolutionResult result;
+        ArtifactRepository ar = new DefaultArtifactRepository( "local", "file://" + localRepository, layout );
+
+        Set depSet = new HashSet();
+        List<Dependency> dep = project.getDependencies();
+        for ( Dependency dependency : dep )
+        {
+            String scope = ( dependency.getScope() == null ) ? Artifact.SCOPE_COMPILE : dependency.getScope();
+            Artifact art = artifactFactory.createDependencyArtifact( dependency.getGroupId(),
+                                                                     dependency.getArtifactId(),
+                                                                     VersionRange.createFromVersion(
+                                                                         dependency.getVersion() ),
+                                                                     dependency.getType(), dependency.getClassifier(),
+                                                                     scope, null );
+            depSet.add( art );
+        }
+
+        try
+        {
+            result = artifactResolver.resolveTransitively( depSet, project.getArtifact(),
+                                                           project.getRemoteArtifactRepositories(), ar, metadata );
+        }
+        catch ( ArtifactResolutionException e )
+        {
+            throw new ArtifactException( "NMAVEN-000-002: Failed to Resolve Artifact: File = " + artifact.getFile() +
+                ", Local Repository = " + localRepository, e );
+        }
+        catch ( ArtifactNotFoundException e )
+        {
+            throw new ArtifactException( "NMAVEN-000-003: Artifact Not Found: File = " + artifact.getFile() +
+                ", Local Repository = " + localRepository, e );
+        }
+        Set<ResolutionNode> nodes = result.getArtifactResolutionNodes();
+        if ( nodes.size() == 0 )
+        {
+            logger.debug(
+                "NMAVEN-000-004: Project has no direct or transitive dependencies. " + project.getArtifacts().size() );
+        }
+
+        for ( ResolutionNode node : nodes )
+        {
+            Artifact nodeArtifact = node.getArtifact();
+            boolean isMatched = matchArtifacts( nodeArtifact, matchPolicies );
+            logger.debug( "NMAVEN-000-005: Artifact = " + nodeArtifact.getFile().getAbsolutePath() + ", Depth = " +
+                node.getDepth() + ", Matches Policies = " + isMatched );
+            if ( isMatched && node.getDepth() == 1 )
+            {
+                dependencies.add( nodeArtifact );
+            }
+        }
+
+        logger.debug( "NMAVEN-000-006: Resolved Artifact Dependencies: Count = " + dependencies.size() );
+        return dependencies;
+    }
+
+    /**
+     * @see ArtifactContext#getNetModulesFor(org.apache.maven.artifact.Artifact)
+     */
+    public List<Artifact> getNetModulesFor( Artifact artifact )
+        throws ArtifactException
+    {
+        if ( artifact == null )
+        {
+            throw new ArtifactException( "NMAVEN-000-007: Cannot get .NET modules dependencies of a null artifact" );
+        }
+        List<ArtifactMatchPolicy> matchPolicies = new ArrayList<ArtifactMatchPolicy>();
+        matchPolicies.add( new NetModuleMatchPolicy() );
+        return getDirectDependenciesFor( artifact, matchPolicies );
+    }
+
+    /**
+     * @see ArtifactContext#init(org.apache.maven.project.MavenProject, java.io.File)
+     */
+    public void init( MavenProject mavenProject, File localRepository )
+    {
+        this.project = mavenProject;
+        this.localRepository = localRepository.getAbsolutePath();
+        artifactInstaller.init( this, mavenProject, localRepository );
+    }
+
+    /**
+     * Returns true if the artifact matches <i>all</i> match policies, otherwise returns false.
+     *
+     * @param artifact the artifact to match against the match policies
+     * @param matchPolicies the match policies
+     * @return true if the artifact matches <i>all</i> match policies, otherwise returns false
+     */
+    private boolean matchArtifacts( Artifact artifact, List<ArtifactMatchPolicy> matchPolicies )
+    {
+        for ( ArtifactMatchPolicy matchPolicy : matchPolicies )
+        {
+            if ( !matchPolicy.match( artifact ) )
+            {
+                return false;
+            }
+        }
+        return true;
+    }
+}

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

Added: incubator/nmaven/trunk/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/impl/ArtifactInstallerImpl.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/impl/ArtifactInstallerImpl.java?view=auto&rev=485313
==============================================================================
--- incubator/nmaven/trunk/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/impl/ArtifactInstallerImpl.java (added)
+++ incubator/nmaven/trunk/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/impl/ArtifactInstallerImpl.java Sun Dec 10 15:43:51 2006
@@ -0,0 +1,360 @@
+/*
+ * 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.artifact.impl;
+
+import org.apache.maven.dotnet.artifact.ArtifactException;
+import org.apache.maven.dotnet.artifact.ArtifactContext;
+import org.apache.maven.dotnet.artifact.AssemblyRepositoryLayout;
+import org.apache.maven.dotnet.artifact.ApplicationConfig;
+import org.apache.maven.project.MavenProject;
+import org.apache.maven.artifact.Artifact;
+import org.apache.maven.artifact.metadata.ArtifactMetadata;
+import org.apache.maven.artifact.factory.ArtifactFactory;
+import org.apache.maven.artifact.installer.ArtifactInstallationException;
+import org.apache.maven.artifact.repository.ArtifactRepository;
+import org.apache.maven.artifact.repository.DefaultArtifactRepository;
+import org.apache.maven.model.Model;
+import org.apache.maven.model.Dependency;
+import org.apache.maven.model.io.xpp3.MavenXpp3Writer;
+import org.apache.maven.model.io.xpp3.MavenXpp3Reader;
+import org.codehaus.plexus.util.FileUtils;
+import org.codehaus.plexus.util.IOUtil;
+import org.codehaus.plexus.util.xml.pull.XmlPullParserException;
+import org.codehaus.plexus.logging.LogEnabled;
+import org.codehaus.plexus.logging.Logger;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.FileWriter;
+import java.io.FileReader;
+import java.util.List;
+import java.util.ArrayList;
+
+/**
+ * Provides an implementation of the <code>ArtifactInstaller</code> interface.
+ *
+ * @author Shane Isbell
+ */
+public class ArtifactInstallerImpl
+    implements org.apache.maven.dotnet.artifact.ArtifactInstaller, LogEnabled
+{
+
+    /**
+     * A factory component used for creating artifacts from metadata
+     */
+    private ArtifactFactory mavenArtifactFactory;
+
+    /**
+     * An installer component for installing artifacts into a local Maven repository.
+     */
+    private org.apache.maven.artifact.installer.ArtifactInstaller mavenInstaller;
+
+    /**
+     * The maven project
+     */
+    private MavenProject project;
+
+    /**
+     * Root path of the local Maven repository
+     */
+    private File localRepository;
+
+    /**
+     * The artifact context that constructed this artifact installer. The context is used by the installer to get
+     * application configs and artifact dependencies that may need to be attached to the installed artifacts.
+     */
+    private ArtifactContext artifactContext;
+
+    /**
+     * An artifact repository that handles .NET artifacts
+     */
+    private ArtifactRepository artifactRepository;
+
+    /**
+     * The default repository layout for .NET artifacts. This is used in the construction of the artifact repository.
+     */
+    private AssemblyRepositoryLayout assemblyRepositoryLayout;
+
+    /**
+     * A logger for writing log messages
+     */
+    private Logger logger;
+
+    /**
+     * Constructor. This method is intended to by invoked by the plexus-container, not by the application developer.
+     */
+    public ArtifactInstallerImpl()
+    {
+    }
+
+    /**
+     * @see LogEnabled#enableLogging(org.codehaus.plexus.logging.Logger)
+     */
+    public void enableLogging( Logger logger )
+    {
+        this.logger = logger;
+    }
+
+    /**
+     * @see org.apache.maven.dotnet.artifact.ArtifactInstaller#installArtifact(org.apache.maven.artifact.Artifact, java.io.File)
+     */
+    public void installArtifact( Artifact artifact, File pomFile )
+        throws ArtifactInstallationException
+    {
+        installNetModules( artifact );
+        ApplicationConfig applicationConfig = artifactContext.getApplicationConfigFor( artifact );
+        File configExeFile = new File( applicationConfig.getConfigDestinationPath() );
+
+        if ( configExeFile.exists() )
+        {
+            logger.info( "NMAVEN-002-000: Found config executable: File = " + configExeFile.getAbsolutePath() );
+            Dependency dependency = new Dependency();
+            dependency.setArtifactId( project.getArtifactId() );
+            dependency.setGroupId( project.getGroupId() );
+            dependency.setVersion( project.getVersion() );
+            dependency.setType( "exe.config" );
+            dependency.setScope( Artifact.SCOPE_RUNTIME );
+            List<Dependency> dep = new ArrayList<Dependency>();
+            dep.add( dependency );
+            project.setDependencies( dep );
+            artifact.getMetadataList().clear();
+            try
+            {
+                artifact.addMetadata( createArtifactMetadataFor( artifact, pomFile, dep ) );
+            }
+            catch ( IOException e )
+            {
+                throw new ArtifactInstallationException( "NMAVEN-002-001: Unable to add metadata to artifact", e );
+            }
+            File targetDirectory =
+                new File( localRepository, assemblyRepositoryLayout.pathOf( artifact ) ).getParentFile();
+            try
+            {
+                FileUtils.copyFileToDirectory( configExeFile, targetDirectory );
+            }
+            catch ( IOException e )
+            {
+                throw new ArtifactInstallationException( "NMAVEN-002-002: Failed to copy config.exe file", e );
+            }
+        }
+        else
+        {
+            logger.debug( "NMAVEN-002-014: No exe.config file found: File = " + configExeFile.getAbsolutePath() );
+        }
+
+        try
+        {
+            if ( artifact.getFile() != null && artifact.getFile().exists() )//maybe just a test compile and no install
+            {
+                mavenInstaller.install( artifact.getFile(), artifact, artifactRepository );
+            }
+        }
+        catch ( ArtifactInstallationException e )
+        {
+            throw new ArtifactInstallationException( "NMAVEN-002-003: Failed to install artifact: ID = " +
+                artifact.getId() + ", File = " + artifact.getFile().getAbsolutePath(), e );
+        }
+    }
+
+    /**
+     * @see org.apache.maven.dotnet.artifact.ArtifactInstaller#installFile(String, String, String, String, java.io.File)
+     */
+    public void installFile( String groupId, String artifactId, String version, String packaging, File pomFile )
+        throws ArtifactInstallationException
+    {
+        Artifact artifact =
+            mavenArtifactFactory.createArtifactWithClassifier( groupId, artifactId, version, packaging, null );
+        artifact.setFile( pomFile );
+
+        FileWriter fileWriter = null;
+        try
+        {
+            File tempFile = File.createTempFile( "mvninstall", ".pom" );
+            tempFile.deleteOnExit();
+            fileWriter = new FileWriter( tempFile );
+
+            Model model = new Model();
+            model.setModelVersion( "4.0.0" );
+            model.setGroupId( groupId );
+            model.setArtifactId( artifactId );
+            model.setVersion( version );
+            model.setPackaging( packaging );
+            new MavenXpp3Writer().write( fileWriter, model );
+            artifact.addMetadata( new ArtifactMetadataImpl( artifact, tempFile ) );
+        }
+        catch ( IOException e )
+        {
+            throw new ArtifactInstallationException( "NMAVEN-002-004: Failed to create pom file: Group Id = " +
+                groupId + ", artifactId = " + artifactId + ", Version = " + version + ", packaging = " + packaging, e );
+        }
+        finally
+        {
+            IOUtil.close( fileWriter );
+        }
+
+        try
+        {
+            mavenInstaller.install( artifact.getFile(), artifact, artifactRepository );
+        }
+        catch ( ArtifactInstallationException e )
+        {
+            throw new ArtifactInstallationException( "NMAVEN-002-005: Failed to install artifact: ID = " +
+                artifact.getId() + ", File = " + artifact.getFile().getAbsolutePath(), e );
+        }
+
+    }
+
+    /**
+     * @see org.apache.maven.dotnet.artifact.ArtifactInstaller#installNetModulesToTargetDirectory(org.apache.maven.artifact.Artifact)
+     */
+    public void installNetModulesToTargetDirectory( Artifact projectArtifact )
+        throws ArtifactInstallationException
+    {
+        String targetDirectory = project.getBuild().getDirectory();
+        List<Artifact> dependencies;
+        try
+        {
+            dependencies = artifactContext.getNetModulesFor( projectArtifact );
+        }
+        catch ( ArtifactException e )
+        {
+            throw new ArtifactInstallationException( "NMAVEN-002-006: Unable to obtain .NET Modules: ", e );
+        }
+
+        if ( dependencies.isEmpty() )
+        {
+            logger.info( "NMAVEN-002-007: No dependencies to install into the target directory." );
+            return;
+        }
+
+        for ( Artifact artifact : dependencies )
+        {
+            logger.info( "NMAVEN-002-008: Copying .NET module dependency into project's target directory: Module = " +
+                targetDirectory + File.separator + artifact.getFile().getName() );
+            try
+            {
+                FileUtils.copyFileToDirectory( artifact.getFile(), new File( targetDirectory ) );
+            }
+            catch ( IOException e )
+            {
+                throw new ArtifactInstallationException(
+                    "NMAVEN-002-009: Failed to copy artifacts to target directory: " + "Target Directory = " +
+                        targetDirectory, e );
+            }
+        }
+    }
+
+    /**
+     * @see org.apache.maven.dotnet.artifact.ArtifactInstaller#init(org.apache.maven.dotnet.artifact.ArtifactContext,
+     *      org.apache.maven.project.MavenProject, java.io.File)
+     */
+    public void init( ArtifactContext artifactContext, MavenProject mavenProject, File localRepository )
+    {
+        this.project = mavenProject;
+        this.localRepository = localRepository;
+        this.artifactContext = artifactContext;
+        this.assemblyRepositoryLayout = new AssemblyRepositoryLayout();
+        artifactRepository = new DefaultArtifactRepository( "local", "file://" + localRepository.getAbsolutePath(),
+                                                            assemblyRepositoryLayout );
+    }
+
+    /**
+     * Installs .netmodule artifacts into the local maven repository
+     *
+     * @param projectArtifact the artifact to install
+     * @throws ArtifactInstallationException if there is a problem installing the artifact
+     */
+    private void installNetModules( Artifact projectArtifact )
+        throws ArtifactInstallationException
+    {
+        StringBuffer path = new StringBuffer();
+        path.append( localRepository.getAbsolutePath() ).append( File.separator );
+        for ( String id : projectArtifact.getGroupId().split( "[.]" ) )
+        {
+            path.append( id ).append( File.separator );
+        }
+
+        path.append( projectArtifact.getArtifactId() ).append( File.separator )
+            .append( projectArtifact.getBaseVersion() ).append( File.separator );
+        List<Artifact> artifacts;
+        try
+        {
+            artifacts = artifactContext.getNetModulesFor( project.getArtifact() );
+        }
+        catch ( ArtifactException e )
+        {
+            throw new ArtifactInstallationException( "NMAVEN-002-010: Unable to obtain .NET Modules: ", e );
+        }
+
+        for ( Artifact artifact : artifacts )
+        {
+            logger.info( "NMAVEN-002-011: Installing .NET Module Dependency: From = " +
+                artifact.getFile().getAbsolutePath() + ", To = " + path.toString() + artifact.getArtifactId() +
+                ".netmodule" );
+            try
+            {
+                FileUtils.copyFileToDirectory( artifact.getFile(), new File( path.toString() ) );
+            }
+            catch ( IOException e )
+            {
+                throw new ArtifactInstallationException( "NMAVEN-002-012: Failed to copy artifacts to local repository",
+                                                         e );
+            }
+        }
+    }
+
+    /**
+     * Creates the artifact metadata file for the specified artifact.
+     *
+     * @param artifact     the artifact associated with the artifact metadata
+     * @param pomFile      the pom file of the specified artifact
+     * @param dependencies the dependencies of the specified artifact
+     * @return the artifact metadata file for the specified artifact.
+     * @throws IOException if there is a problem reading the pom file
+     */
+    private ArtifactMetadata createArtifactMetadataFor( Artifact artifact, File pomFile, List<Dependency> dependencies )
+        throws IOException
+    {
+        FileReader fileReader = new FileReader( pomFile );
+        MavenXpp3Reader reader = new MavenXpp3Reader();
+        Model model;
+        try
+        {
+            model = reader.read( fileReader );
+        }
+        catch ( XmlPullParserException e )
+        {
+            e.printStackTrace();
+            throw new IOException( "NMAVEN-002-013: Unable to read pom file" );
+        }
+
+        for ( Dependency dependency : dependencies )
+        {
+            model.addDependency( dependency );
+        }
+
+        File tempFile = File.createTempFile( "mvninstall", ".pom" );
+        tempFile.deleteOnExit();
+        FileWriter fileWriter = new FileWriter( tempFile );
+        new MavenXpp3Writer().write( fileWriter, model );
+        IOUtil.close( fileWriter );
+        return new ArtifactMetadataImpl( artifact, tempFile );
+
+    }
+}

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

Added: incubator/nmaven/trunk/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/impl/ArtifactMetadataImpl.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/impl/ArtifactMetadataImpl.java?view=auto&rev=485313
==============================================================================
--- incubator/nmaven/trunk/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/impl/ArtifactMetadataImpl.java (added)
+++ incubator/nmaven/trunk/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/impl/ArtifactMetadataImpl.java Sun Dec 10 15:43:51 2006
@@ -0,0 +1,84 @@
+/*
+ * 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.artifact.impl;
+
+import org.apache.maven.artifact.Artifact;
+import org.apache.maven.artifact.repository.ArtifactRepository;
+import org.apache.maven.project.artifact.ProjectArtifactMetadata;
+
+import java.io.File;
+
+/**
+ * Provides a specialization of <code>ProjectArtifactMetadata</code> for handling of .NET artifacts. Specifically, the
+ * this implementation does not use version info within the pom file name.
+ *
+ * @author Shane Isbell
+ */
+public final class ArtifactMetadataImpl
+    extends ProjectArtifactMetadata
+{
+
+    /**
+     * Constructor. This method is intended to by invoked by the plexus-container, not by the application developer.
+     *
+     * @param artifact the artifact associated with the artifact metadata
+     */
+    public ArtifactMetadataImpl( Artifact artifact )
+    {
+        this( artifact, null );
+    }
+
+    /**
+     *  Constructor. This method is intended to by invoked by the plexus-container, not by the application developer.
+     *
+     * @param artifact  the artifact associated with the artifact metadata
+     * @param file      the pom file of the artifact
+     */
+    public ArtifactMetadataImpl( Artifact artifact, File file )
+    {
+        super( artifact, file );
+    }
+
+    /**
+     * Returns the file name of the pom located on a remote repository. Unlike its parent class method, the pom
+     * file name does not include version info.
+     *
+     * @return  the file name of the pom located on a remote repository
+     * @see org.apache.maven.project.artifact.ProjectArtifactMetadata#getRemoteFilename()
+     */
+    public String getRemoteFilename()
+    {
+        return getArtifactId() + ".pom";
+    }
+
+    /**
+     * Returns the file name of the pom located on a local repository.  Unlike its parent class method, the pom
+     * file name does not include version info.
+     *
+     * @param repository the local artifact repository. This parameter is not used and can be null.
+     * @return the file name of the pom located on a local repository
+     * @see ProjectArtifactMetadata#getLocalFilename(org.apache.maven.artifact.repository.ArtifactRepository)
+     */
+    public String getLocalFilename( ArtifactRepository repository )
+    {
+        return getArtifactId() + ".pom";
+    }
+
+
+}

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

Added: incubator/nmaven/trunk/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/impl/AssemblyResolverImpl.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/impl/AssemblyResolverImpl.java?view=auto&rev=485313
==============================================================================
--- incubator/nmaven/trunk/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/impl/AssemblyResolverImpl.java (added)
+++ incubator/nmaven/trunk/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/impl/AssemblyResolverImpl.java Sun Dec 10 15:43:51 2006
@@ -0,0 +1,141 @@
+/*
+ * 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.artifact.impl;
+
+import org.apache.maven.dotnet.artifact.AssemblyResolver;
+import org.apache.maven.dotnet.artifact.AssemblyRepositoryLayout;
+import org.apache.maven.project.MavenProject;
+import org.apache.maven.artifact.Artifact;
+import org.apache.maven.artifact.factory.ArtifactFactory;
+import org.apache.maven.artifact.metadata.ArtifactMetadataSource;
+import org.apache.maven.artifact.resolver.ArtifactResolutionResult;
+import org.apache.maven.artifact.resolver.ArtifactResolutionException;
+import org.apache.maven.artifact.resolver.ArtifactNotFoundException;
+import org.apache.maven.artifact.resolver.ArtifactResolver;
+import org.apache.maven.artifact.repository.ArtifactRepository;
+import org.apache.maven.artifact.repository.DefaultArtifactRepository;
+import org.apache.maven.artifact.repository.ArtifactRepositoryFactory;
+import org.apache.maven.artifact.versioning.VersionRange;
+import org.apache.maven.model.Dependency;
+import org.codehaus.plexus.logging.LogEnabled;
+import org.codehaus.plexus.logging.Logger;
+
+import java.util.Set;
+import java.util.HashSet;
+import java.util.List;
+import java.util.ArrayList;
+import java.io.File;
+
+/**
+ * Provides a way to resolve transitive assemblies that do not have versions within their file name.
+ *
+ * @author Shane Isbell
+ */
+public class AssemblyResolverImpl
+    implements AssemblyResolver, LogEnabled
+{
+    /**
+     * An artifact resolver component for locating artifacts and pulling them into the local repo if they do not
+     * already exist.
+     */
+    private ArtifactResolver resolver;
+
+    /**
+     * Metadata component used by the <code>ArtifactResolver</code>.
+     */
+    private ArtifactMetadataSource metadata;
+
+    /**
+     * The artifact factory component, which is used for creating artifacts.
+     */
+    private ArtifactFactory artifactFactory;
+
+    /**
+     * An artifact repository factory used to create repositories for use by the <code>ArtifactResolver</code>.
+     */
+    private ArtifactRepositoryFactory artifactRepositoryFactory;
+
+    /**
+     * A logger for writing log messages
+     */
+    private Logger logger;
+
+    /**
+     * Constructor. This method is intended to by invoked by the plexus-container, not by the application developer.
+     */
+    public AssemblyResolverImpl()
+    {
+    }
+
+    /**
+     * @see LogEnabled#enableLogging(org.codehaus.plexus.logging.Logger)
+     */
+    public void enableLogging( Logger logger )
+    {
+        this.logger = logger;
+    }
+
+    /**
+     * @see AssemblyResolver#resolveTransitivelyFor
+     */
+    public void resolveTransitivelyFor( MavenProject project, Artifact sourceArtifact, List<Dependency> dependencies,
+                                        File pomFile, String localRepositoryPath,
+                                        boolean addResolvedDependenciesToProject )
+        throws ArtifactResolutionException, ArtifactNotFoundException
+    {
+        ArtifactMetadataImpl meta = new ArtifactMetadataImpl( sourceArtifact, pomFile );
+        sourceArtifact.addMetadata( meta );
+
+        Set<Artifact> artifactDependencies = new HashSet<Artifact>();
+        for ( Dependency dependency : dependencies )
+        {
+            String scope = ( dependency.getScope() == null ) ? Artifact.SCOPE_COMPILE : dependency.getScope();
+            Artifact artifact = artifactFactory.createDependencyArtifact( dependency.getGroupId(),
+                                                                          dependency.getArtifactId(),
+                                                                          VersionRange.createFromVersion(
+                                                                              dependency.getVersion() ),
+                                                                          dependency.getType(),
+                                                                          dependency.getClassifier(), scope, null );
+            artifactDependencies.add( artifact );
+        }
+
+        ArtifactRepository localArtifactRepository =
+            new DefaultArtifactRepository( "local", "file://" + localRepositoryPath, new AssemblyRepositoryLayout() );
+
+        List<ArtifactRepository> newArtifactRepositories = new ArrayList<ArtifactRepository>();
+        List<ArtifactRepository> artifactRepositories = project.getRemoteArtifactRepositories();
+        for ( ArtifactRepository artifactRepository : artifactRepositories )
+        {
+            ArtifactRepository repo = artifactRepositoryFactory.createArtifactRepository( artifactRepository.getId(),
+                                                                                          artifactRepository.getUrl(),
+                                                                                          new AssemblyRepositoryLayout(),
+                                                                                          artifactRepository.getSnapshots(),
+                                                                                          artifactRepository.getReleases() );
+            newArtifactRepositories.add( repo );
+        }
+        ArtifactResolutionResult result = resolver.resolveTransitively( artifactDependencies, sourceArtifact,
+                                                                        newArtifactRepositories,
+                                                                        localArtifactRepository, metadata );
+        if ( addResolvedDependenciesToProject )
+        {
+            project.setDependencyArtifacts( result.getArtifacts() );
+        }
+
+    }
+}

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

Added: incubator/nmaven/trunk/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/impl/NetDependenciesRepository.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/impl/NetDependenciesRepository.java?view=auto&rev=485313
==============================================================================
--- incubator/nmaven/trunk/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/impl/NetDependenciesRepository.java (added)
+++ incubator/nmaven/trunk/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/impl/NetDependenciesRepository.java Sun Dec 10 15:43:51 2006
@@ -0,0 +1,186 @@
+/*
+ * 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.artifact.impl;
+
+import org.apache.maven.dotnet.registry.Repository;
+import org.apache.maven.dotnet.registry.RepositoryRegistry;
+import org.apache.maven.dotnet.model.netdependency.NetDependency;
+import org.apache.maven.dotnet.model.netdependency.NetDependencyModel;
+import org.apache.maven.dotnet.model.netdependency.io.xpp3.NetDependencyXpp3Reader;
+import org.codehaus.plexus.util.xml.pull.XmlPullParserException;
+import org.apache.maven.model.Dependency;
+import org.apache.maven.artifact.Artifact;
+import org.apache.maven.artifact.versioning.VersionRange;
+import org.apache.maven.artifact.factory.ArtifactFactory;
+
+import java.util.List;
+import java.util.Hashtable;
+import java.util.ArrayList;
+import java.io.InputStream;
+import java.io.IOException;
+import java.io.Reader;
+import java.io.InputStreamReader;
+
+
+/**
+ * Provides methods for loading and reading the net dependency config file.
+ *
+ * @author Shane Isbell
+ */
+public class NetDependenciesRepository
+    implements Repository
+{
+
+    /**
+     * List of net dependencies. These dependencies are intended to be executed directly from the local Maven repository,
+     * not to be compiled against.
+     */
+    private List<NetDependency> netDependencies;
+
+    /**
+     * The artifact factory, used for creating artifacts.
+     */
+    private ArtifactFactory artifactFactory;
+
+    /**
+     * Constructor. This method is intended to be invoked by the <code>RepositoryRegistry<code>, not by the
+     * application developer.
+     */
+    public NetDependenciesRepository()
+    {
+    }
+
+    /**
+     * @see Repository#load(java.io.InputStream, java.util.Hashtable)
+     */
+    public void load( InputStream inputStream, Hashtable properties )
+        throws IOException
+    {
+        NetDependencyXpp3Reader xpp3Reader = new NetDependencyXpp3Reader();
+        Reader reader = new InputStreamReader( inputStream );
+        NetDependencyModel model;
+        try
+        {
+            model = xpp3Reader.read( reader );
+        }
+        catch ( XmlPullParserException e )
+        {
+            e.printStackTrace();
+            throw new IOException( "NMAVEN-062-000: Could not read plugins-compiler.xml" );
+        }
+        netDependencies = model.getNetDependencies();
+    }
+
+
+    /**
+     * @see Repository#setRepositoryRegistry(org.apache.maven.dotnet.registry.RepositoryRegistry)
+     */
+    public void setRepositoryRegistry( RepositoryRegistry repositoryRegistry )
+    {
+    }
+
+    /**
+     * Returns a list of .NET dependencies as given within the net dependencies config file. This dependency list
+     * is external to the pom file dependencies. This separation is necessary since some Java Maven plugins
+     * - which themselves are necessary for building .NET applications - may have  .NET executable dependencies that
+     * have not been built yet and can't be resolved.
+     *
+     * @return a list of .NET dependencies as given within the net dependencies config file
+     */
+    public List<Dependency> getDependencies()
+    {
+        List<Dependency> dependencies = new ArrayList<Dependency>();
+        for ( NetDependency netDependency : netDependencies )
+        {
+            dependencies.add( netDependencyToDependency( netDependency ) );
+        }
+        return dependencies;
+    }
+
+    /**
+     * Intializes this repository.
+     *
+     * @param artifactFactory the artifact factory
+     */
+    void init( ArtifactFactory artifactFactory )
+    {
+        this.artifactFactory = artifactFactory;
+    }
+
+    /**
+     * Returns a list of artifacts that match the specified parameters. If the version or type parameters are null,
+     * then the returned list will include all versions and types.
+     *
+     * @param groupId       the group ID of the artifact to match. This value should not be null.
+     * @param artifactId    the artifact ID of the artifact to match. This value should not be null.
+     * @param version       the version if the artifact to match.
+     * @param type          the type of artifact to match
+     * @return a list of artifacts that match the specified parameters
+     */
+    List<Artifact> getArtifactsFor( String groupId, String artifactId, String version, String type )
+    {
+        List<Artifact> artifacts = new ArrayList<Artifact>();
+        for ( NetDependency netDependency : netDependencies )
+        {
+            if ( netDependency.getGroupId().equals( groupId ) && netDependency.getArtifactId().equals( artifactId ) &&
+                ( version == null || netDependency.getVersionId().equals( version ) ) &&
+                ( type == null || netDependency.getType().equals( type ) ) )
+            {
+                artifacts.add( netDependencyToArtifact( netDependency ) );
+            }
+
+        }
+        return artifacts;
+    }
+
+    /**
+     * Copies the information from a <code>NetDependency</code> object to a <code>Dependency</code> object. This method
+     * is for converting from an NMaven specific model to a Maven model that can be used within the general Maven
+     * framework. Note that all artifacts automatically have a runtime scope since <code>NetDependencies</code> are
+     * always executables that are intended to be executed directly from the local Maven repository.
+     *
+     * @param netDependency the net dependency, which is the source to copy information from.
+     * @return dependency
+     */
+    private Dependency netDependencyToDependency( NetDependency netDependency )
+    {
+        Dependency dependency = new Dependency();
+        dependency.setArtifactId( netDependency.getArtifactId() );
+        dependency.setGroupId( netDependency.getGroupId() );
+        dependency.setType( netDependency.getType() );
+        dependency.setScope( Artifact.SCOPE_RUNTIME );
+        dependency.setVersion( netDependency.getVersionId() );
+        return dependency;
+    }
+
+    /**
+     * Creates an artifact based on the information from a <code>NetDepencency</code> object. Note that all artifacts
+     * automatically have a runtime scope since <code>NetDependencies</code> are always executables that
+     * are intended to be executed directly from the local Maven repository.
+     *
+     * @param dependency the net dependency, which is the source to copy information from.
+     * @return artifact
+     */
+    private Artifact netDependencyToArtifact( NetDependency dependency )
+    {
+        return artifactFactory.createDependencyArtifact( dependency.getGroupId(), dependency.getArtifactId(),
+                                                         VersionRange.createFromVersion( dependency.getVersionId() ),
+                                                         dependency.getType(), null, Artifact.SCOPE_RUNTIME, null );
+    }
+}

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

Added: incubator/nmaven/trunk/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/impl/NetModuleMatchPolicy.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/impl/NetModuleMatchPolicy.java?view=auto&rev=485313
==============================================================================
--- incubator/nmaven/trunk/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/impl/NetModuleMatchPolicy.java (added)
+++ incubator/nmaven/trunk/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/impl/NetModuleMatchPolicy.java Sun Dec 10 15:43:51 2006
@@ -0,0 +1,43 @@
+/*
+ * 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.artifact.impl;
+
+import org.apache.maven.dotnet.artifact.ArtifactMatchPolicy;
+import org.apache.maven.artifact.Artifact;
+
+/**
+ * Matches .NET module artifacts.
+ *
+ * @author Shane Isbell
+ */
+public class NetModuleMatchPolicy
+    implements ArtifactMatchPolicy
+{
+
+    /**
+     * Matches artifacts of type module
+     *
+     * @param artifact the artifact to match
+     * @return true if artifact is of type module, otherwise returns false.
+     */
+    public boolean match( Artifact artifact )
+    {
+        return artifact.getType().equals( "module" );
+    }
+}

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

Added: incubator/nmaven/trunk/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/impl/package.html
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/impl/package.html?view=auto&rev=485313
==============================================================================
--- incubator/nmaven/trunk/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/impl/package.html (added)
+++ incubator/nmaven/trunk/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/impl/package.html Sun Dec 10 15:43:51 2006
@@ -0,0 +1,27 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+<html>
+<head>
+<!--
+
+  @(#)package.html
+
+   Copyright 2006 Shane Isbell
+
+   Licensed 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.
+
+-->
+</head>
+<body bgcolor="white">
+    Provides the implementation classes of the <i>org.apache.maven.artifact</i> package.
+</body>
+</html>
\ No newline at end of file

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

Added: incubator/nmaven/trunk/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/package.html
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/package.html?view=auto&rev=485313
==============================================================================
--- incubator/nmaven/trunk/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/package.html (added)
+++ incubator/nmaven/trunk/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/package.html Sun Dec 10 15:43:51 2006
@@ -0,0 +1,29 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+<html>
+<head>
+<!--
+
+  @(#)package.html
+
+   Copyright 2006 Shane Isbell
+
+   Licensed 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.
+
+-->
+</head>
+<body bgcolor="white">
+    Provides interfaces and classes for resolving and installing artifacts. The core interface of this package is
+    <code>ArtifactContext</code>, which provides the methods for handling artifacts and for providing a properly constructed
+installer.
+</body>
+</html>
\ No newline at end of file

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

Added: incubator/nmaven/trunk/components/dotnet-artifact/src/main/resources/META-INF/nmaven/artifact-registry.xml
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/components/dotnet-artifact/src/main/resources/META-INF/nmaven/artifact-registry.xml?view=auto&rev=485313
==============================================================================
--- incubator/nmaven/trunk/components/dotnet-artifact/src/main/resources/META-INF/nmaven/artifact-registry.xml (added)
+++ incubator/nmaven/trunk/components/dotnet-artifact/src/main/resources/META-INF/nmaven/artifact-registry.xml Sun Dec 10 15:43:51 2006
@@ -0,0 +1,11 @@
+<?xml version="1.0"?>
+
+<registry-config>
+   <repositories>
+      <repository>
+         <repository-name>net-dependencies</repository-name>
+         <repository-class>org.apache.maven.dotnet.artifact.impl.NetDependenciesRepository</repository-class>
+         <repository-config>/META-INF/nmaven/net-dependencies.xml</repository-config>
+      </repository>
+    </repositories>
+</registry-config>
\ No newline at end of file

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

Added: incubator/nmaven/trunk/components/dotnet-artifact/src/main/resources/META-INF/plexus/components.xml
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/components/dotnet-artifact/src/main/resources/META-INF/plexus/components.xml?view=auto&rev=485313
==============================================================================
--- incubator/nmaven/trunk/components/dotnet-artifact/src/main/resources/META-INF/plexus/components.xml (added)
+++ incubator/nmaven/trunk/components/dotnet-artifact/src/main/resources/META-INF/plexus/components.xml Sun Dec 10 15:43:51 2006
@@ -0,0 +1,64 @@
+<component-set>
+    <components>
+        <component>
+            <role>org.apache.maven.dotnet.artifact.ArtifactContext</role>
+            <implementation>org.apache.maven.dotnet.artifact.impl.ArtifactContextImpl</implementation>
+            <requirements>
+                <requirement>
+                    <role>org.apache.maven.artifact.resolver.ArtifactResolver</role>
+                </requirement>
+                <requirement>
+                    <role>org.apache.maven.artifact.metadata.ArtifactMetadataSource</role>
+                </requirement>
+                <requirement>
+                    <role>org.apache.maven.artifact.factory.ArtifactFactory</role>
+                </requirement>
+                <requirement>
+                    <role>org.apache.maven.dotnet.artifact.ArtifactInstaller</role>
+                </requirement>
+                <requirement>
+                    <role>org.apache.maven.dotnet.registry.RepositoryRegistry</role>
+                </requirement>
+                <requirement>
+                    <role>org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout</role>
+                    <role-hint>net</role-hint>
+                </requirement>
+            </requirements>
+        </component>
+        <component>
+            <role>org.apache.maven.dotnet.artifact.ArtifactInstaller</role>
+            <implementation>org.apache.maven.dotnet.artifact.impl.ArtifactInstallerImpl</implementation>
+            <requirements>
+                <requirement>
+                    <role>org.apache.maven.artifact.factory.ArtifactFactory</role>
+                </requirement>
+                <requirement>
+                    <role>org.apache.maven.artifact.installer.ArtifactInstaller</role>
+                </requirement>
+            </requirements>
+        </component>
+        <component>
+            <role>org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout</role>
+            <implementation>org.apache.maven.dotnet.artifact.AssemblyRepositoryLayout</implementation>
+            <role-hint>net</role-hint>
+        </component>
+        <component>
+            <role>org.apache.maven.dotnet.artifact.AssemblyResolver</role>
+            <implementation>org.apache.maven.dotnet.artifact.impl.AssemblyResolverImpl</implementation>
+            <requirements>
+                <requirement>
+                    <role>org.apache.maven.artifact.resolver.ArtifactResolver</role>
+                </requirement>
+                <requirement>
+                    <role>org.apache.maven.artifact.factory.ArtifactFactory</role>
+                </requirement>
+                <requirement>
+                    <role>org.apache.maven.artifact.metadata.ArtifactMetadataSource</role>
+                </requirement>
+                <requirement>
+                    <role>org.apache.maven.artifact.repository.ArtifactRepositoryFactory</role>
+                </requirement>
+            </requirements>
+        </component>
+    </components>
+</component-set>

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

Added: incubator/nmaven/trunk/components/dotnet-assembler/LICENSE.txt
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/components/dotnet-assembler/LICENSE.txt?view=auto&rev=485313
==============================================================================
--- incubator/nmaven/trunk/components/dotnet-assembler/LICENSE.txt (added)
+++ incubator/nmaven/trunk/components/dotnet-assembler/LICENSE.txt Sun Dec 10 15:43:51 2006
@@ -0,0 +1,176 @@
+                               Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS

Propchange: incubator/nmaven/trunk/components/dotnet-assembler/LICENSE.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/nmaven/trunk/components/dotnet-assembler/pom.xml
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/components/dotnet-assembler/pom.xml?view=auto&rev=485313
==============================================================================
--- incubator/nmaven/trunk/components/dotnet-assembler/pom.xml (added)
+++ incubator/nmaven/trunk/components/dotnet-assembler/pom.xml Sun Dec 10 15:43:51 2006
@@ -0,0 +1,57 @@
+<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-assembler</artifactId>
+    <version>0.14-SNAPSHOT</version>
+    <name>dotnet-assembler</name>
+    <description>
+        NMaven
+    </description>
+
+    <dependencies>
+        
+        <dependency>
+            <groupId>org.apache.maven</groupId>
+            <artifactId>maven-plugin-api</artifactId>
+            <version>2.0.4</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.maven</groupId>
+            <artifactId>maven-project</artifactId>
+            <version>2.0.4</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.maven.dotnet</groupId>
+            <artifactId>dotnet-model-assembly-plugins</artifactId>
+            <version>0.14-SNAPSHOT</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.maven.dotnet</groupId>
+            <artifactId>dotnet-artifact</artifactId>
+            <version>0.14-SNAPSHOT</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.maven.dotnet</groupId>
+            <artifactId>dotnet-core</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-assembler/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/nmaven/trunk/components/dotnet-assembler/src/main/java/org/apache/maven/dotnet/assembler/AssemblerContext.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/components/dotnet-assembler/src/main/java/org/apache/maven/dotnet/assembler/AssemblerContext.java?view=auto&rev=485313
==============================================================================
--- incubator/nmaven/trunk/components/dotnet-assembler/src/main/java/org/apache/maven/dotnet/assembler/AssemblerContext.java (added)
+++ incubator/nmaven/trunk/components/dotnet-assembler/src/main/java/org/apache/maven/dotnet/assembler/AssemblerContext.java Sun Dec 10 15:43:51 2006
@@ -0,0 +1,63 @@
+/*
+ * 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.assembler;
+
+import org.apache.maven.dotnet.InitializationException;
+import org.apache.maven.project.MavenProject;
+
+/**
+ * Provides services for generating of AssemblyInfo.* file.
+ *
+ * @author Shane Isbell
+ */
+public interface AssemblerContext
+{
+
+    /**
+     * Role used to register component implementations with the container.
+     */
+    String ROLE = AssemblerContext.class.getName();
+
+    /**
+     * Returns the assembly info associated with this context.
+     *
+     * @return the assembly info associated with this context.
+     */
+    AssemblyInfo getAssemblyInfo();
+
+    /**
+     * Returns the marshaller for the given language
+     *
+     * @param language the .NET language
+     * @return the marshaller for the specified language
+     * @throws AssemblyInfoException if no marshaller can be found for the specified language
+     */
+    AssemblyInfoMarshaller getAssemblyInfoMarshallerFor( String language )
+        throws AssemblyInfoException;
+
+    /**
+     * Initializes the context
+     *
+     * @param mavenProject the maven project
+     * @throws InitializationException if the context cannot be initialized
+     */
+    void init( MavenProject mavenProject )
+        throws InitializationException;
+
+}

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



Mime
View raw message