incubator-nmaven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sisb...@apache.org
Subject svn commit: r559955 [1/2] - in /incubator/nmaven/trunk: ./ components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/ components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/impl/ components/dotnet-core/src/main/java/o...
Date Thu, 26 Jul 2007 19:46:47 GMT
Author: sisbell
Date: Thu Jul 26 12:46:41 2007
New Revision: 559955

URL: http://svn.apache.org/viewvc?view=rev&rev=559955
Log:
Added support for converting repositories from NMaven format to the default repository format.

Added:
    incubator/nmaven/trunk/components/dotnet-core/src/main/java/org/apache/maven/dotnet/ArtifactType.java   (with props)
    incubator/nmaven/trunk/components/dotnet-dao/project/src/main/java/org/apache/maven/dotnet/dao/Project.java   (with props)
    incubator/nmaven/trunk/components/dotnet-dao/project/src/main/java/org/apache/maven/dotnet/dao/ProjectDependency.java   (with props)
    incubator/nmaven/trunk/components/dotnet-dao/project/src/main/java/org/apache/maven/dotnet/dao/ProjectFactory.java   (with props)
    incubator/nmaven/trunk/components/dotnet-dao/project/src/main/java/org/apache/maven/dotnet/dao/Requirement.java   (with props)
    incubator/nmaven/trunk/components/dotnet-dao/project/src/test/resources/NMaven-NMaven.Test5-1.0.0.xml   (with props)
    incubator/nmaven/trunk/components/dotnet-dao/project/src/test/resources/NMaven-NMaven.Test6-1.0.0.xml   (with props)
    incubator/nmaven/trunk/components/dotnet-repository/src/main/java/org/apache/maven/dotnet/repository/RepositoryConverter.java   (with props)
    incubator/nmaven/trunk/components/dotnet-repository/src/main/java/org/apache/maven/dotnet/repository/impl/
    incubator/nmaven/trunk/components/dotnet-repository/src/main/java/org/apache/maven/dotnet/repository/impl/RepositoryConverterImpl.java   (with props)
    incubator/nmaven/trunk/components/dotnet-repository/src/main/resources/
    incubator/nmaven/trunk/components/dotnet-repository/src/main/resources/META-INF/
    incubator/nmaven/trunk/components/dotnet-repository/src/main/resources/META-INF/plexus/
    incubator/nmaven/trunk/components/dotnet-repository/src/main/resources/META-INF/plexus/components.xml   (with props)
    incubator/nmaven/trunk/components/dotnet-repository/src/test/java/org/apache/maven/dotnet/repository/impl/
    incubator/nmaven/trunk/components/dotnet-repository/src/test/java/org/apache/maven/dotnet/repository/impl/ArtifactFactoryTestStub.java   (with props)
    incubator/nmaven/trunk/components/dotnet-repository/src/test/java/org/apache/maven/dotnet/repository/impl/DataAccessObjectRegistryStub.java   (with props)
    incubator/nmaven/trunk/components/dotnet-repository/src/test/java/org/apache/maven/dotnet/repository/impl/RepositoryConverterImplTest.java   (with props)
    incubator/nmaven/trunk/components/dotnet-repository/src/test/java/org/apache/maven/dotnet/repository/impl/WagonManagerTestStub.java   (with props)
    incubator/nmaven/trunk/components/dotnet-repository/src/test/resources/
    incubator/nmaven/trunk/components/dotnet-repository/src/test/resources/NMaven-NMaven.Test-1.0.xml   (with props)
    incubator/nmaven/trunk/components/dotnet-repository/src/test/resources/uac/
    incubator/nmaven/trunk/components/dotnet-repository/src/test/resources/uac/gac_msil/
    incubator/nmaven/trunk/components/dotnet-repository/src/test/resources/uac/gac_msil/NMaven.Model.Pom/
    incubator/nmaven/trunk/components/dotnet-repository/src/test/resources/uac/gac_msil/NMaven.Model.Pom/1.0__NMaven.Model/
    incubator/nmaven/trunk/components/dotnet-repository/src/test/resources/uac/gac_msil/NMaven.Model.Pom/1.0__NMaven.Model/NMaven.Model.Pom.dll   (with props)
    incubator/nmaven/trunk/components/dotnet-repository/src/test/resources/uac/gac_msil/NMaven.Test/
    incubator/nmaven/trunk/components/dotnet-repository/src/test/resources/uac/gac_msil/NMaven.Test/1.0__NMaven/
    incubator/nmaven/trunk/components/dotnet-repository/src/test/resources/uac/gac_msil/NMaven.Test/1.0__NMaven/NMaven.Test.dll   (with props)
    incubator/nmaven/trunk/plugins/maven-repository-plugin/src/main/java/org/apache/maven/dotnet/plugin/repository/RepositoryRdfExporterMojo.java   (with props)
Removed:
    incubator/nmaven/trunk/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/ArtifactType.java
    incubator/nmaven/trunk/components/dotnet-dao/project/src/main/java/org/apache/maven/dotnet/dao/impl/ProjectFactory.java
    incubator/nmaven/trunk/components/dotnet-repository/src/main/java/org/apache/maven/dotnet/repository/Project.java
    incubator/nmaven/trunk/components/dotnet-repository/src/main/java/org/apache/maven/dotnet/repository/ProjectDependency.java
    incubator/nmaven/trunk/components/dotnet-repository/src/main/java/org/apache/maven/dotnet/repository/Requirement.java
    incubator/nmaven/trunk/components/dotnet-repository/src/test/java/org/apache/maven/dotnet/repository/JdoTest.java
Modified:
    incubator/nmaven/trunk/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/ArtifactContext.java
    incubator/nmaven/trunk/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/PathUtil.java
    incubator/nmaven/trunk/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/impl/ArtifactInstallerImpl.java
    incubator/nmaven/trunk/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/impl/AssemblyResolverImpl.java
    incubator/nmaven/trunk/components/dotnet-dao/project/pom.xml
    incubator/nmaven/trunk/components/dotnet-dao/project/src/main/java/org/apache/maven/dotnet/dao/ProjectDao.java
    incubator/nmaven/trunk/components/dotnet-dao/project/src/main/java/org/apache/maven/dotnet/dao/impl/ProjectDaoImpl.java
    incubator/nmaven/trunk/components/dotnet-dao/project/src/test/java/org/apache/maven/dotnet/dao/impl/ProjectDaoImplTest.java
    incubator/nmaven/trunk/components/dotnet-executable/src/main/java/org/apache/maven/dotnet/executable/ExecutableConfig.java
    incubator/nmaven/trunk/components/dotnet-executable/src/main/java/org/apache/maven/dotnet/executable/compiler/CompilerConfig.java
    incubator/nmaven/trunk/components/dotnet-executable/src/main/java/org/apache/maven/dotnet/executable/impl/CompilerContextImpl.java
    incubator/nmaven/trunk/components/dotnet-registry/pom.xml
    incubator/nmaven/trunk/components/dotnet-repository/pom.xml
    incubator/nmaven/trunk/maven-dotnet.iml
    incubator/nmaven/trunk/plugins/maven-compile-plugin/src/main/java/org/apache/maven/dotnet/plugin/compile/CompilerMojo.java
    incubator/nmaven/trunk/plugins/maven-compile-plugin/src/main/java/org/apache/maven/dotnet/plugin/compile/ComponentInitializerMojo.java
    incubator/nmaven/trunk/plugins/maven-compile-plugin/src/main/java/org/apache/maven/dotnet/plugin/compile/TestCompilerMojo.java
    incubator/nmaven/trunk/plugins/maven-fxcop-plugin/src/main/java/org/apache/maven/dotnet/plugin/fxcop/FxCopAggregateMojo.java
    incubator/nmaven/trunk/plugins/maven-fxcop-plugin/src/main/java/org/apache/maven/dotnet/plugin/fxcop/FxCopMojo.java
    incubator/nmaven/trunk/plugins/maven-install-plugin/src/main/java/org/apache/maven/dotnet/plugin/install/InstallerMojo.java
    incubator/nmaven/trunk/plugins/maven-repository-plugin/pom.xml
    incubator/nmaven/trunk/plugins/maven-repository-plugin/src/main/java/org/apache/maven/dotnet/plugin/repository/RepositoryAssemblerMojo.java
    incubator/nmaven/trunk/plugins/pom.xml

Modified: incubator/nmaven/trunk/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/ArtifactContext.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/ArtifactContext.java?view=diff&rev=559955&r1=559954&r2=559955
==============================================================================
--- incubator/nmaven/trunk/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/ArtifactContext.java (original)
+++ incubator/nmaven/trunk/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/ArtifactContext.java Thu Jul 26 12:46:41 2007
@@ -19,7 +19,6 @@
 package org.apache.maven.dotnet.artifact;
 
 import org.apache.maven.artifact.Artifact;
-import org.apache.maven.artifact.handler.ArtifactHandler;
 import org.apache.maven.artifact.repository.ArtifactRepository;
 import org.apache.maven.project.MavenProject;
 
@@ -110,8 +109,6 @@
      * @return list of .NET artifacts that reside within the specified repository.
      */
     List<Artifact> getAllNetArtifactsFromRepository( File repository );
