maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bentm...@apache.org
Subject svn commit: r992089 - in /maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven: DefaultMaven.java execution/DefaultMavenExecutionRequest.java execution/MavenExecutionRequest.java repository/DelegatingLocalArtifactRepository.java
Date Thu, 02 Sep 2010 19:55:30 GMT
Author: bentmann
Date: Thu Sep  2 19:55:29 2010
New Revision: 992089

URL: http://svn.apache.org/viewvc?rev=992089&view=rev
Log:
o Allow caller to specify per-request workspace reader for Maven execution

Modified:
    maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/DefaultMaven.java
    maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/execution/DefaultMavenExecutionRequest.java
    maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/execution/MavenExecutionRequest.java
    maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/repository/DelegatingLocalArtifactRepository.java

Modified: maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/DefaultMaven.java
URL: http://svn.apache.org/viewvc/maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/DefaultMaven.java?rev=992089&r1=992088&r2=992089&view=diff
==============================================================================
--- maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/DefaultMaven.java (original)
+++ maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/DefaultMaven.java Thu Sep
 2 19:55:29 2010
@@ -353,7 +353,14 @@ public class DefaultMaven
         LocalRepository localRepo = new LocalRepository( request.getLocalRepository().getBasedir()
);
         session.setLocalRepositoryManager( repoSystem.newLocalRepositoryManager( localRepo
) );
 
-        session.setWorkspaceReader( workspaceRepository );
+        if ( request.getWorkspaceReader() != null )
+        {
+            session.setWorkspaceReader( request.getWorkspaceReader() );
+        }
+        else
+        {
+            session.setWorkspaceReader( workspaceRepository );
+        }
 
         DefaultSettingsDecryptionRequest decrypt = new DefaultSettingsDecryptionRequest();
         decrypt.setProxies( request.getProxies() );

Modified: maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/execution/DefaultMavenExecutionRequest.java
URL: http://svn.apache.org/viewvc/maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/execution/DefaultMavenExecutionRequest.java?rev=992089&r1=992088&r2=992089&view=diff
==============================================================================
--- maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/execution/DefaultMavenExecutionRequest.java
(original)
+++ maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/execution/DefaultMavenExecutionRequest.java
Thu Sep  2 19:55:29 2010
@@ -33,6 +33,7 @@ import org.apache.maven.settings.Mirror;
 import org.apache.maven.settings.Proxy;
 import org.apache.maven.settings.Server;
 import org.sonatype.aether.RepositoryCache;
+import org.sonatype.aether.repository.WorkspaceReader;
 import org.sonatype.aether.transfer.TransferListener;
 import org.sonatype.aether.util.DefaultRepositoryCache;
 
@@ -45,6 +46,8 @@ public class DefaultMavenExecutionReques
 
     private RepositoryCache repositoryCache = new DefaultRepositoryCache();
 
+    private WorkspaceReader workspaceReader;
+
     private ArtifactRepository localRepository;
 
     private File localRepositoryPath;
@@ -173,6 +176,7 @@ public class DefaultMavenExecutionReques
         copy.setRemoteRepositories( original.getRemoteRepositories() );
         copy.setPluginArtifactRepositories( original.getPluginArtifactRepositories() );
         copy.setRepositoryCache( original.getRepositoryCache() );
+        copy.setWorkspaceReader( original.getWorkspaceReader() );
         copy.setNoSnapshotUpdates( original.isNoSnapshotUpdates() );
         copy.setExecutionListener( original.getExecutionListener() );
         return copy;
@@ -1038,4 +1042,15 @@ public class DefaultMavenExecutionReques
         this.perCoreThreadCount = perCoreThreadCount;
     }
 
+    public WorkspaceReader getWorkspaceReader()
+    {
+        return workspaceReader;
+    }
+
+    public MavenExecutionRequest setWorkspaceReader( WorkspaceReader workspaceReader )
+    {
+        this.workspaceReader = workspaceReader;
+        return this;
+    }
+
 }

Modified: maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/execution/MavenExecutionRequest.java
URL: http://svn.apache.org/viewvc/maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/execution/MavenExecutionRequest.java?rev=992089&r1=992088&r2=992089&view=diff
==============================================================================
--- maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/execution/MavenExecutionRequest.java
(original)
+++ maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/execution/MavenExecutionRequest.java
Thu Sep  2 19:55:29 2010
@@ -33,6 +33,7 @@ import org.apache.maven.settings.Proxy;
 import org.apache.maven.settings.Server;
 import org.codehaus.plexus.logging.Logger;
 import org.sonatype.aether.RepositoryCache;
+import org.sonatype.aether.repository.WorkspaceReader;
 import org.sonatype.aether.transfer.TransferListener;
 
 /**
@@ -266,6 +267,9 @@ public interface MavenExecutionRequest
     MavenExecutionRequest setRepositoryCache( RepositoryCache repositoryCache );
     RepositoryCache getRepositoryCache();
 
+    WorkspaceReader getWorkspaceReader();
+    MavenExecutionRequest setWorkspaceReader( WorkspaceReader workspaceReader );
+
     File getUserToolchainsFile();
     MavenExecutionRequest setUserToolchainsFile( File userToolchainsFile );
 

Modified: maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/repository/DelegatingLocalArtifactRepository.java
URL: http://svn.apache.org/viewvc/maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/repository/DelegatingLocalArtifactRepository.java?rev=992089&r1=992088&r2=992089&view=diff
==============================================================================
--- maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/repository/DelegatingLocalArtifactRepository.java
(original)
+++ maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/repository/DelegatingLocalArtifactRepository.java
Thu Sep  2 19:55:29 2010
@@ -36,6 +36,7 @@ import org.apache.maven.artifact.reposit
  * Delegating local artifact repository chains the reactor, IDE workspace
  * and user local repository.
  */
+@Deprecated
 public class DelegatingLocalArtifactRepository
     extends MavenArtifactRepository
 {



Mime
View raw message