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 [2/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
Modified: incubator/nmaven/trunk/maven-dotnet.iml
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/maven-dotnet.iml?view=diff&rev=559955&r1=559954&r2=559955
==============================================================================
--- incubator/nmaven/trunk/maven-dotnet.iml (original)
+++ incubator/nmaven/trunk/maven-dotnet.iml Thu Jul 26 12:46:41 2007
@@ -74,6 +74,7 @@
       <sourceFolder url="file://$MODULE_DIR$/plugins/maven-mojo-generator-plugin/src/main/java"
isTestSource="false" />
       <sourceFolder url="file://$MODULE_DIR$/plugins/maven-ncover-plugin/src/main/java"
isTestSource="false" />
       <sourceFolder url="file://$MODULE_DIR$/plugins/maven-release-plugin/src/main/java"
isTestSource="false" />
+      <sourceFolder url="file://$MODULE_DIR$/plugins/maven-repository-plugin/src/main/java"
isTestSource="false" />
       <sourceFolder url="file://$MODULE_DIR$/plugins/maven-resgen-plugin/src/main/java"
isTestSource="false" />
       <sourceFolder url="file://$MODULE_DIR$/plugins/maven-resolver-plugin/src/main/java"
isTestSource="false" />
       <sourceFolder url="file://$MODULE_DIR$/plugins/maven-sandcastle-plugin/src/main/java"
isTestSource="false" />
@@ -701,6 +702,24 @@
       <library>
         <CLASSES>
           <root url="jar://$localRepository$/info/aduna/aduna-iteration/1.1/aduna-iteration-1.1.jar!/"
/>
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library">
+      <library>
+        <CLASSES>
+          <root url="jar://$localRepository$/org/openrdf/openrdf-rio-api/2.0-beta5/openrdf-rio-api-2.0-beta5.jar!/"
/>
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library">
+      <library>
+        <CLASSES>
+          <root url="jar://$localRepository$/org/openrdf/openrdf-rio-rdfxml/2.0-beta5/openrdf-rio-rdfxml-2.0-beta5.jar!/"
/>
         </CLASSES>
         <JAVADOC />
         <SOURCES />

Modified: incubator/nmaven/trunk/plugins/maven-compile-plugin/src/main/java/org/apache/maven/dotnet/plugin/compile/CompilerMojo.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/plugins/maven-compile-plugin/src/main/java/org/apache/maven/dotnet/plugin/compile/CompilerMojo.java?view=diff&rev=559955&r1=559954&r2=559955
==============================================================================
--- incubator/nmaven/trunk/plugins/maven-compile-plugin/src/main/java/org/apache/maven/dotnet/plugin/compile/CompilerMojo.java
(original)
+++ incubator/nmaven/trunk/plugins/maven-compile-plugin/src/main/java/org/apache/maven/dotnet/plugin/compile/CompilerMojo.java
Thu Jul 26 12:46:41 2007
@@ -23,21 +23,15 @@
 
 import org.apache.maven.project.MavenProject;
 import org.apache.maven.dotnet.PlatformUnsupportedException;
-import org.apache.maven.dotnet.artifact.ArtifactType;
+import org.apache.maven.dotnet.ArtifactType;
 import org.apache.maven.dotnet.executable.ExecutionException;
 import org.apache.maven.dotnet.vendor.VendorFactory;
 import org.apache.maven.dotnet.executable.compiler.*;
 import org.apache.maven.artifact.Artifact;
-import org.codehaus.plexus.util.FileUtils;
-import org.codehaus.plexus.util.DirectoryScanner;
 
 import java.util.ArrayList;
-import java.util.List;
 import java.util.Set;
-import java.util.Date;
-import java.util.Calendar;
 import java.io.File;
-import java.io.FilenameFilter;
 
 /**
  * Maven Mojo for compiling Class files to the .NET Intermediate Language.

Modified: incubator/nmaven/trunk/plugins/maven-compile-plugin/src/main/java/org/apache/maven/dotnet/plugin/compile/ComponentInitializerMojo.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/plugins/maven-compile-plugin/src/main/java/org/apache/maven/dotnet/plugin/compile/ComponentInitializerMojo.java?view=diff&rev=559955&r1=559954&r2=559955
==============================================================================
--- incubator/nmaven/trunk/plugins/maven-compile-plugin/src/main/java/org/apache/maven/dotnet/plugin/compile/ComponentInitializerMojo.java
(original)
+++ incubator/nmaven/trunk/plugins/maven-compile-plugin/src/main/java/org/apache/maven/dotnet/plugin/compile/ComponentInitializerMojo.java
Thu Jul 26 12:46:41 2007
@@ -97,22 +97,6 @@
         {
             localRepository = new File( System.getProperty( "user.home" ), ".m2/repository"
);
         }
-/*
-        for(String id : daoRegistry.getDaoIds())
-        {
-            System.out.println("ID = " + id);
-        }
- */
-        /*
-        ProjectDao dao = (ProjectDao) daoRegistry.find( "dao:project");
-        Project p = dao.getProjectFor( "NMaven.Model", "NMaven.Pom.Model", "1.1");
-        Set<ProjectDependency> ps = p.getProjectDependencies();
-        System.out.println("Size PS = " + ps.size());
-        for(ProjectDependency p1 : ps)
-        {
-            System.out.println(p1.getArtifactId());
-        }
-*/
 
         try
         {

Modified: incubator/nmaven/trunk/plugins/maven-compile-plugin/src/main/java/org/apache/maven/dotnet/plugin/compile/TestCompilerMojo.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/plugins/maven-compile-plugin/src/main/java/org/apache/maven/dotnet/plugin/compile/TestCompilerMojo.java?view=diff&rev=559955&r1=559954&r2=559955
==============================================================================
--- incubator/nmaven/trunk/plugins/maven-compile-plugin/src/main/java/org/apache/maven/dotnet/plugin/compile/TestCompilerMojo.java
(original)
+++ incubator/nmaven/trunk/plugins/maven-compile-plugin/src/main/java/org/apache/maven/dotnet/plugin/compile/TestCompilerMojo.java
Thu Jul 26 12:46:41 2007
@@ -23,7 +23,7 @@
 import org.apache.maven.project.MavenProject;
 import org.codehaus.plexus.util.FileUtils;
 import org.apache.maven.dotnet.PlatformUnsupportedException;
-import org.apache.maven.dotnet.artifact.ArtifactType;
+import org.apache.maven.dotnet.ArtifactType;
 import org.apache.maven.dotnet.executable.ExecutionException;
 import org.apache.maven.dotnet.vendor.VendorFactory;
 import org.apache.maven.dotnet.executable.compiler.*;

Modified: incubator/nmaven/trunk/plugins/maven-fxcop-plugin/src/main/java/org/apache/maven/dotnet/plugin/fxcop/FxCopAggregateMojo.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/plugins/maven-fxcop-plugin/src/main/java/org/apache/maven/dotnet/plugin/fxcop/FxCopAggregateMojo.java?view=diff&rev=559955&r1=559954&r2=559955
==============================================================================
--- incubator/nmaven/trunk/plugins/maven-fxcop-plugin/src/main/java/org/apache/maven/dotnet/plugin/fxcop/FxCopAggregateMojo.java
(original)
+++ incubator/nmaven/trunk/plugins/maven-fxcop-plugin/src/main/java/org/apache/maven/dotnet/plugin/fxcop/FxCopAggregateMojo.java
Thu Jul 26 12:46:41 2007
@@ -4,7 +4,7 @@
 import org.apache.maven.plugin.MojoExecutionException;
 import org.apache.maven.project.MavenProject;
 import org.apache.maven.dotnet.artifact.AssemblyResolver;
-import org.apache.maven.dotnet.artifact.ArtifactType;
+import org.apache.maven.dotnet.ArtifactType;
 import org.apache.maven.dotnet.executable.ExecutionException;
 import org.apache.maven.dotnet.PlatformUnsupportedException;
 import org.apache.maven.artifact.resolver.ArtifactResolutionException;

Modified: incubator/nmaven/trunk/plugins/maven-fxcop-plugin/src/main/java/org/apache/maven/dotnet/plugin/fxcop/FxCopMojo.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/plugins/maven-fxcop-plugin/src/main/java/org/apache/maven/dotnet/plugin/fxcop/FxCopMojo.java?view=diff&rev=559955&r1=559954&r2=559955
==============================================================================
--- incubator/nmaven/trunk/plugins/maven-fxcop-plugin/src/main/java/org/apache/maven/dotnet/plugin/fxcop/FxCopMojo.java
(original)
+++ incubator/nmaven/trunk/plugins/maven-fxcop-plugin/src/main/java/org/apache/maven/dotnet/plugin/fxcop/FxCopMojo.java
Thu Jul 26 12:46:41 2007
@@ -4,8 +4,8 @@
 import org.apache.maven.plugin.MojoExecutionException;
 import org.apache.maven.dotnet.executable.ExecutionException;
 import org.apache.maven.dotnet.PlatformUnsupportedException;
+import org.apache.maven.dotnet.ArtifactType;
 import org.apache.maven.dotnet.artifact.AssemblyResolver;
-import org.apache.maven.dotnet.artifact.ArtifactType;
 import org.apache.maven.project.MavenProject;
 import org.apache.maven.artifact.resolver.ArtifactResolutionException;
 import org.apache.maven.artifact.resolver.ArtifactNotFoundException;

Modified: incubator/nmaven/trunk/plugins/maven-install-plugin/src/main/java/org/apache/maven/dotnet/plugin/install/InstallerMojo.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/plugins/maven-install-plugin/src/main/java/org/apache/maven/dotnet/plugin/install/InstallerMojo.java?view=diff&rev=559955&r1=559954&r2=559955
==============================================================================
--- incubator/nmaven/trunk/plugins/maven-install-plugin/src/main/java/org/apache/maven/dotnet/plugin/install/InstallerMojo.java
(original)
+++ incubator/nmaven/trunk/plugins/maven-install-plugin/src/main/java/org/apache/maven/dotnet/plugin/install/InstallerMojo.java
Thu Jul 26 12:46:41 2007
@@ -27,14 +27,14 @@
 import org.apache.maven.artifact.factory.ArtifactFactory;
 import org.apache.maven.artifact.repository.ArtifactRepository;
 import org.apache.maven.dotnet.artifact.ArtifactContext;
-import org.apache.maven.dotnet.artifact.ArtifactType;
+import org.apache.maven.dotnet.ArtifactType;
 import org.apache.maven.dotnet.artifact.PathUtil;
 import org.apache.maven.dotnet.artifact.ApplicationConfig;
 import org.apache.maven.dotnet.executable.NetExecutable;
 import org.apache.maven.dotnet.executable.ExecutionException;
 import org.apache.maven.dotnet.PlatformUnsupportedException;
-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.dotnet.dao.ProjectDao;
 import org.apache.maven.model.Dependency;
 

Modified: incubator/nmaven/trunk/plugins/maven-repository-plugin/pom.xml
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/plugins/maven-repository-plugin/pom.xml?view=diff&rev=559955&r1=559954&r2=559955
==============================================================================
--- incubator/nmaven/trunk/plugins/maven-repository-plugin/pom.xml (original)
+++ incubator/nmaven/trunk/plugins/maven-repository-plugin/pom.xml Thu Jul 26 12:46:41 2007
@@ -37,5 +37,10 @@
       <artifactId>plexus-archiver</artifactId>
       <version>1.0-alpha-3</version>
     </dependency>
+    <dependency>
+      <groupId>org.apache.maven.dotnet</groupId>
+      <artifactId>dotnet-repository</artifactId>
+      <version>0.14</version>
+    </dependency>
   </dependencies>
 </project>

Modified: incubator/nmaven/trunk/plugins/maven-repository-plugin/src/main/java/org/apache/maven/dotnet/plugin/repository/RepositoryAssemblerMojo.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/plugins/maven-repository-plugin/src/main/java/org/apache/maven/dotnet/plugin/repository/RepositoryAssemblerMojo.java?view=diff&rev=559955&r1=559954&r2=559955
==============================================================================
--- incubator/nmaven/trunk/plugins/maven-repository-plugin/src/main/java/org/apache/maven/dotnet/plugin/repository/RepositoryAssemblerMojo.java
(original)
+++ incubator/nmaven/trunk/plugins/maven-repository-plugin/src/main/java/org/apache/maven/dotnet/plugin/repository/RepositoryAssemblerMojo.java
Thu Jul 26 12:46:41 2007
@@ -3,37 +3,25 @@
 import org.apache.maven.plugin.AbstractMojo;
 import org.apache.maven.plugin.MojoExecutionException;
 import org.apache.maven.plugin.MojoFailureException;
-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.repository.layout.DefaultRepositoryLayout;
 import org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout;
-import org.apache.maven.artifact.resolver.ArtifactResolutionException;
-import org.apache.maven.artifact.resolver.ArtifactNotFoundException;
 import org.apache.maven.artifact.Artifact;
 import org.apache.maven.artifact.factory.ArtifactFactory;
-import org.apache.maven.artifact.metadata.ArtifactMetadata;
-import org.apache.maven.artifact.deployer.ArtifactDeploymentException;
 import org.apache.maven.artifact.deployer.ArtifactDeployer;
 import org.apache.maven.dotnet.artifact.AssemblyResolver;
-import org.apache.maven.dotnet.artifact.ArtifactType;
-import org.apache.maven.dotnet.artifact.AssemblyRepositoryLayout;
 import org.apache.maven.dotnet.artifact.ArtifactContext;
-import org.apache.maven.dotnet.registry.RepositoryRegistry;
+import org.apache.maven.dotnet.repository.RepositoryConverter;
 import org.apache.maven.project.MavenProject;
-import org.apache.maven.project.artifact.ProjectArtifactMetadata;
-import org.apache.maven.model.Dependency;
 import org.apache.maven.model.Model;
 import org.apache.maven.model.Parent;
 import org.apache.maven.model.io.xpp3.MavenXpp3Reader;
 import org.codehaus.plexus.util.FileUtils;
 import org.codehaus.plexus.util.xml.pull.XmlPullParserException;
-import org.codehaus.plexus.archiver.tar.TarArchiver;
-import org.codehaus.plexus.archiver.ArchiverException;
+import org.openrdf.repository.sail.SailRepository;
+import org.openrdf.repository.RepositoryException;
+import org.openrdf.sail.memory.MemoryStore;
 
 import java.util.Set;
-import java.util.List;
-import java.util.ArrayList;
 import java.util.HashSet;
 import java.io.File;
 import java.io.IOException;
@@ -59,7 +47,7 @@
      * @parameter expression="${settings.localRepository}"
      * @readonly
      */
-    private String localRepository;
+    private File localRepository;
 
     /**
      * @component
@@ -93,135 +81,164 @@
      */
     private ArtifactContext artifactContext;
 
+
+    /**
+     * @component
+     */
+    private RepositoryConverter repositoryConverter;
+
     public void execute()
         throws MojoExecutionException, MojoFailureException
     {
-        RepositoryRegistry repositoryRegistry;
+        File dataDir = new File( localRepository.getParentFile(), "/uac/rdfRepository" );
+        org.openrdf.repository.Repository rdfRepository = new SailRepository( new MemoryStore(
dataDir ) );
+        try
+        {
+            rdfRepository.initialize();
+        }
+        catch ( RepositoryException e )
+        {
+
+        }
+
         try
         {
-            repositoryRegistry = nmavenRegistry.createRepositoryRegistry();
+            repositoryConverter.convert( rdfRepository, localRepository );
         }
         catch ( IOException e )
         {
-            throw new MojoExecutionException(
-                "NMAVEN-1600-000: Failed to create the repository registry for this plugin",
e );
+            e.printStackTrace();
         }
+/*
+RepositoryRegistry repositoryRegistry;
+try
+{
+    repositoryRegistry = nmavenRegistry.createRepositoryRegistry();
+}
+catch ( IOException e )
+{
+    throw new MojoExecutionException(
+        "NMAVEN-1600-000: Failed to create the repository registry for this plugin", e );
+}
 
-        artifactContext.init( project, project.getRemoteArtifactRepositories(), new File(
localRepository ) );
+artifactContext.init( project, project.getRemoteArtifactRepositories(), new File( localRepository
) );
 
-        List<Dependency> javaDependencies = new ArrayList<Dependency>();
-        List<Dependency> netDependencies = new ArrayList<Dependency>();
 
-        for ( Dependency dependency : (List<Dependency>) project.getDependencies()
)
-        {
-            if ( !dependency.getType().equals( ArtifactType.LIBRARY.getTargetCompileType()
) &&
-                !dependency.getType().equals( ArtifactType.NETPLUGIN.getPackagingType() )
&&
-                !dependency.getType().equals( ArtifactType.EXE.getTargetCompileType() ) &&
-                !dependency.getType().equals( ArtifactType.EXECONFIG.getTargetCompileType()
) &&
-                !dependency.getType().equals( ArtifactType.MODULE.getTargetCompileType()
) &&
-                !dependency.getType().equals( ArtifactType.NAR.getTargetCompileType() ) &&
-                !dependency.getType().equals( ArtifactType.VISUAL_STUDIO_ADDIN.getTargetCompileType()
) &&
-                !dependency.getType().equals( ArtifactType.WINEXE.getTargetCompileType()
) )
-            {
-                javaDependencies.add( dependency );
-            }
-            else
-            {
-                netDependencies.add( dependency );
-            }
-        }
 
-        assemblyRepository( javaDependencies, new DefaultRepositoryLayout() );
-        assemblyRepository( netDependencies, new AssemblyRepositoryLayout() );
-    }
+List<Dependency> javaDependencies = new ArrayList<Dependency>();
+List<Dependency> netDependencies = new ArrayList<Dependency>();
 
-    public void assemblyRepository( List<Dependency> dependencies, ArtifactRepositoryLayout
layout )
-        throws MojoExecutionException, MojoFailureException
+for ( Dependency dependency : (List<Dependency>) project.getDependencies() )
+{
+    if ( !dependency.getType().equals( ArtifactType.LIBRARY.getTargetCompileType() ) &&
+        !dependency.getType().equals( ArtifactType.NETPLUGIN.getPackagingType() ) &&
+        !dependency.getType().equals( ArtifactType.EXE.getTargetCompileType() ) &&
+        !dependency.getType().equals( ArtifactType.EXECONFIG.getTargetCompileType() ) &&
+        !dependency.getType().equals( ArtifactType.MODULE.getTargetCompileType() ) &&
+        !dependency.getType().equals( ArtifactType.NAR.getTargetCompileType() ) &&
+        !dependency.getType().equals( ArtifactType.VISUAL_STUDIO_ADDIN.getTargetCompileType()
) &&
+        !dependency.getType().equals( ArtifactType.WINEXE.getTargetCompileType() ) )
     {
-        if ( dependencies.size() == 0 )
-        {
-            return;
-        }
+        javaDependencies.add( dependency );
+    }
+    else
+    {
+        netDependencies.add( dependency );
+    }
+}
 
-        ArtifactRepository localArtifactRepository =
-            new DefaultArtifactRepository( "local", "file://" + localRepository, layout );
-        ArtifactRepository deploymentRepository = repositoryFactory.createDeploymentArtifactRepository(
null,
-                                                                                        
               "file://" +
-                                                                                        
                   project.getBuild().getDirectory() +
-                                                                                        
                   "/archive-tmp/repository/releases",
-                                                                                        
               layout, true );
+assemblyRepository( javaDependencies, new DefaultRepositoryLayout() );
+assemblyRepository( netDependencies, new AssemblyRepositoryLayout() );
+}
 
-        try
-        {
-            assemblyResolver.resolveTransitivelyFor( project, project.getArtifact(), dependencies,
-                                                     project.getRemoteArtifactRepositories(),
localArtifactRepository,
-                                                     true );
-        }
-        catch ( ArtifactResolutionException e )
-        {
-            throw new MojoExecutionException( "NMAVEN-901-000: Unable to resolve assemblies",
e );
-        }
-        catch ( ArtifactNotFoundException e )
-        {
-            throw new MojoExecutionException( "NMAVEN-901-001: Unable to resolve assemblies",
e );
-        }
+public void assemblyRepository( List<Dependency> dependencies, ArtifactRepositoryLayout
layout )
+throws MojoExecutionException, MojoFailureException
+{
+if ( dependencies.size() == 0 )
+{
+    return;
+}
 
-        for ( Artifact artifact : (Set<Artifact>) project.getDependencyArtifacts()
)
-        {
-            Set<Artifact> pomParentArtifacts = getPomArtifactsFor( artifact.getGroupId(),
artifact.getArtifactId(),
-                                                                   artifact.getVersion(),
layout, true );
-            Set<Artifact> pomArtifacts = getPomArtifactsFor( artifact.getGroupId(),
artifact.getArtifactId(),
-                                                             artifact.getVersion(), layout,
false );
-            if ( pomArtifacts.size() == 1 )
-            {
-                ArtifactMetadata metadata =
-                    new ProjectArtifactMetadata( artifact, pomArtifacts.toArray( new Artifact[1]
)[0].getFile() );
-                artifact.addMetadata( metadata );
-            }
-
-            try
-            {
-                artifactDeployer.deploy( artifact.getFile(), artifact, deploymentRepository,
localArtifactRepository );
-                //Deploy parent poms
-                for ( Artifact pomArtifact : pomParentArtifacts )
-                {
-                    artifactDeployer.deploy( pomArtifact.getFile(), pomArtifact, deploymentRepository,
-                                             localArtifactRepository );
-                }
-            }
-            catch ( ArtifactDeploymentException e )
-            {
-                throw new MojoExecutionException( "NMAVEN-DEPLOY: Deploy Failed", e );
-            }
-        }
+ArtifactRepository localArtifactRepository =
+    new DefaultArtifactRepository( "local", "file://" + localRepository, layout );
+ArtifactRepository deploymentRepository = repositoryFactory.createDeploymentArtifactRepository(
null,
+                                                                                        
       "file://" +
+                                                                                        
           project.getBuild().getDirectory() +
+                                                                                        
           "/archive-tmp/repository/releases",
+                                                                                        
       layout, true );
 
-        TarArchiver tarArchiver = new TarArchiver();
-        try
-        {
-            tarArchiver.addDirectory( new File( project.getBuild().getDirectory(), "/archive-tmp/repository/releases"
) );
-        }
-        catch ( ArchiverException e )
-        {
-            throw new MojoExecutionException( "", e );
-        }
+try
+{
+    assemblyResolver.resolveTransitivelyFor( project, project.getArtifact(), dependencies,
+                                             project.getRemoteArtifactRepositories(), localArtifactRepository,
+                                             true );
+}
+catch ( ArtifactResolutionException e )
+{
+    throw new MojoExecutionException( "NMAVEN-901-000: Unable to resolve assemblies", e );
+}
+catch ( ArtifactNotFoundException e )
+{
+    throw new MojoExecutionException( "NMAVEN-901-001: Unable to resolve assemblies", e );
+}
 
-        TarArchiver.TarCompressionMethod tarCompressionMethod = new TarArchiver.TarCompressionMethod();
-        tarArchiver.setDestFile( new File( project.getBuild().getDirectory(), project.getArtifactId()
+ ".tar.gz" ) );
-        try
-        {
-            tarCompressionMethod.setValue( "gzip" );
-            tarArchiver.setCompression( tarCompressionMethod );
-            tarArchiver.setIncludeEmptyDirs( false );
-            tarArchiver.createArchive();
-        }
-        catch ( ArchiverException e )
-        {
-            throw new MojoExecutionException( "", e );
-        }
-        catch ( IOException e )
+for ( Artifact artifact : (Set<Artifact>) project.getDependencyArtifacts() )
+{
+    Set<Artifact> pomParentArtifacts = getPomArtifactsFor( artifact.getGroupId(), artifact.getArtifactId(),
+                                                           artifact.getVersion(), layout,
true );
+    Set<Artifact> pomArtifacts = getPomArtifactsFor( artifact.getGroupId(), artifact.getArtifactId(),
+                                                     artifact.getVersion(), layout, false
);
+    if ( pomArtifacts.size() == 1 )
+    {
+        ArtifactMetadata metadata =
+            new ProjectArtifactMetadata( artifact, pomArtifacts.toArray( new Artifact[1]
)[0].getFile() );
+        artifact.addMetadata( metadata );
+    }
+
+    try
+    {
+        artifactDeployer.deploy( artifact.getFile(), artifact, deploymentRepository, localArtifactRepository
);
+        //Deploy parent poms
+        for ( Artifact pomArtifact : pomParentArtifacts )
         {
-            throw new MojoExecutionException( "", e );
+            artifactDeployer.deploy( pomArtifact.getFile(), pomArtifact, deploymentRepository,
+                                     localArtifactRepository );
         }
+    }
+    catch ( ArtifactDeploymentException e )
+    {
+        throw new MojoExecutionException( "NMAVEN-DEPLOY: Deploy Failed", e );
+    }
+}
+
+TarArchiver tarArchiver = new TarArchiver();
+try
+{
+    tarArchiver.addDirectory( new File( project.getBuild().getDirectory(), "/archive-tmp/repository/releases"
) );
+}
+catch ( ArchiverException e )
+{
+    throw new MojoExecutionException( "", e );
+}
+
+TarArchiver.TarCompressionMethod tarCompressionMethod = new TarArchiver.TarCompressionMethod();
+tarArchiver.setDestFile( new File( project.getBuild().getDirectory(), project.getArtifactId()
+ ".tar.gz" ) );
+try
+{
+    tarCompressionMethod.setValue( "gzip" );
+    tarArchiver.setCompression( tarCompressionMethod );
+    tarArchiver.setIncludeEmptyDirs( false );
+    tarArchiver.createArchive();
+}
+catch ( ArchiverException e )
+{
+    throw new MojoExecutionException( "", e );
+}
+catch ( IOException e )
+{
+    throw new MojoExecutionException( "", e );
+}
+*/
     }
 
     private Set<Artifact> getPomArtifactsFor( String groupId, String artifactId, String
version,

Added: incubator/nmaven/trunk/plugins/maven-repository-plugin/src/main/java/org/apache/maven/dotnet/plugin/repository/RepositoryRdfExporterMojo.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/plugins/maven-repository-plugin/src/main/java/org/apache/maven/dotnet/plugin/repository/RepositoryRdfExporterMojo.java?view=auto&rev=559955
==============================================================================
--- incubator/nmaven/trunk/plugins/maven-repository-plugin/src/main/java/org/apache/maven/dotnet/plugin/repository/RepositoryRdfExporterMojo.java
(added)
+++ incubator/nmaven/trunk/plugins/maven-repository-plugin/src/main/java/org/apache/maven/dotnet/plugin/repository/RepositoryRdfExporterMojo.java
Thu Jul 26 12:46:41 2007
@@ -0,0 +1,70 @@
+package org.apache.maven.dotnet.plugin.repository;
+
+import org.apache.maven.plugin.AbstractMojo;
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugin.MojoFailureException;
+import org.openrdf.rio.RDFHandler;
+import org.openrdf.rio.RDFHandlerException;
+import org.openrdf.rio.rdfxml.RDFXMLWriter;
+import org.openrdf.repository.RepositoryException;
+import org.openrdf.repository.RepositoryConnection;
+import org.openrdf.repository.sail.SailRepository;
+import org.openrdf.sail.memory.MemoryStore;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+
+/**
+ * @goal export-rdf
+ */
+public class RepositoryRdfExporterMojo
+    extends AbstractMojo
+{
+    /**
+     * @parameter expression="${settings.localRepository}"
+     * @readonly
+     */
+    private File localRepository;
+
+    public void execute()
+        throws MojoExecutionException, MojoFailureException
+    {
+        File dataDir = new File( localRepository.getParentFile(), "/uac/rdfRepository" );
+        org.openrdf.repository.Repository rdfRepository = new SailRepository( new MemoryStore(
dataDir ) );
+        try
+        {
+            rdfRepository.initialize();
+        }
+        catch ( RepositoryException e )
+        {
+            throw new MojoExecutionException( e.getMessage() );
+        }
+
+        RDFHandler rdfxmlWriter;
+        try
+        {
+            File exportFile = new File( localRepository.getParentFile(), "/uac/rdfRepository/rdf-repository-export.xml"
);
+            rdfxmlWriter = new RDFXMLWriter( new FileOutputStream( exportFile ) );
+        }
+        catch ( IOException e )
+        {
+            throw new MojoExecutionException( e.getMessage() );
+        }
+
+        try
+        {
+            RepositoryConnection repositoryConnection = rdfRepository.getConnection();
+            repositoryConnection.export( rdfxmlWriter );
+        }
+        catch ( RepositoryException e )
+        {
+            throw new MojoExecutionException( e.getMessage() );
+        }
+        catch ( RDFHandlerException e )
+        {
+            throw new MojoExecutionException( e.getMessage() );
+        }
+    }
+}

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

Modified: incubator/nmaven/trunk/plugins/pom.xml
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/plugins/pom.xml?view=diff&rev=559955&r1=559954&r2=559955
==============================================================================
--- incubator/nmaven/trunk/plugins/pom.xml (original)
+++ incubator/nmaven/trunk/plugins/pom.xml Thu Jul 26 12:46:41 2007
@@ -43,6 +43,7 @@
     <module>maven-link-plugin</module>
     <module>maven-mojo-generator-plugin</module>
     <module>maven-resgen-plugin</module>
+    <module>maven-repository-plugin</module>    
     <module>maven-resolver-plugin</module>
     <module>maven-test-plugin</module>
     <module>maven-vsinstaller-plugin</module>



Mime
View raw message