-
- //   ArtifactHandler createArtifactHandler( String packagingType, String extension );
 
     /**
      * Initializes this artifact context. Neither parameter value should be null.

Modified: incubator/nmaven/trunk/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/PathUtil.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/PathUtil.java?view=diff&rev=559955&r1=559954&r2=559955
==============================================================================
--- incubator/nmaven/trunk/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/PathUtil.java (original)
+++ incubator/nmaven/trunk/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/PathUtil.java Thu Jul 26 12:46:41 2007
@@ -1,6 +1,7 @@
 package org.apache.maven.dotnet.artifact;
 
 import org.apache.maven.artifact.Artifact;
+import org.apache.maven.dotnet.ArtifactType;
 
 import java.io.File;
 

Modified: 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=diff&rev=559955&r1=559954&r2=559955
==============================================================================
--- incubator/nmaven/trunk/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/impl/ArtifactInstallerImpl.java (original)
+++ incubator/nmaven/trunk/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/impl/ArtifactInstallerImpl.java Thu Jul 26 12:46:41 2007
@@ -20,7 +20,7 @@
 
 import org.apache.maven.dotnet.artifact.ArtifactContext;
 import org.apache.maven.dotnet.artifact.ApplicationConfig;
-import org.apache.maven.dotnet.artifact.ArtifactType;
+import org.apache.maven.dotnet.ArtifactType;
 import org.apache.maven.dotnet.artifact.NetDependencyMatchPolicy;
 import org.apache.maven.dotnet.artifact.NetDependenciesRepository;
 import org.apache.maven.dotnet.artifact.AssemblyResolver;
@@ -220,7 +220,7 @@
         {
             artifactDependencies.add( artifact );
         }
-        System.out.println( "Copying into PAB. Count = " + artifactDependencies.size() );
+
         for ( Artifact artifactDependency : artifactDependencies )
         {
             if ( !artifactDependency.getType().startsWith( "gac" ) )
@@ -336,7 +336,7 @@
         {
             dao.closeConnection();
         }
-        
+
     }
 
     /**

Modified: 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=diff&rev=559955&r1=559954&r2=559955
==============================================================================
--- incubator/nmaven/trunk/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/impl/AssemblyResolverImpl.java (original)
+++ incubator/nmaven/trunk/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/impl/AssemblyResolverImpl.java Thu Jul 26 12:46:41 2007
@@ -20,8 +20,8 @@
 
 import org.apache.maven.dotnet.artifact.AssemblyResolver;
 import org.apache.maven.dotnet.dao.ProjectDao;
-import org.apache.maven.dotnet.repository.Project;
-import org.apache.maven.dotnet.repository.ProjectDependency;
+import org.apache.maven.dotnet.dao.Project;
+import org.apache.maven.dotnet.dao.ProjectDependency;
 import org.apache.maven.project.MavenProject;
 import org.apache.maven.artifact.Artifact;
 import org.apache.maven.artifact.factory.ArtifactFactory;
@@ -225,7 +225,7 @@
         //Resolve and store pom
 
         //Add rdf info to mavenProject
-        System.out.println( "Dependencies = " + artifactDependencies.size() );
+
         if ( addResolvedDependenciesToProject )
         {
             mavenProject.setDependencyArtifacts( artifactDependencies );

Added: incubator/nmaven/trunk/components/dotnet-core/src/main/java/org/apache/maven/dotnet/ArtifactType.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/components/dotnet-core/src/main/java/org/apache/maven/dotnet/ArtifactType.java?view=auto&rev=559955
==============================================================================
--- incubator/nmaven/trunk/components/dotnet-core/src/main/java/org/apache/maven/dotnet/ArtifactType.java (added)
+++ incubator/nmaven/trunk/components/dotnet-core/src/main/java/org/apache/maven/dotnet/ArtifactType.java Thu Jul 26 12:46:41 2007
@@ -0,0 +1,144 @@
+/*
+ * 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;
+
+/**
+ * Enumeration of all the valid target types (module, library, winexe, exe, nar) for the .NET platform.
+ *
+ * @author Shane Isbell
+ */
+public enum ArtifactType
+{
+    MODULE( "module", "module", "netmodule" ),
+    LIBRARY( "library", "library", "dll" ),
+    EXE( "exe", "exe", "exe" ),
+    WINEXE( "winexe", "winexe", "exe" ),
+    NAR( "nar", "null", "nar" ),
+    EXECONFIG( "exe.config", "null", "exe.config" ),
+    NETPLUGIN( "netplugin", "library", "dll" ),
+    VISUAL_STUDIO_ADDIN( "visual-studio-addin", "library", "dll" ),
+    SHARP_DEVELOP_ADDIN( "sharp-develop-addin", "library", "dll" ),
+    NULL( "null", "null", "null" );
+
+    /**
+     * The extension used for the artifact(netmodule, dll, exe)
+     */
+    private String extension;
+
+    /**
+     * The packaging type (as given in the package tag within the pom.xml) of the artifact.
+     */
+    private String packagingType;
+
+    /**
+     * The target types (module, library, winexe, exe) for the .NET platform.
+     */
+    private String targetCompileType;
+
+    /**
+     * Constructor
+     */
+    ArtifactType( String packagingType, String targetCompileType, String extension )
+    {
+        this.packagingType = packagingType;
+        this.targetCompileType = targetCompileType;
+        this.extension = extension;
+    }
+
+    /**
+     * Returns extension used for the artifact(netmodule, dll, exe).
+     *
+     * @return Extension used for the artifact(netmodule, dll, exe).
+     */
+    public String getExtension()
+    {
+        return extension;
+    }
+
+    /**
+     * Returns the packaging type (as given in the package tag within the pom.xml) of the artifact.
+     *
+     * @return the packaging type (as given in the package tag within the pom.xml) of the artifact.
+     */
+    public String getPackagingType()
+    {
+        return packagingType;
+    }
+
+    /**
+     * Returns target types (module, library, winexe, exe) for the .NET platform.
+     *
+     * @return target types (module, library, winexe, exe) for the .NET platform.
+     */
+    public String getTargetCompileType()
+    {
+        return targetCompileType;
+    }
+
+    /**
+     * Returns artifact type for the specified packaging name
+     *
+     * @param packagingName the package name (as given in the package tag within the pom.xml) of the artifact.
+     * @return the artifact type for the specified packaging name
+     */
+    public static synchronized ArtifactType getArtifactTypeForPackagingName( String packagingName )
+    {
+        if ( packagingName.equals( ArtifactType.MODULE.getPackagingType() ) )
+        {
+            return ArtifactType.MODULE;
+        }
+        else if ( packagingName.equals( ArtifactType.LIBRARY.getPackagingType() ) )
+        {
+            return ArtifactType.LIBRARY;
+        }
+        else if ( packagingName.equals( ArtifactType.EXE.getPackagingType() ) )
+        {
+            return ArtifactType.EXE;
+        }
+        else if ( packagingName.equals( ArtifactType.WINEXE.getPackagingType() ) )
+        {
+            return ArtifactType.WINEXE;
+        }
+        else if ( packagingName.equals( ArtifactType.NAR.getPackagingType() ) )
+        {
+            return ArtifactType.LIBRARY;
+        }
+        else if ( packagingName.equals( ArtifactType.NAR.getPackagingType() ) )
+        {
+            return ArtifactType.NAR;
+        }
+        else if ( packagingName.equals( ArtifactType.EXECONFIG.getPackagingType() ) )
+        {
+            return ArtifactType.EXECONFIG;
+        }
+        else if ( packagingName.equals( ArtifactType.NETPLUGIN.getPackagingType() ) )
+        {
+            return ArtifactType.NETPLUGIN;
+        }
+        else if ( packagingName.equals( ArtifactType.SHARP_DEVELOP_ADDIN.getPackagingType() ) )
+        {
+            return ArtifactType.SHARP_DEVELOP_ADDIN;
+        }
+        else if ( packagingName.equals( ArtifactType.VISUAL_STUDIO_ADDIN.getPackagingType() ) )
+        {
+            return ArtifactType.VISUAL_STUDIO_ADDIN;
+        }
+        return ArtifactType.NULL;
+    }
+}

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

Modified: incubator/nmaven/trunk/components/dotnet-dao/project/pom.xml
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/components/dotnet-dao/project/pom.xml?view=diff&rev=559955&r1=559954&r2=559955
==============================================================================
--- incubator/nmaven/trunk/components/dotnet-dao/project/pom.xml (original)
+++ incubator/nmaven/trunk/components/dotnet-dao/project/pom.xml Thu Jul 26 12:46:41 2007
@@ -33,33 +33,43 @@
   <dependencies>
     <dependency>
       <groupId>org.apache.maven.dotnet</groupId>
-      <artifactId>dotnet-jdo</artifactId>
+      <artifactId>dotnet-registry</artifactId>
       <version>0.14</version>
     </dependency>
     <dependency>
       <groupId>org.apache.maven.dotnet</groupId>
-      <artifactId>dotnet-registry</artifactId>
+      <artifactId>dotnet-core</artifactId>
       <version>0.14</version>
     </dependency>
     <dependency>
       <groupId>org.openrdf</groupId>
       <artifactId>openrdf-model</artifactId>
-      <version>2.0-beta4</version>
+      <version>2.0-beta5</version>
     </dependency>
     <dependency>
       <groupId>org.openrdf</groupId>
       <artifactId>openrdf-repository-api</artifactId>
-      <version>2.0-beta4</version>
+      <version>2.0-beta5</version>
     </dependency>
     <dependency>
       <groupId>org.openrdf</groupId>
       <artifactId>openrdf-sail-nativerdf</artifactId>
-      <version>2.0-beta4</version>
+      <version>2.0-beta5</version>
+    </dependency>
+    <dependency>
+      <groupId>org.openrdf</groupId>
+      <artifactId>openrdf-sail-inferencer</artifactId>
+      <version>2.0-beta5</version>
     </dependency>
     <dependency>
       <groupId>org.openrdf</groupId>
       <artifactId>openrdf-queryparser-sparql</artifactId>
-      <version>2.0-beta4</version>
+      <version>2.0-beta5</version>
+    </dependency>
+    <dependency>
+      <groupId>org.openrdf</groupId>
+      <artifactId>openrdf-rio-rdfxml</artifactId>
+      <version>2.0-beta5</version>
     </dependency>
     <dependency>
       <groupId>info.aduna</groupId>

