Return-Path: Delivered-To: apmail-maven-m2-dev-archive@www.apache.org Received: (qmail 49566 invoked from network); 23 Mar 2005 08:09:48 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 23 Mar 2005 08:09:48 -0000 Received: (qmail 77572 invoked by uid 500); 23 Mar 2005 08:09:42 -0000 Delivered-To: apmail-maven-m2-dev-archive@maven.apache.org Received: (qmail 77492 invoked by uid 500); 23 Mar 2005 08:09:42 -0000 Mailing-List: contact m2-dev-help@maven.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: "Maven 2 Developers List" Reply-To: "Maven 2 Developers List" Delivered-To: mailing list m2-dev@maven.apache.org Received: (qmail 77460 invoked by uid 500); 23 Mar 2005 08:09:41 -0000 Delivered-To: apmail-maven-components-cvs@apache.org Received: (qmail 77446 invoked by uid 99); 23 Mar 2005 08:09:41 -0000 X-ASF-Spam-Status: No, hits=-9.8 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from minotaur.apache.org (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.28) with SMTP; Wed, 23 Mar 2005 00:09:40 -0800 Received: (qmail 33063 invoked by uid 1717); 23 Mar 2005 07:41:39 -0000 Date: 23 Mar 2005 07:41:39 -0000 Message-ID: <20050323074139.33062.qmail@minotaur.apache.org> From: brett@apache.org To: maven-components-cvs@apache.org Subject: cvs commit: maven-components/maven-artifact/src/main/resources/META-INF/plexus components.xml X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N brett 2005/03/22 23:41:39 Modified: maven-artifact/src/main/java/org/apache/maven/artifact/installer DefaultArtifactInstaller.java maven-artifact/src/main/java/org/apache/maven/artifact/manager DefaultWagonManager.java maven-artifact/src/main/java/org/apache/maven/artifact/resolver DefaultArtifactResolver.java maven-artifact/src/main/java/org/apache/maven/artifact AbstractArtifactComponent.java maven-artifact/src/main/resources/META-INF/plexus components.xml Log: o a little refactoring o hook in snapshot transformation, though it isn't used Revision Changes Path 1.6 +1 -1 maven-components/maven-artifact/src/main/java/org/apache/maven/artifact/installer/DefaultArtifactInstaller.java Index: DefaultArtifactInstaller.java =================================================================== RCS file: /home/cvs/maven-components/maven-artifact/src/main/java/org/apache/maven/artifact/installer/DefaultArtifactInstaller.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- DefaultArtifactInstaller.java 23 Mar 2005 03:40:12 -0000 1.5 +++ DefaultArtifactInstaller.java 23 Mar 2005 07:41:39 -0000 1.6 @@ -52,7 +52,7 @@ { try { - setLocalRepositoryPath( artifact, localRepository ); + artifact.setPath( getLocalRepositoryArtifactPath( localRepository, artifact ) ); if ( !artifact.getFile().getParentFile().exists() ) { 1.17 +2 -2 maven-components/maven-artifact/src/main/java/org/apache/maven/artifact/manager/DefaultWagonManager.java Index: DefaultWagonManager.java =================================================================== RCS file: /home/cvs/maven-components/maven-artifact/src/main/java/org/apache/maven/artifact/manager/DefaultWagonManager.java,v retrieving revision 1.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- DefaultWagonManager.java 23 Mar 2005 03:40:12 -0000 1.16 +++ DefaultWagonManager.java 23 Mar 2005 07:41:39 -0000 1.17 @@ -86,7 +86,7 @@ wagon.connect( repository, getProxy( repository.getProtocol() ) ); - wagon.put( source, path( artifact, repository ) ); + wagon.put( source, getRemoteRepositoryArtifactPath( artifact, repository ) ); wagon.disconnect(); @@ -155,7 +155,7 @@ wagon.connect( repository, getProxy( repository.getProtocol() ) ); - String remotePath = path( artifact, repository ); + String remotePath = getRemoteRepositoryArtifactPath( artifact, repository ); wagon.get( remotePath, temp ); 1.24 +2 -2 maven-components/maven-artifact/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactResolver.java Index: DefaultArtifactResolver.java =================================================================== RCS file: /home/cvs/maven-components/maven-artifact/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactResolver.java,v retrieving revision 1.23 retrieving revision 1.24 diff -u -r1.23 -r1.24 --- DefaultArtifactResolver.java 23 Mar 2005 07:23:23 -0000 1.23 +++ DefaultArtifactResolver.java 23 Mar 2005 07:41:39 -0000 1.24 @@ -77,7 +77,7 @@ logger.debug( "Resolving: " + artifact.getId() + " from:\n" + "{localRepository: " + localRepository + "}\n" + "{remoteRepositories: " + remoteRepositories + "}" ); - setLocalRepositoryPath( artifact, localRepository ); + artifact.setPath( getLocalRepositoryArtifactPath( localRepository, artifact ) ); if ( artifact.exists() ) { @@ -294,7 +294,7 @@ try { - setLocalRepositoryPath( artifact, localRepository ); + artifact.setPath( getLocalRepositoryArtifactPath( localRepository, artifact ) ); } catch ( ArtifactPathFormatException e ) { 1.8 +12 -11 maven-components/maven-artifact/src/main/java/org/apache/maven/artifact/AbstractArtifactComponent.java Index: AbstractArtifactComponent.java =================================================================== RCS file: /home/cvs/maven-components/maven-artifact/src/main/java/org/apache/maven/artifact/AbstractArtifactComponent.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- AbstractArtifactComponent.java 23 Mar 2005 07:23:23 -0000 1.7 +++ AbstractArtifactComponent.java 23 Mar 2005 07:41:39 -0000 1.8 @@ -21,8 +21,10 @@ import org.apache.maven.artifact.handler.manager.ArtifactHandlerNotFoundException; import org.apache.maven.artifact.repository.ArtifactRepository; import org.apache.maven.artifact.repository.layout.ArtifactPathFormatException; +import org.apache.maven.artifact.transform.ArtifactTransformation; import org.codehaus.plexus.logging.AbstractLogEnabled; +import java.util.Iterator; import java.util.List; /** @@ -44,23 +46,22 @@ return artifactHandlerManager.getArtifactHandler( type ); } - protected String path( Artifact artifact, ArtifactRepository remoteRepository ) + protected String getRemoteRepositoryArtifactPath( Artifact artifact, ArtifactRepository remoteRepository ) throws ArtifactPathFormatException { return remoteRepository.pathOf( artifact ); } - protected String localPath( Artifact artifact, ArtifactRepository localRepository ) + protected String getLocalRepositoryArtifactPath( ArtifactRepository localRepository, Artifact artifact ) throws ArtifactPathFormatException { - return localRepository.getBasedir() + "/" + localRepository.pathOf( artifact ); - } - - protected void setLocalRepositoryPath( Artifact artifact, ArtifactRepository localRepository ) - throws ArtifactPathFormatException - { - String artifactPath = localPath( artifact, localRepository ); + for ( Iterator i = artifactTransformations.iterator(); i.hasNext(); ) + { + ArtifactTransformation transform = (ArtifactTransformation) i.next(); + // TODO: perform transformation + } - artifact.setPath( artifactPath ); + String artifactPath = localRepository.getBasedir() + "/" + localRepository.pathOf( artifact ); + return artifactPath; } -} \ No newline at end of file +} 1.13 +9 -0 maven-components/maven-artifact/src/main/resources/META-INF/plexus/components.xml Index: components.xml =================================================================== RCS file: /home/cvs/maven-components/maven-artifact/src/main/resources/META-INF/plexus/components.xml,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- components.xml 23 Mar 2005 07:23:23 -0000 1.12 +++ components.xml 23 Mar 2005 07:41:39 -0000 1.13 @@ -1,5 +1,14 @@ + + + org.apache.maven.artifact.transform.ArtifactTransformation + org.apache.maven.artifact.transform.SnapshotTransformation +