Added: incubator/nmaven/trunk/components/dotnet-dao/project/src/main/java/org/apache/maven/dotnet/dao/Project.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/components/dotnet-dao/project/src/main/java/org/apache/maven/dotnet/dao/Project.java?view=auto&rev=559955
==============================================================================
--- incubator/nmaven/trunk/components/dotnet-dao/project/src/main/java/org/apache/maven/dotnet/dao/Project.java (added)
+++ incubator/nmaven/trunk/components/dotnet-dao/project/src/main/java/org/apache/maven/dotnet/dao/Project.java Thu Jul 26 12:46:41 2007
@@ -0,0 +1,163 @@
+package org.apache.maven.dotnet.dao;
+
+import java.util.Set;
+import java.util.HashSet;
+
+public class Project
+{
+    private String groupId;
+
+    private String artifactId;
+
+    private String version;
+
+    private String publicKeyTokenId;
+
+    private boolean isResolved = false;
+
+    private String artifactType = "library";
+
+    private Set<ProjectDependency> projectDependencies = new HashSet<ProjectDependency>();
+
+    private Set<Requirement> requirements = new HashSet<Requirement>();
+
+    private Project parentProject;
+
+    public Project getParentProject()
+    {
+        return parentProject;
+    }
+
+    public void setParentProject( Project parentProject )
+    {
+        this.parentProject = parentProject;
+    }
+
+    public void addRequirement( Requirement requirement )
+    {
+        requirements.add( requirement );
+    }
+
+    public Set<Requirement> getRequirements()
+    {
+        return requirements;
+    }
+
+    public void setRequirements( Set<Requirement> requirements )
+    {
+        this.requirements = requirements;
+    }
+
+    public String getPublicKeyTokenId()
+    {
+        return publicKeyTokenId;
+    }
+
+    public void setPublicKeyTokenId( String publicKeyTokenId )
+    {
+        this.publicKeyTokenId = publicKeyTokenId;
+    }
+
+    public boolean isResolved()
+    {
+        return isResolved;
+    }
+
+    public void setResolved( boolean resolved )
+    {
+        isResolved = resolved;
+    }
+
+    public String getArtifactType()
+    {
+        return artifactType;
+    }
+
+    public void setArtifactType( String artifactType )
+    {
+        this.artifactType = artifactType;
+    }
+
+    public Set<ProjectDependency> getProjectDependencies()
+    {
+        return projectDependencies;
+    }
+
+    public void addProjectDependency( ProjectDependency projectDependency )
+    {
+        projectDependencies.add( projectDependency );
+    }
+
+    public void setProjectDependencies( Set<ProjectDependency> projectDependencies )
+    {
+        this.projectDependencies = projectDependencies;
+    }
+
+    public String getGroupId()
+    {
+        return groupId;
+    }
+
+    public void setGroupId( String groupId )
+    {
+        this.groupId = groupId;
+    }
+
+    public String getArtifactId()
+    {
+        return artifactId;
+    }
+
+    public void setArtifactId( String artifactId )
+    {
+        this.artifactId = artifactId;
+    }
+
+    public String getVersion()
+    {
+        return version;
+    }
+
+    public void setVersion( String version )
+    {
+        this.version = version;
+    }
+
+    public boolean equals( Object o )
+    {
+        if ( this == o )
+        {
+            return true;
+        }
+        if ( o == null || getClass() != o.getClass() )
+        {
+            return false;
+        }
+
+        final Project project = (Project) o;
+
+        if ( !artifactId.equals( project.artifactId ) )
+        {
+            return false;
+        }
+        if ( !groupId.equals( project.groupId ) )
+        {
+            return false;
+        }
+        if ( !version.equals( project.version ) )
+        {
+            return false;
+        }
+
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int result;
+        result = groupId.hashCode();
+        result = 29 * result + artifactId.hashCode();
+        result = 29 * result + version.hashCode();
+        return result;
+    }
+}

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

Modified: incubator/nmaven/trunk/components/dotnet-dao/project/src/main/java/org/apache/maven/dotnet/dao/ProjectDao.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/components/dotnet-dao/project/src/main/java/org/apache/maven/dotnet/dao/ProjectDao.java?view=diff&rev=559955&r1=559954&r2=559955
==============================================================================
--- incubator/nmaven/trunk/components/dotnet-dao/project/src/main/java/org/apache/maven/dotnet/dao/ProjectDao.java (original)
+++ incubator/nmaven/trunk/components/dotnet-dao/project/src/main/java/org/apache/maven/dotnet/dao/ProjectDao.java Thu Jul 26 12:46:41 2007
@@ -1,6 +1,5 @@
 package org.apache.maven.dotnet.dao;
 
-import org.apache.maven.dotnet.repository.Project;
 import org.apache.maven.dotnet.registry.DataAccessObject;
 
 import org.apache.maven.project.MavenProject;
@@ -9,6 +8,7 @@
 import org.apache.maven.artifact.manager.WagonManager;
 import org.apache.maven.artifact.factory.ArtifactFactory;
 import org.apache.maven.model.Model;
+import org.openrdf.repository.Repository;
 
 import java.util.Set;
 import java.util.List;
@@ -43,8 +43,13 @@
 
     void init( ArtifactFactory artifactFactory, WagonManager wagonManager );
 
+    Set<Project> getAllProjects()
+        throws IOException;
+
+    void setRdfRepository( Repository repository );
+
     boolean openConnection();
 
-    boolean closeConnection(); 
+    boolean closeConnection();
 
 }

Added: incubator/nmaven/trunk/components/dotnet-dao/project/src/main/java/org/apache/maven/dotnet/dao/ProjectDependency.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/components/dotnet-dao/project/src/main/java/org/apache/maven/dotnet/dao/ProjectDependency.java?view=auto&rev=559955
==============================================================================
--- incubator/nmaven/trunk/components/dotnet-dao/project/src/main/java/org/apache/maven/dotnet/dao/ProjectDependency.java (added)
+++ incubator/nmaven/trunk/components/dotnet-dao/project/src/main/java/org/apache/maven/dotnet/dao/ProjectDependency.java Thu Jul 26 12:46:41 2007
@@ -0,0 +1,19 @@
+package org.apache.maven.dotnet.dao;
+
+import org.apache.maven.dotnet.dao.Project;
+
+public class ProjectDependency extends Project
+{
+    private String scope;
+
+    public String getScope()
+    {
+        return scope;
+    }
+
+    public void setScope( String scope )
+    {
+        this.scope = scope;
+    }
+
+}

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

Added: incubator/nmaven/trunk/components/dotnet-dao/project/src/main/java/org/apache/maven/dotnet/dao/ProjectFactory.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/components/dotnet-dao/project/src/main/java/org/apache/maven/dotnet/dao/ProjectFactory.java?view=auto&rev=559955
==============================================================================
--- incubator/nmaven/trunk/components/dotnet-dao/project/src/main/java/org/apache/maven/dotnet/dao/ProjectFactory.java (added)
+++ incubator/nmaven/trunk/components/dotnet-dao/project/src/main/java/org/apache/maven/dotnet/dao/ProjectFactory.java Thu Jul 26 12:46:41 2007
@@ -0,0 +1,143 @@
+package org.apache.maven.dotnet.dao;
+
+import org.apache.maven.model.Model;
+import org.apache.maven.model.Dependency;
+import org.apache.maven.model.Parent;
+import org.apache.maven.model.io.xpp3.MavenXpp3Reader;
+import org.apache.maven.artifact.Artifact;
+import org.apache.maven.artifact.factory.ArtifactFactory;
+import org.apache.maven.artifact.versioning.VersionRange;
+import org.apache.maven.dotnet.ArtifactType;
+import org.codehaus.plexus.util.xml.pull.XmlPullParserException;
+import org.codehaus.plexus.util.FileUtils;
+
+import java.util.List;
+import java.util.ArrayList;
+import java.io.FileReader;
+import java.io.IOException;
+import java.io.File;
+
+
+public class ProjectFactory
+{
+    public static Model createModelFrom( Project project )
+        throws IOException
+    {
+        Model model = new Model();
+        model.setGroupId( project.getGroupId() );
+        model.setArtifactId( project.getArtifactId() );
+        model.setVersion( project.getVersion() );
+        model.setPackaging( project.getArtifactType() );
+
+        List<Dependency> dependencies = new ArrayList<Dependency>();
+        for ( ProjectDependency projectDependency : project.getProjectDependencies() )
+        {
+            Dependency dependency = new Dependency();
+            dependency.setGroupId( projectDependency.getGroupId() );
+            dependency.setArtifactId( projectDependency.getArtifactId() );
+            dependency.setVersion( projectDependency.getVersion() );
+            dependency.setType( projectDependency.getArtifactType() );
+            dependency.setClassifier( projectDependency.getPublicKeyTokenId() );
+            dependencies.add( dependency );
+        }
+        model.setDependencies( dependencies );
+        return model;
+
+    }
+
+    public static Project createProjectFrom( Model model, File pomFileDirectory )
+        throws IOException
+    {
+        Project project = new Project();
+        project.setGroupId( model.getGroupId() );
+        project.setArtifactId( model.getArtifactId() );
+        project.setVersion( model.getVersion() );
+        project.setArtifactType( model.getPackaging() );
+        Parent parent = model.getParent();
+        if ( parent != null && pomFileDirectory != null )
+        {
+            String parentPomName = FileUtils.filename( parent.getRelativePath() );
+            File parentPomFile = new File( pomFileDirectory, parentPomName );
+            FileReader fileReader = new FileReader( parentPomFile );
+
+            MavenXpp3Reader reader = new MavenXpp3Reader();
+            Model parentModel;
+            try
+            {
+                parentModel = reader.read( fileReader );
+            }
+            catch ( XmlPullParserException e )
+            {
+                throw new IOException( "NMAVEN-000-000: Unable to read model: Message = " + e.getMessage() );
+
+            }
+            //System.out.println( "Pom File: " + pomFileDirectory.getAbsolutePath() );
+            //System.out.println( "Parent: " + parentPomFile.getParentFile().getAbsolutePath() );
+            Project parentProject = createProjectFrom( parentModel, parentPomFile.getParentFile() );
+            project.setParentProject( parentProject );
+        }
+
+        //TODO: publickey/classifier
+        List<Dependency> sourceArtifactDependencies = model.getDependencies();
+        for ( Dependency dependency : sourceArtifactDependencies )
+        {
+            project.addProjectDependency( createProjectDependencyFrom( dependency ) );
+        }
+        return project;
+    }
+
+    public static ProjectDependency createProjectDependencyFrom( Dependency dependency )
+    {
+        ProjectDependency projectDependency = new ProjectDependency();
+        projectDependency.setGroupId( dependency.getGroupId() );
+        projectDependency.setArtifactId( dependency.getArtifactId() );
+        projectDependency.setVersion( dependency.getVersion() );
+        projectDependency.setPublicKeyTokenId( dependency.getClassifier() );
+        projectDependency.setArtifactType( dependency.getType() );
+        return projectDependency;
+    }
+
+    public static Artifact createArtifactFrom( Project project, ArtifactFactory artifactFactory, File localRepository )
+    {
+        Artifact assembly = artifactFactory.createArtifact( project.getGroupId(), project.getArtifactId(),
+                                                            project.getVersion(), "compile",
+                                                            project.getArtifactType() );
+
+        File artifactFile = ( ( project.getArtifactType().startsWith( "gac" ) ) ) ? new File(
+            "C:\\WINDOWS\\assembly\\" + project.getArtifactType() + "\\" + project.getArtifactId() + "\\" +
+                project.getVersion() + "__" + project.getPublicKeyTokenId() + "\\" + project.getArtifactId() + ".dll" )
+            : new File( localRepository.getParentFile(), "\\uac\\gac_msil\\" + project.getArtifactId() + "\\" +
+                project.getVersion() + "__" + project.getGroupId() + "\\" + project.getArtifactId() + "." +
+                ArtifactType.getArtifactTypeForPackagingName( project.getArtifactType() ).getExtension() );
+
+        assembly.setFile( artifactFile );
+        return assembly;
+    }
+
+    public static Artifact createArtifactFrom( ProjectDependency projectDependency, ArtifactFactory artifactFactory )
+    {
+        String scope = ( projectDependency.getScope() == null ) ? Artifact.SCOPE_COMPILE : projectDependency.getScope();
+        Artifact assembly = artifactFactory.createDependencyArtifact( projectDependency.getGroupId(),
+                                                                      projectDependency.getArtifactId(),
+                                                                      VersionRange.createFromVersion(
+                                                                          projectDependency.getVersion() ),
+                                                                      projectDependency.getArtifactType(),
+                                                                      projectDependency.getPublicKeyTokenId(), scope,
+                                                                      null );
+
+        File artifactFile = ( ( projectDependency.getArtifactType().startsWith( "gac" ) ) ) ? new File(
+            "C:\\WINDOWS\\assembly\\" + projectDependency.getArtifactType() + "\\" + projectDependency.getArtifactId() +
+                "\\" + projectDependency.getVersion() + "__" + projectDependency.getPublicKeyTokenId() + "\\" +
+                projectDependency.getArtifactId() + ".dll" ) : new File( System.getProperty( "user.home" ),
+                                                                         "\\.m2\\uac\\gac_msil\\" +
+                                                                             projectDependency.getArtifactId() + "\\" +
+                                                                             projectDependency.getVersion() + "__" +
+                                                                             projectDependency.getGroupId() + "\\" +
+                                                                             projectDependency.getArtifactId() + "." +
+                                                                             ArtifactType.getArtifactTypeForPackagingName(
+                                                                                 projectDependency.getArtifactType() ).getExtension() );
+
+        assembly.setFile( artifactFile );
+        return assembly;
+    }
+}

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

Added: incubator/nmaven/trunk/components/dotnet-dao/project/src/main/java/org/apache/maven/dotnet/dao/Requirement.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/components/dotnet-dao/project/src/main/java/org/apache/maven/dotnet/dao/Requirement.java?view=auto&rev=559955
==============================================================================
--- incubator/nmaven/trunk/components/dotnet-dao/project/src/main/java/org/apache/maven/dotnet/dao/Requirement.java (added)
+++ incubator/nmaven/trunk/components/dotnet-dao/project/src/main/java/org/apache/maven/dotnet/dao/Requirement.java Thu Jul 26 12:46:41 2007
@@ -0,0 +1,41 @@
+package org.apache.maven.dotnet.dao;
+
+import java.net.URI;
+
+public interface Requirement
+{
+    URI getUri();
+
+    String getValue();
+
+    public static class Factory
+    {
+        /**
+         * Default constructor
+         */
+        private Factory()
+        {
+        }
+
+        /**
+         * Creates a default implementation of Requirement
+         *
+         * @return a default implementation of vendor info
+         */
+        public static Requirement createDefaultRequirement( final URI uri, final String value )
+        {
+            return new Requirement()
+            {
+                public URI getUri()
+                {
+                    return uri;
+                }
+
+                public String getValue()
+                {
+                    return value;
+                }
+            };
+        }
+    }
+}

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

Modified: incubator/nmaven/trunk/components/dotnet-dao/project/src/main/java/org/apache/maven/dotnet/dao/impl/ProjectDaoImpl.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/components/dotnet-dao/project/src/main/java/org/apache/maven/dotnet/dao/impl/ProjectDaoImpl.java?view=diff&rev=559955&r1=559954&r2=559955
==============================================================================
--- incubator/nmaven/trunk/components/dotnet-dao/project/src/main/java/org/apache/maven/dotnet/dao/impl/ProjectDaoImpl.java (original)
+++ incubator/nmaven/trunk/components/dotnet-dao/project/src/main/java/org/apache/maven/dotnet/dao/impl/ProjectDaoImpl.java Thu Jul 26 12:46:41 2007
@@ -2,9 +2,10 @@
 
 import org.apache.maven.dotnet.dao.ProjectDao;
 import org.apache.maven.dotnet.dao.ProjectUri;
-import org.apache.maven.dotnet.repository.Project;
-import org.apache.maven.dotnet.repository.ProjectDependency;
-import org.apache.maven.dotnet.repository.Requirement;
+import org.apache.maven.dotnet.dao.ProjectFactory;
+import org.apache.maven.dotnet.dao.Project;
+import org.apache.maven.dotnet.dao.ProjectDependency;
+import org.apache.maven.dotnet.dao.Requirement;
 import org.apache.maven.dotnet.registry.RepositoryRegistry;
 import org.apache.maven.project.MavenProject;
 import org.apache.maven.artifact.repository.ArtifactRepository;
@@ -24,7 +25,11 @@
 
 import org.openrdf.repository.RepositoryConnection;
 import org.openrdf.repository.RepositoryException;
+import org.openrdf.repository.Repository;
 import org.openrdf.OpenRDFException;
+import org.openrdf.rio.RDFHandler;
+import org.openrdf.rio.RDFHandlerException;
+import org.openrdf.rio.rdfxml.RDFXMLWriter;
 import org.openrdf.query.QueryLanguage;
 import org.openrdf.query.QueryEvaluationException;
 import org.openrdf.query.MalformedQueryException;
@@ -102,6 +107,75 @@
         projectQuery = "SELECT * FROM " + this.constructQueryFragmentFor( "{x}", projectUris );
     }
 
+    public Set<Project> getAllProjects()
+        throws IOException
+    {
+        ValueFactory valueFactory = rdfRepository.getValueFactory();
+
+        Set<Project> projects = new HashSet<Project>();
+        TupleQueryResult result = null;
+        try
+        {
+            TupleQuery tupleQuery = repositoryConnection.prepareTupleQuery( QueryLanguage.SERQL, projectQuery );
+            //tupleQuery.setBinding( RDF.TYPE.toString(), valueFactory.createURI( ProjectUri.ARTIFACT.getPredicate() ));
+            result = tupleQuery.evaluate();
+            while ( result.hasNext() )
+            {
+                BindingSet set = result.next();
+
+                String groupId = set.getBinding( ProjectUri.GROUP_ID.getObjectBinding() ).getValue().toString();
+                String version = set.getBinding( ProjectUri.VERSION.getObjectBinding() ).getValue().toString();
+                String artifactId = set.getBinding( ProjectUri.ARTIFACT_ID.getObjectBinding() ).getValue().toString();
+                String artifactType =
+                    set.getBinding( ProjectUri.ARTIFACT_TYPE.getObjectBinding() ).getValue().toString();
+                Project project = getProjectFor( groupId, artifactId, version, artifactType, null );
+
+                System.out.println( "A: " + project.getArtifactId() + ":" + project.getProjectDependencies().size() );
+                /*
+                for ( Iterator<Binding> i = set.iterator(); i.hasNext(); )
+                {
+                    Binding b = i.next();
+                    System.out.println( b.getName() + ":" + b.getValue() );
+                }
+               */
+                projects.add( getProjectFor( groupId, artifactId, version, artifactType, null ) );
+            }
+        }
+        catch ( RepositoryException e )
+        {
+            throw new IOException( e.getMessage() );
+        }
+        catch ( MalformedQueryException e )
+        {
+            throw new IOException( e.getMessage() );
+        }
+        catch ( QueryEvaluationException e )
+        {
+            throw new IOException( e.getMessage() );
+        }
+        finally
+        {
+            if ( result != null )
+            {
+                try
+                {
+                    result.close();
+                }
+                catch ( QueryEvaluationException e )
+                {
+
+                }
+            }
+        }
+
+        return projects;
+    }
+
+    public void setRdfRepository( Repository repository )
+    {
+        this.rdfRepository = repository;
+    }
+
     public boolean openConnection()
     {
         try
@@ -113,11 +187,13 @@
         {
             return false;
         }
+
         return true;
     }
 
     public boolean closeConnection()
     {
+
         if ( repositoryConnection != null )
         {
             try
@@ -129,6 +205,7 @@
                 return false;
             }
         }
+
         return true;
     }
 
@@ -156,6 +233,12 @@
             tupleQuery.setBinding( ProjectUri.ARTIFACT_ID.getObjectBinding(),
                                    valueFactory.createLiteral( artifactId ) );
             tupleQuery.setBinding( ProjectUri.VERSION.getObjectBinding(), valueFactory.createLiteral( version ) );
+            if ( artifactType != null )
+            {
+                tupleQuery.setBinding( ProjectUri.ARTIFACT_TYPE.getObjectBinding(),
+                                       valueFactory.createLiteral( artifactType ) );
+            }
+
             result = tupleQuery.evaluate();
 
             if ( !result.hasNext() )
@@ -220,15 +303,15 @@
         }
         catch ( QueryEvaluationException e )
         {
-            e.printStackTrace();
+            throw new IOException( e.getMessage() );
         }
         catch ( RepositoryException e )
         {
-            e.printStackTrace();
+            throw new IOException( e.getMessage() );
         }
         catch ( MalformedQueryException e )
         {
-            e.printStackTrace();
+            throw new IOException( e.getMessage() );
         }
         finally
         {
@@ -510,7 +593,7 @@
                                     ArtifactFactory artifactFactory )
     {
         this.init( dataStoreObject, id, className );
-        init(artifactFactory, wagonManager);
+        init( artifactFactory, wagonManager );
     }
 
 
@@ -551,7 +634,7 @@
                                            Value dependencyUri )
         throws RepositoryException, MalformedQueryException, QueryEvaluationException
     {
-        Set<ProjectDependency> projectDependencies = new HashSet<ProjectDependency>();
+        //Set<ProjectDependency> projectDependencies = new HashSet<ProjectDependency>();
         TupleQuery tq = repositoryConnection.prepareTupleQuery( QueryLanguage.SERQL, dependencyQuery );
         tq.setBinding( "x", dependencyUri );
 
@@ -568,15 +651,17 @@
                     bs.getBinding( ProjectUri.ARTIFACT_ID.getObjectBinding() ).getValue().toString() );
                 projectDependency.setVersion(
                     bs.getBinding( ProjectUri.VERSION.getObjectBinding() ).getValue().toString() );
-
-                projectDependencies.add( projectDependency );
+                projectDependency.setArtifactType(
+                    bs.getBinding( ProjectUri.ARTIFACT_TYPE.getObjectBinding() ).getValue().toString() );
+                project.addProjectDependency( projectDependency );
+                //projectDependencies.add( projectDependency );
                 if ( bs.hasBinding( ProjectUri.DEPENDENCY.getObjectBinding() ) )
                 {
                     addDependenciesToProject( projectDependency, repositoryConnection,
                                               bs.getValue( ProjectUri.DEPENDENCY.getObjectBinding() ) );
                 }
             }
-            project.setProjectDependencies( projectDependencies );
+            //project.setProjectDependencies( projectDependencies );
         }
         finally
         {
@@ -591,6 +676,8 @@
 
         StringBuffer buffer = new StringBuffer();
         buffer.append( subject );
+        //buffer.append( "<" ).append( RDF.TYPE.toString() ).append( ">" ).append( " " ).append(
+        //    ProjectUri.ARTIFACT.getPredicate() ).append( ";" );
         for ( Iterator<ProjectUri> i = projectUris.iterator(); i.hasNext(); )
         {
             ProjectUri projectUri = i.next();

Modified: incubator/nmaven/trunk/components/dotnet-dao/project/src/test/java/org/apache/maven/dotnet/dao/impl/ProjectDaoImplTest.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/components/dotnet-dao/project/src/test/java/org/apache/maven/dotnet/dao/impl/ProjectDaoImplTest.java?view=diff&rev=559955&r1=559954&r2=559955
==============================================================================
--- incubator/nmaven/trunk/components/dotnet-dao/project/src/test/java/org/apache/maven/dotnet/dao/impl/ProjectDaoImplTest.java (original)
+++ incubator/nmaven/trunk/components/dotnet-dao/project/src/test/java/org/apache/maven/dotnet/dao/impl/ProjectDaoImplTest.java Thu Jul 26 12:46:41 2007
@@ -13,9 +13,9 @@
 import org.openrdf.repository.RepositoryException;
 import org.openrdf.sail.memory.MemoryStore;
 import org.openrdf.sail.memory.MemoryStoreRDFSInferencer;
-import org.apache.maven.dotnet.repository.Project;
-import org.apache.maven.dotnet.repository.ProjectDependency;
-import org.apache.maven.dotnet.repository.Requirement;
+import org.apache.maven.dotnet.dao.Project;
+import org.apache.maven.dotnet.dao.ProjectDependency;
+import org.apache.maven.dotnet.dao.Requirement;
 import org.apache.maven.dotnet.dao.ProjectDao;
 import org.apache.maven.dotnet.dao.ProjectUri;
 import org.apache.maven.artifact.repository.ArtifactRepository;
@@ -26,6 +26,52 @@
 {
 
     private static File basedir = new File( System.getProperty( "basedir" ) );
+
+    public void testGetAllProjects()
+    {
+        ProjectDao dao = this.createProjectDao();
+
+        Project project = new Project();
+        project.setGroupId( "NMaven" );
+        project.setArtifactId( "NMaven.Test5" );
+        project.setVersion( "1.0.0" );
+
+        //ProjectDependency test2 = createProjectDependency( "NMaven", "NMaven.Test5", "1.0.0" );
+        //project.addProjectDependency( test2 );
+
+        try
+        {
+            dao.storeProjectAndResolveDependencies( project, null, new ArrayList<ArtifactRepository>() );
+        }
+        catch ( java.io.IOException e )
+        {
+            e.printStackTrace();
+            fail( "Could not store the project: " + e.getMessage() );
+        }
+
+        Set<Project> projects = null;
+        try
+        {
+             projects = dao.getAllProjects();
+        }
+        catch ( IOException e )
+        {
+            e.printStackTrace();
+            fail( "Could not retrieve the project: " + e.getMessage() );
+        }
+        /*
+        assertEquals("Incorrect Number of Projects", 3, projects.size());
+
+        for(Project proj : projects)
+        {
+            if(proj.getArtifactId().equals( "NMaven.Test5"))
+            {
+                assertEquals("Incorrect number of dependencies", 2, proj.getProjectDependencies().size());
+            }
+        }
+        */
+        dao.closeConnection();
+    }
 
     public void testStore_WithRequirements()
     {

Added: incubator/nmaven/trunk/components/dotnet-dao/project/src/test/resources/NMaven-NMaven.Test5-1.0.0.xml
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/components/dotnet-dao/project/src/test/resources/NMaven-NMaven.Test5-1.0.0.xml?view=auto&rev=559955
==============================================================================
--- incubator/nmaven/trunk/components/dotnet-dao/project/src/test/resources/NMaven-NMaven.Test5-1.0.0.xml (added)
+++ incubator/nmaven/trunk/components/dotnet-dao/project/src/test/resources/NMaven-NMaven.Test5-1.0.0.xml Thu Jul 26 12:46:41 2007
@@ -0,0 +1,22 @@
+<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">
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>NMaven</groupId>
+  <artifactId>NMaven.Test5</artifactId>
+  <version>1.0.0</version>
+  <name>NMaven.Test5</name>
+  <description>
+  </description>
+  <dependencies>
+    <dependency>
+      <groupId>NMaven</groupId>
+      <artifactId>NMaven.Test4</artifactId>
+      <version>1.0.0</version>
+    </dependency>
+    <dependency>
+      <groupId>NMaven</groupId>
+      <artifactId>NMaven.Test6</artifactId>
+      <version>1.0.0</version>
+    </dependency>
+  </dependencies>
+</project>
\ No newline at end of file

Propchange: incubator/nmaven/trunk/components/dotnet-dao/project/src/test/resources/NMaven-NMaven.Test5-1.0.0.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/nmaven/trunk/components/dotnet-dao/project/src/test/resources/NMaven-NMaven.Test6-1.0.0.xml
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/components/dotnet-dao/project/src/test/resources/NMaven-NMaven.Test6-1.0.0.xml?view=auto&rev=559955
==============================================================================
--- incubator/nmaven/trunk/components/dotnet-dao/project/src/test/resources/NMaven-NMaven.Test6-1.0.0.xml (added)
+++ incubator/nmaven/trunk/components/dotnet-dao/project/src/test/resources/NMaven-NMaven.Test6-1.0.0.xml Thu Jul 26 12:46:41 2007
@@ -0,0 +1,10 @@
+<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">
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>NMaven</groupId>
+  <artifactId>NMaven.Test6</artifactId>
+  <version>1.0.0</version>
+  <name>NMaven.Test6</name>
+  <description>
+  </description>
+</project>
\ No newline at end of file

Propchange: incubator/nmaven/trunk/components/dotnet-dao/project/src/test/resources/NMaven-NMaven.Test6-1.0.0.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/nmaven/trunk/components/dotnet-executable/src/main/java/org/apache/maven/dotnet/executable/ExecutableConfig.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/components/dotnet-executable/src/main/java/org/apache/maven/dotnet/executable/ExecutableConfig.java?view=diff&rev=559955&r1=559954&r2=559955
==============================================================================
--- incubator/nmaven/trunk/components/dotnet-executable/src/main/java/org/apache/maven/dotnet/executable/ExecutableConfig.java (original)
+++ incubator/nmaven/trunk/components/dotnet-executable/src/main/java/org/apache/maven/dotnet/executable/ExecutableConfig.java Thu Jul 26 12:46:41 2007
@@ -19,7 +19,7 @@
 package org.apache.maven.dotnet.executable;
 
 import org.apache.maven.dotnet.executable.compiler.CompilerConfig;
-import org.apache.maven.dotnet.artifact.ArtifactType;
+import org.apache.maven.dotnet.ArtifactType;
 import org.apache.maven.dotnet.executable.compiler.KeyInfo;
 
 import java.util.List;

Modified: incubator/nmaven/trunk/components/dotnet-executable/src/main/java/org/apache/maven/dotnet/executable/compiler/CompilerConfig.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/components/dotnet-executable/src/main/java/org/apache/maven/dotnet/executable/compiler/CompilerConfig.java?view=diff&rev=559955&r1=559954&r2=559955
==============================================================================
--- incubator/nmaven/trunk/components/dotnet-executable/src/main/java/org/apache/maven/dotnet/executable/compiler/CompilerConfig.java (original)
+++ incubator/nmaven/trunk/components/dotnet-executable/src/main/java/org/apache/maven/dotnet/executable/compiler/CompilerConfig.java Thu Jul 26 12:46:41 2007
@@ -18,7 +18,7 @@
  */
 package org.apache.maven.dotnet.executable.compiler;
 
-import org.apache.maven.dotnet.artifact.ArtifactType;
+import org.apache.maven.dotnet.ArtifactType;
 import org.apache.maven.dotnet.executable.ExecutableConfig;
 
 import java.io.File;

Modified: incubator/nmaven/trunk/components/dotnet-executable/src/main/java/org/apache/maven/dotnet/executable/impl/CompilerContextImpl.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/components/dotnet-executable/src/main/java/org/apache/maven/dotnet/executable/impl/CompilerContextImpl.java?view=diff&rev=559955&r1=559954&r2=559955
==============================================================================
--- incubator/nmaven/trunk/components/dotnet-executable/src/main/java/org/apache/maven/dotnet/executable/impl/CompilerContextImpl.java (original)
+++ incubator/nmaven/trunk/components/dotnet-executable/src/main/java/org/apache/maven/dotnet/executable/impl/CompilerContextImpl.java Thu Jul 26 12:46:41 2007
@@ -26,7 +26,7 @@
 import org.apache.maven.dotnet.executable.compiler.InvalidArtifactException;
 import org.apache.maven.dotnet.artifact.ArtifactContext;
 import org.apache.maven.dotnet.artifact.ArtifactException;
-import org.apache.maven.dotnet.artifact.ArtifactType;
+import org.apache.maven.dotnet.ArtifactType;
 
 import org.apache.maven.project.MavenProject;
 import org.apache.maven.artifact.Artifact;

Modified: incubator/nmaven/trunk/components/dotnet-registry/pom.xml
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/components/dotnet-registry/pom.xml?view=diff&rev=559955&r1=559954&r2=559955
==============================================================================
--- incubator/nmaven/trunk/components/dotnet-registry/pom.xml (original)
+++ incubator/nmaven/trunk/components/dotnet-registry/pom.xml Thu Jul 26 12:46:41 2007
@@ -44,17 +44,17 @@
     <dependency>
       <groupId>org.openrdf</groupId>
       <artifactId>openrdf-repository-api</artifactId>
-      <version>2.0-beta4</version>
+      <version>2.0-beta5</version>
     </dependency>
     <dependency>
       <groupId>org.openrdf</groupId>
       <artifactId>openrdf-repository-sail</artifactId>
-      <version>2.0-beta4</version>
+      <version>2.0-beta5</version>
     </dependency>
     <dependency>
       <groupId>org.openrdf</groupId>
       <artifactId>openrdf-sail-memory</artifactId>
-      <version>2.0-beta4</version>
+      <version>2.0-beta5</version>
     </dependency>
   </dependencies>
   <build>

Modified: incubator/nmaven/trunk/components/dotnet-repository/pom.xml
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/components/dotnet-repository/pom.xml?view=diff&rev=559955&r1=559954&r2=559955
==============================================================================
--- incubator/nmaven/trunk/components/dotnet-repository/pom.xml (original)
+++ incubator/nmaven/trunk/components/dotnet-repository/pom.xml Thu Jul 26 12:46:41 2007
@@ -25,8 +25,32 @@
   </parent>
   <modelVersion>4.0.0</modelVersion>
   <groupId>org.apache.maven.dotnet</groupId>
-  <artifactId>dotnet-jdo</artifactId>
-  <name>dotnet-jdo</name>
+  <artifactId>dotnet-repository</artifactId>
+  <name>dotnet-repository</name>
   <description>
   </description>
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.maven.dotnet</groupId>
+      <artifactId>dotnet-dao-project</artifactId>
+      <version>0.14</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven.dotnet</groupId>
+      <artifactId>dotnet-artifact</artifactId>
+      <version>0.14</version>
+    </dependency>
+  </dependencies>
+  <build>
+    <testResources>
+      <testResource>
+        <directory>src/test/resources/uac</directory>
+        <targetPath>../test-repo/uac</targetPath>
+      </testResource>
+      <testResource>
+        <directory>src/test/resources</directory>
+        <targetPath>../test-repo</targetPath>
+      </testResource>
+    </testResources>
+  </build>
 </project>

Added: incubator/nmaven/trunk/components/dotnet-repository/src/main/java/org/apache/maven/dotnet/repository/RepositoryConverter.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/components/dotnet-repository/src/main/java/org/apache/maven/dotnet/repository/RepositoryConverter.java?view=auto&rev=559955
==============================================================================
--- incubator/nmaven/trunk/components/dotnet-repository/src/main/java/org/apache/maven/dotnet/repository/RepositoryConverter.java (added)
+++ incubator/nmaven/trunk/components/dotnet-repository/src/main/java/org/apache/maven/dotnet/repository/RepositoryConverter.java Thu Jul 26 12:46:41 2007
@@ -0,0 +1,16 @@
+package org.apache.maven.dotnet.repository;
+
+import org.openrdf.repository.Repository;
+
+import java.io.File;
+import java.io.IOException;
+
+public interface RepositoryConverter
+{
+    /**
+     * Role used to register component implementations with the container.
+     */
+    String ROLE = RepositoryConverter.class.getName();
+
+    void convert( Repository repository, File mavenRepository) throws IOException;
+}

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

Added: incubator/nmaven/trunk/components/dotnet-repository/src/main/java/org/apache/maven/dotnet/repository/impl/RepositoryConverterImpl.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/components/dotnet-repository/src/main/java/org/apache/maven/dotnet/repository/impl/RepositoryConverterImpl.java?view=auto&rev=559955
==============================================================================
--- incubator/nmaven/trunk/components/dotnet-repository/src/main/java/org/apache/maven/dotnet/repository/impl/RepositoryConverterImpl.java (added)
+++ incubator/nmaven/trunk/components/dotnet-repository/src/main/java/org/apache/maven/dotnet/repository/impl/RepositoryConverterImpl.java Thu Jul 26 12:46:41 2007
@@ -0,0 +1,93 @@
+package org.apache.maven.dotnet.repository.impl;
+
+import org.apache.maven.dotnet.repository.RepositoryConverter;
+import org.apache.maven.dotnet.dao.Project;
+import org.apache.maven.dotnet.dao.ProjectDao;
+import org.apache.maven.dotnet.dao.ProjectFactory;
+import org.apache.maven.dotnet.registry.DataAccessObjectRegistry;
+import org.apache.maven.dotnet.ArtifactType;
+import org.apache.maven.model.Model;
+import org.apache.maven.model.io.xpp3.MavenXpp3Writer;
+import org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout;
+import org.apache.maven.artifact.repository.layout.DefaultRepositoryLayout;
+import org.apache.maven.artifact.Artifact;
+import org.apache.maven.artifact.handler.ArtifactHandler;
+import org.apache.maven.artifact.handler.DefaultArtifactHandler;
+import org.apache.maven.artifact.manager.WagonManager;
+import org.apache.maven.artifact.factory.ArtifactFactory;
+import org.openrdf.repository.Repository;
+import org.codehaus.plexus.util.IOUtil;
+import org.codehaus.plexus.util.FileUtils;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.FileWriter;
+import java.util.logging.Logger;
+import java.util.Set;
+
+public class RepositoryConverterImpl
+    implements RepositoryConverter
+{
+
+    private org.apache.maven.artifact.manager.WagonManager wagonManager;
+
+    /**
+     * The artifact factory component, which is used for creating artifacts.
+     */
+    private org.apache.maven.artifact.factory.ArtifactFactory artifactFactory;
+
+    private org.apache.maven.dotnet.registry.DataAccessObjectRegistry daoRegistry;
+
+    private static Logger logger = Logger.getAnonymousLogger();
+
+    protected void initTest( DataAccessObjectRegistry daoRegistry, ArtifactFactory artifactFactory,
+                             WagonManager wagonManager )
+    {
+        this.daoRegistry = daoRegistry;
+        this.artifactFactory = artifactFactory;
+        this.wagonManager = wagonManager;
+    }
+
+    public void convert( Repository repository, File mavenRepository )
+        throws IOException
+    {
+        ProjectDao dao = (ProjectDao) daoRegistry.find( "dao:project" );
+        dao.init( artifactFactory, wagonManager );
+        dao.setRdfRepository( repository );
+        dao.openConnection();
+        Set<Project> projects = dao.getAllProjects();
+        for ( Project project : projects )
+        {
+            System.out.println(project.getArtifactId() + ":" + project.getProjectDependencies().size());
+            Artifact artifact = ProjectFactory.createArtifactFrom( project, artifactFactory, mavenRepository );
+            Model model = ProjectFactory.createModelFrom( project );
+
+            ArtifactHandler handler = new DefaultArtifactHandler(
+                ArtifactType.getArtifactTypeForPackagingName( artifact.getType() ).getExtension() );
+            artifact.setArtifactHandler( handler );
+
+            ArtifactRepositoryLayout layout = new DefaultRepositoryLayout();
+            if ( !project.getArtifactType().equals( "pom" ) )
+            {
+                if ( artifact.getFile().exists() )
+                {
+                    FileUtils.copyFile( artifact.getFile(), new File( mavenRepository, layout.pathOf( artifact ) ) );
+                }
+                else
+                {
+                    logger.info("NMAVEN-000-000: Could not find file: " + artifact.getFile().getAbsolutePath());
+                    continue;
+                }
+            }
+
+            handler = new DefaultArtifactHandler( "pom" );
+            artifact.setArtifactHandler( handler );
+
+            File pomFile = new File( mavenRepository, layout.pathOf( artifact ) );
+            FileWriter fileWriter = new FileWriter( pomFile );
+            new MavenXpp3Writer().write( fileWriter, model );
+            IOUtil.close( fileWriter );
+        }
+        dao.closeConnection();
+    }
+}

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

Added: incubator/nmaven/trunk/components/dotnet-repository/src/main/resources/META-INF/plexus/components.xml
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/components/dotnet-repository/src/main/resources/META-INF/plexus/components.xml?view=auto&rev=559955
==============================================================================
--- incubator/nmaven/trunk/components/dotnet-repository/src/main/resources/META-INF/plexus/components.xml (added)
+++ incubator/nmaven/trunk/components/dotnet-repository/src/main/resources/META-INF/plexus/components.xml Thu Jul 26 12:46:41 2007
@@ -0,0 +1,19 @@
+<component-set>
+  <components>
+    <component>
+      <role>org.apache.maven.dotnet.repository.RepositoryConverter</role>
+      <implementation>org.apache.maven.dotnet.repository.impl.RepositoryConverterImpl</implementation>
+      <requirements>
+        <requirement>
+          <role>org.apache.maven.artifact.manager.WagonManager</role>
+        </requirement>
+        <requirement>
+          <role>org.apache.maven.artifact.factory.ArtifactFactory</role>
+        </requirement>
+        <requirement>
+          <role>org.apache.maven.dotnet.registry.DataAccessObjectRegistry</role>
+        </requirement>
+      </requirements>
+    </component>
+  </components>
+</component-set>
\ No newline at end of file

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

Added: incubator/nmaven/trunk/components/dotnet-repository/src/test/java/org/apache/maven/dotnet/repository/impl/ArtifactFactoryTestStub.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/components/dotnet-repository/src/test/java/org/apache/maven/dotnet/repository/impl/ArtifactFactoryTestStub.java?view=auto&rev=559955
==============================================================================
--- incubator/nmaven/trunk/components/dotnet-repository/src/test/java/org/apache/maven/dotnet/repository/impl/ArtifactFactoryTestStub.java (added)
+++ incubator/nmaven/trunk/components/dotnet-repository/src/test/java/org/apache/maven/dotnet/repository/impl/ArtifactFactoryTestStub.java Thu Jul 26 12:46:41 2007
@@ -0,0 +1,134 @@
+package org.apache.maven.dotnet.repository.impl;
+
+import org.apache.maven.artifact.factory.ArtifactFactory;
+import org.apache.maven.artifact.Artifact;
+import org.apache.maven.artifact.DefaultArtifact;
+import org.apache.maven.artifact.handler.DefaultArtifactHandler;
+import org.apache.maven.artifact.versioning.VersionRange;
+
+public class ArtifactFactoryTestStub
+    implements ArtifactFactory
+{
+
+    public Artifact createArtifact( String groupId, String artifactId, String version, String scope, String type )
+    {
+        return createArtifact( groupId, artifactId, version, scope, type, null, null );
+    }
+
+    public Artifact createArtifactWithClassifier( String groupId, String artifactId, String version, String type,
+                                                  String classifier )
+    {
+        return createArtifact( groupId, artifactId, version, null, type, classifier, null );
+    }
+
+    public Artifact createDependencyArtifact( String groupId, String artifactId, VersionRange versionRange, String type,
+                                              String classifier, String scope )
+    {
+        return createArtifact( groupId, artifactId, versionRange, type, classifier, null, null );
+    }
+
+    public Artifact createDependencyArtifact( String groupId, String artifactId, VersionRange versionRange, String type,
+                                              String classifier, String scope, boolean optional )
+    {
+        return createArtifact( groupId, artifactId, versionRange, type, classifier, scope, null, optional );
+    }
+
+    public Artifact createDependencyArtifact( String groupId, String artifactId, VersionRange versionRange, String type,
+                                              String classifier, String scope, String inheritedScope )
+    {
+        return createArtifact( groupId, artifactId, versionRange, type, classifier, scope, inheritedScope );
+    }
+
+    public Artifact createDependencyArtifact( String groupId, String artifactId, VersionRange versionRange, String type,
+                                              String classifier, String scope, String inheritedScope, boolean optional )
+    {
+        return createArtifact( groupId, artifactId, versionRange, type, classifier, scope, inheritedScope, optional );
+    }
+
+    public Artifact createBuildArtifact( String groupId, String artifactId, String version, String packaging )
+    {
+        return createArtifact( groupId, artifactId, version, null, packaging, null, null );
+    }
+
+    public Artifact createProjectArtifact( String groupId, String artifactId, String version )
+    {
+        return createProjectArtifact( groupId, artifactId, version, null );
+    }
+
+    public Artifact createParentArtifact( String groupId, String artifactId, String version )
+    {
+        return createProjectArtifact( groupId, artifactId, version );
+    }
+
+    public Artifact createPluginArtifact( String groupId, String artifactId, VersionRange versionRange )
+    {
+        return createArtifact( groupId, artifactId, versionRange, "maven-plugin", null, Artifact.SCOPE_RUNTIME, null );
+    }
+
+    public Artifact createProjectArtifact( String groupId, String artifactId, String version, String scope )
+    {
+        return createArtifact( groupId, artifactId, version, scope, "pom" );
+    }
+
+    public Artifact createExtensionArtifact( String groupId, String artifactId, VersionRange versionRange )
+    {
+        return createArtifact( groupId, artifactId, versionRange, "jar", null, Artifact.SCOPE_RUNTIME, null );
+    }
+
+    private Artifact createArtifact( String groupId, String artifactId, String version, String scope, String type,
+                                     String classifier, String inheritedScope )
+    {
+        VersionRange versionRange = null;
+        if ( version != null )
+        {
+            versionRange = VersionRange.createFromVersion( version );
+        }
+        return createArtifact( groupId, artifactId, versionRange, type, classifier, scope, inheritedScope );
+    }
+
+    private Artifact createArtifact( String groupId, String artifactId, VersionRange versionRange, String type,
+                                     String classifier, String scope, String inheritedScope )
+    {
+        return createArtifact( groupId, artifactId, versionRange, type, classifier, scope, inheritedScope, false );
+    }
+
+    private Artifact createArtifact( String groupId, String artifactId, VersionRange versionRange, String type,
+                                     String classifier, String scope, String inheritedScope, boolean optional )
+    {
+        // TODO: can refactor - inherited scope calculation belongs in the collector, use scope handler
+
+        String desiredScope = Artifact.SCOPE_RUNTIME;
+        if ( inheritedScope == null )
+        {
+            desiredScope = scope;
+        }
+        else if ( Artifact.SCOPE_TEST.equals( scope ) || Artifact.SCOPE_PROVIDED.equals( scope ) )
+        {
+            return null;
+        }
+        else if ( Artifact.SCOPE_COMPILE.equals( scope ) && Artifact.SCOPE_COMPILE.equals( inheritedScope ) )
+        {
+            // added to retain compile scope. Remove if you want compile inherited as runtime
+            desiredScope = Artifact.SCOPE_COMPILE;
+        }
+
+        if ( Artifact.SCOPE_TEST.equals( inheritedScope ) )
+        {
+            desiredScope = Artifact.SCOPE_TEST;
+        }
+
+        if ( Artifact.SCOPE_PROVIDED.equals( inheritedScope ) )
+        {
+            desiredScope = Artifact.SCOPE_PROVIDED;
+        }
+
+        if ( Artifact.SCOPE_SYSTEM.equals( scope ) )
+        {
+            // system scopes come through unchanged...
+            desiredScope = Artifact.SCOPE_SYSTEM;
+        }
+
+        return new DefaultArtifact( groupId, artifactId, versionRange, desiredScope, type, classifier,
+                                                              new DefaultArtifactHandler(type), optional );
+    }
+}

Propchange: incubator/nmaven/trunk/components/dotnet-repository/src/test/java/org/apache/maven/dotnet/repository/impl/ArtifactFactoryTestStub.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/nmaven/trunk/components/dotnet-repository/src/test/java/org/apache/maven/dotnet/repository/impl/DataAccessObjectRegistryStub.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/components/dotnet-repository/src/test/java/org/apache/maven/dotnet/repository/impl/DataAccessObjectRegistryStub.java?view=auto&rev=559955
==============================================================================
--- incubator/nmaven/trunk/components/dotnet-repository/src/test/java/org/apache/maven/dotnet/repository/impl/DataAccessObjectRegistryStub.java (added)
+++ incubator/nmaven/trunk/components/dotnet-repository/src/test/java/org/apache/maven/dotnet/repository/impl/DataAccessObjectRegistryStub.java Thu Jul 26 12:46:41 2007
@@ -0,0 +1,29 @@
+package org.apache.maven.dotnet.repository.impl;
+
+import org.apache.maven.dotnet.registry.DataAccessObjectRegistry;
+import org.apache.maven.dotnet.registry.DataAccessObject;
+import org.apache.maven.dotnet.dao.impl.ProjectDaoImpl;
+
+import java.util.Set;
+
+
+public class DataAccessObjectRegistryStub
+    implements DataAccessObjectRegistry
+{
+
+    public Set<DataAccessObject> findAll()
+    {
+        return null;
+    }
+
+    public DataAccessObject find( String daoId )
+    {
+        return new ProjectDaoImpl();
+    }
+
+    public Set<String> getDaoIds()
+    {
+        return null;
+    }
+
+}

Propchange: incubator/nmaven/trunk/components/dotnet-repository/src/test/java/org/apache/maven/dotnet/repository/impl/DataAccessObjectRegistryStub.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/nmaven/trunk/components/dotnet-repository/src/test/java/org/apache/maven/dotnet/repository/impl/RepositoryConverterImplTest.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/components/dotnet-repository/src/test/java/org/apache/maven/dotnet/repository/impl/RepositoryConverterImplTest.java?view=auto&rev=559955
==============================================================================
--- incubator/nmaven/trunk/components/dotnet-repository/src/test/java/org/apache/maven/dotnet/repository/impl/RepositoryConverterImplTest.java (added)
+++ incubator/nmaven/trunk/components/dotnet-repository/src/test/java/org/apache/maven/dotnet/repository/impl/RepositoryConverterImplTest.java Thu Jul 26 12:46:41 2007
@@ -0,0 +1,106 @@
+package org.apache.maven.dotnet.repository.impl;
+
+import junit.framework.TestCase;
+import org.apache.maven.dotnet.dao.impl.ProjectDaoImpl;
+import org.apache.maven.dotnet.dao.ProjectDao;
+import org.apache.maven.dotnet.dao.Project;
+import org.apache.maven.dotnet.dao.ProjectDependency;
+import org.apache.maven.artifact.repository.ArtifactRepository;
+import org.openrdf.repository.Repository;
+import org.openrdf.repository.RepositoryException;
+import org.openrdf.repository.sail.SailRepository;
+import org.openrdf.sail.memory.MemoryStoreRDFSInferencer;
+import org.openrdf.sail.memory.MemoryStore;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.ArrayList;
+
+
+public class RepositoryConverterImplTest
+    extends TestCase
+{
+
+    private static File basedir = new File( System.getProperty( "basedir" ) );
+
+    public void testConvert()
+    {
+        File testRepo = new File( System.getProperty( "basedir" ), "target/test-repo/repository" );
+        testRepo.mkdir();
+
+        Repository repository = this.createRepository();
+        ProjectDao dao = this.createProjectDao(repository);
+
+        Project project = new Project();
+        project.setGroupId( "NMaven.Model" );
+        project.setArtifactId( "NMaven.Model.Pom" );
+        project.setVersion( "1.0" );
+
+        ProjectDependency test2 = createProjectDependency( "NMaven", "NMaven.Test", "1.0" );
+        test2.setArtifactType( "library");
+        project.addProjectDependency( test2 );
+
+        try
+        {
+            dao.storeProjectAndResolveDependencies( project, null, new ArrayList<ArtifactRepository>() );
+        }
+        catch ( java.io.IOException e )
+        {
+            e.printStackTrace();
+            fail( "Could not store the project: " + e.getMessage() );
+        }
+
+        RepositoryConverterImpl repositoryConverter = new RepositoryConverterImpl();
+        repositoryConverter.initTest( new DataAccessObjectRegistryStub(), new ArtifactFactoryTestStub(),
+                                      new WagonManagerTestStub() );
+        try
+        {
+            repositoryConverter.convert( repository, testRepo );
+        }
+        catch ( IOException e )
+        {
+            fail( "Could not convert the repository: " + e.getMessage() );
+        }
+
+        assertTrue(new File(testRepo, "/NMaven/Model/NMaven.Model.Pom/1.0/NMaven.Model.Pom-1.0.dll").exists());
+        assertTrue(new File(testRepo, "/NMaven/Model/NMaven.Model.Pom/1.0/NMaven.Model.Pom-1.0.pom").exists());
+        assertTrue(new File(testRepo, "/NMaven/NMaven.Test/1.0/NMaven.Test-1.0.dll").exists());
+        assertTrue(new File(testRepo, "/NMaven/NMaven.Test/1.0/NMaven.Test-1.0.pom").exists());
+    }
+
+    private ProjectDependency createProjectDependency( String groupId, String artifactId, String version )
+    {
+        ProjectDependency projectDependency = new ProjectDependency();
+        projectDependency.setGroupId( groupId );
+        projectDependency.setArtifactId( artifactId );
+        projectDependency.setVersion( version );
+        return projectDependency;
+    }
+
+    private Repository createRepository()
+    {
+        File dataDir = new File( basedir, ( "/target/rdf-repos/rdf-repo-" + System.currentTimeMillis() ) );
+        org.openrdf.repository.Repository rdfRepository =
+            new SailRepository( new MemoryStoreRDFSInferencer( new MemoryStore( dataDir ) ) );
+        try
+        {
+            rdfRepository.initialize();
+        }
+        catch ( RepositoryException e )
+        {
+            return null;
+        }
+        return rdfRepository;
+    }
+
+    private ProjectDao createProjectDao(Repository rdfRepository)
+    {
+        ProjectDaoImpl dao = new ProjectDaoImpl();
+        WagonManagerTestStub stub = new WagonManagerTestStub();
+        stub.setBaseDir( basedir );
+        dao.init( new ArtifactFactoryTestStub(), stub );
+        dao.setRdfRepository( rdfRepository );
+        dao.openConnection();
+        return dao;
+    }
+}

Propchange: incubator/nmaven/trunk/components/dotnet-repository/src/test/java/org/apache/maven/dotnet/repository/impl/RepositoryConverterImplTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/nmaven/trunk/components/dotnet-repository/src/test/java/org/apache/maven/dotnet/repository/impl/WagonManagerTestStub.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/components/dotnet-repository/src/test/java/org/apache/maven/dotnet/repository/impl/WagonManagerTestStub.java?view=auto&rev=559955
==============================================================================
--- incubator/nmaven/trunk/components/dotnet-repository/src/test/java/org/apache/maven/dotnet/repository/impl/WagonManagerTestStub.java (added)
+++ incubator/nmaven/trunk/components/dotnet-repository/src/test/java/org/apache/maven/dotnet/repository/impl/WagonManagerTestStub.java Thu Jul 26 12:46:41 2007
@@ -0,0 +1,166 @@
+package org.apache.maven.dotnet.repository.impl;
+
+import org.apache.maven.artifact.manager.WagonManager;
+import org.apache.maven.artifact.manager.WagonConfigurationException;
+import org.apache.maven.artifact.Artifact;
+import org.apache.maven.artifact.metadata.ArtifactMetadata;
+import org.apache.maven.artifact.repository.ArtifactRepository;
+import org.apache.maven.wagon.Wagon;
+import org.apache.maven.wagon.UnsupportedProtocolException;
+import org.apache.maven.wagon.TransferFailedException;
+import org.apache.maven.wagon.ResourceDoesNotExistException;
+import org.apache.maven.wagon.authentication.AuthenticationInfo;
+import org.apache.maven.wagon.proxy.ProxyInfo;
+import org.apache.maven.wagon.events.TransferListener;
+import org.apache.maven.wagon.repository.Repository;
+import org.apache.maven.wagon.repository.RepositoryPermissions;
+import org.codehaus.plexus.util.IOUtil;
+import org.codehaus.plexus.util.xml.Xpp3Dom;
+import org.codehaus.plexus.PlexusContainer;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.util.List;
+import java.util.Collection;
+
+public class WagonManagerTestStub
+    implements WagonManager
+{
+
+    private File basedir;
+
+    public Wagon getWagon( String string )
+        throws UnsupportedProtocolException
+    {
+        return null;  //To change body of implemented methods use File | Settings | File Templates.
+    }
+
+    public Wagon getWagon( Repository repository )
+        throws UnsupportedProtocolException, WagonConfigurationException
+    {
+        return null;  //To change body of implemented methods use File | Settings | File Templates.
+    }
+
+    public void getArtifact( Artifact artifact, List list )
+        throws TransferFailedException, ResourceDoesNotExistException
+    {
+        if ( artifact.getType().equals( "pom" ) )
+        {
+            File pomFile = artifact.getFile();
+            try
+            {
+                FileOutputStream fos = new FileOutputStream( pomFile );
+                FileInputStream fis = new FileInputStream( new File( basedir, "target/test-repo/" +
+                    artifact.getGroupId() + "-" + artifact.getArtifactId() + "-" + artifact.getVersion() + ".xml" ) );
+                IOUtil.copy( fis, fos );
+            }
+            catch ( IOException e )
+            {
+                e.printStackTrace();
+            }
+        }
+    }
+
+    public void getArtifact( Artifact artifact, ArtifactRepository artifactRepository )
+        throws TransferFailedException, ResourceDoesNotExistException
+    {
+        //To change body of implemented methods use File | Settings | File Templates.
+    }
+
+    public void putArtifact( File file, Artifact artifact, ArtifactRepository artifactRepository )
+        throws TransferFailedException
+    {
+        //To change body of implemented methods use File | Settings | File Templates.
+    }
+
+    public void putArtifactMetadata( File file, ArtifactMetadata artifactMetadata,
+                                     ArtifactRepository artifactRepository )
+        throws TransferFailedException
+    {
+        //To change body of implemented methods use File | Settings | File Templates.
+    }
+
+    public void getArtifactMetadata( ArtifactMetadata artifactMetadata, ArtifactRepository artifactRepository,
+                                     File file, String string )
+        throws TransferFailedException, ResourceDoesNotExistException
+    {
+        //To change body of implemented methods use File | Settings | File Templates.
+    }
+
+    public void setOnline( boolean b )
+    {
+        //To change body of implemented methods use File | Settings | File Templates.
+    }
+
+    public boolean isOnline()
+    {
+        return false;  //To change body of implemented methods use File | Settings | File Templates.
+    }
+
+    public void addProxy( String string, String string1, int i, String string2, String string3, String string4 )
+    {
+        //To change body of implemented methods use File | Settings | File Templates.
+    }
+
+    public void addAuthenticationInfo( String string, String string1, String string2, String string3, String string4 )
+    {
+        //To change body of implemented methods use File | Settings | File Templates.
+    }
+
+    public void addMirror( String string, String string1, String string2 )
+    {
+        //To change body of implemented methods use File | Settings | File Templates.
+    }
+
+    public void setDownloadMonitor( TransferListener transferListener )
+    {
+        //To change body of implemented methods use File | Settings | File Templates.
+    }
+
+    public void addPermissionInfo( String string, String string1, String string2 )
+    {
+        //To change body of implemented methods use File | Settings | File Templates.
+    }
+
+    public ProxyInfo getProxy( String string )
+    {
+        return null;  //To change body of implemented methods use File | Settings | File Templates.
+    }
+
+    public AuthenticationInfo getAuthenticationInfo( String string )
+    {
+        return null;  //To change body of implemented methods use File | Settings | File Templates.
+    }
+
+    public void addConfiguration( String string, Xpp3Dom xpp3Dom )
+    {
+        //To change body of implemented methods use File | Settings | File Templates.
+    }
+
+    public void setInteractive( boolean b )
+    {
+        //To change body of implemented methods use File | Settings | File Templates.
+    }
+
+    public void registerWagons( Collection collection, PlexusContainer plexusContainer )
+    {
+        //To change body of implemented methods use File | Settings | File Templates.
+    }
+
+    public void findAndRegisterWagons( PlexusContainer plexusContainer )
+    {
+        //To change body of implemented methods use File | Settings | File Templates.
+    }
+
+    public void setDefaultRepositoryPermissions( RepositoryPermissions repositoryPermissions )
+    {
+        //To change body of implemented methods use File | Settings | File Templates.
+    }
+
+    protected void setBaseDir( File basedir )
+    {
+        this.basedir = basedir;
+    }
+}

Propchange: incubator/nmaven/trunk/components/dotnet-repository/src/test/java/org/apache/maven/dotnet/repository/impl/WagonManagerTestStub.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/nmaven/trunk/components/dotnet-repository/src/test/resources/NMaven-NMaven.Test-1.0.xml
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/components/dotnet-repository/src/test/resources/NMaven-NMaven.Test-1.0.xml?view=auto&rev=559955
==============================================================================
--- incubator/nmaven/trunk/components/dotnet-repository/src/test/resources/NMaven-NMaven.Test-1.0.xml (added)
+++ incubator/nmaven/trunk/components/dotnet-repository/src/test/resources/NMaven-NMaven.Test-1.0.xml Thu Jul 26 12:46:41 2007
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?><!--
+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.
+-->
+<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">
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>NMaven</groupId>
+  <artifactId>NMaven.Test</artifactId>
+  <version>1.0</version>
+  <name>NMaven.Test</name>
+</project>
\ No newline at end of file

Propchange: incubator/nmaven/trunk/components/dotnet-repository/src/test/resources/NMaven-NMaven.Test-1.0.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/nmaven/trunk/components/dotnet-repository/src/test/resources/uac/gac_msil/NMaven.Model.Pom/1.0__NMaven.Model/NMaven.Model.Pom.dll
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/components/dotnet-repository/src/test/resources/uac/gac_msil/NMaven.Model.Pom/1.0__NMaven.Model/NMaven.Model.Pom.dll?view=auto&rev=559955
==============================================================================
Binary file - no diff available.

Propchange: incubator/nmaven/trunk/components/dotnet-repository/src/test/resources/uac/gac_msil/NMaven.Model.Pom/1.0__NMaven.Model/NMaven.Model.Pom.dll
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/nmaven/trunk/components/dotnet-repository/src/test/resources/uac/gac_msil/NMaven.Test/1.0__NMaven/NMaven.Test.dll
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/components/dotnet-repository/src/test/resources/uac/gac_msil/NMaven.Test/1.0__NMaven/NMaven.Test.dll?view=auto&rev=559955
==============================================================================
Binary file - no diff available.

Propchange: incubator/nmaven/trunk/components/dotnet-repository/src/test/resources/uac/gac_msil/NMaven.Test/1.0__NMaven/NMaven.Test.dll
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream



Mime
View raw message