You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by og...@apache.org on 2008/10/31 17:55:23 UTC

svn commit: r709473 - in /maven/mercury/trunk: ./ mercury-plexus/ mercury-plexus/src/ mercury-plexus/src/main/ mercury-plexus/src/main/java/ mercury-plexus/src/main/java/org/ mercury-plexus/src/main/java/org/codehaus/ mercury-plexus/src/main/java/org/c...

Author: ogusakov
Date: Fri Oct 31 09:55:22 2008
New Revision: 709473

URL: http://svn.apache.org/viewvc?rev=709473&view=rev
Log:
added plexus component

Added:
    maven/mercury/trunk/mercury-plexus/   (with props)
    maven/mercury/trunk/mercury-plexus/pom.xml
    maven/mercury/trunk/mercury-plexus/src/
    maven/mercury/trunk/mercury-plexus/src/main/
    maven/mercury/trunk/mercury-plexus/src/main/java/
    maven/mercury/trunk/mercury-plexus/src/main/java/org/
    maven/mercury/trunk/mercury-plexus/src/main/java/org/codehaus/
    maven/mercury/trunk/mercury-plexus/src/main/java/org/codehaus/plexus/
    maven/mercury/trunk/mercury-plexus/src/main/java/org/codehaus/plexus/components/
    maven/mercury/trunk/mercury-plexus/src/main/java/org/codehaus/plexus/components/mercury/
    maven/mercury/trunk/mercury-plexus/src/main/java/org/codehaus/plexus/components/mercury/DefaultPlexusMercury.java
    maven/mercury/trunk/mercury-plexus/src/main/java/org/codehaus/plexus/components/mercury/PlexusMercury.java
    maven/mercury/trunk/mercury-plexus/src/main/java/org/codehaus/plexus/components/mercury/PlexusMercuryException.java
    maven/mercury/trunk/mercury-plexus/src/main/resources/
    maven/mercury/trunk/mercury-plexus/src/main/resources/org/
    maven/mercury/trunk/mercury-plexus/src/main/resources/org/codehaus/
    maven/mercury/trunk/mercury-plexus/src/main/resources/org/codehaus/plexus/
    maven/mercury/trunk/mercury-plexus/src/main/resources/org/codehaus/plexus/components/
    maven/mercury/trunk/mercury-plexus/src/main/resources/org/codehaus/plexus/components/mercury/
    maven/mercury/trunk/mercury-plexus/src/main/resources/org/codehaus/plexus/components/mercury/Messages.properties
    maven/mercury/trunk/mercury-plexus/src/test/
    maven/mercury/trunk/mercury-plexus/src/test/java/
    maven/mercury/trunk/mercury-plexus/src/test/java/org/
    maven/mercury/trunk/mercury-plexus/src/test/java/org/codehaus/
    maven/mercury/trunk/mercury-plexus/src/test/java/org/codehaus/plexus/
    maven/mercury/trunk/mercury-plexus/src/test/java/org/codehaus/plexus/components/
    maven/mercury/trunk/mercury-plexus/src/test/java/org/codehaus/plexus/components/mercury/
    maven/mercury/trunk/mercury-plexus/src/test/java/org/codehaus/plexus/components/mercury/DefaultPlexusMercuryTest.java
    maven/mercury/trunk/mercury-plexus/src/test/resources/
    maven/mercury/trunk/mercury-plexus/src/test/resources/maven-core-2.0.9.jar   (with props)
    maven/mercury/trunk/mercury-plexus/src/test/resources/maven-core-2.0.9.pom
    maven/mercury/trunk/mercury-plexus/src/test/resources/pgp/
    maven/mercury/trunk/mercury-plexus/src/test/resources/pgp/pubring.gpg   (with props)
    maven/mercury/trunk/mercury-plexus/src/test/resources/pgp/secring.gpg   (with props)
Modified:
    maven/mercury/trunk/pom.xml

Propchange: maven/mercury/trunk/mercury-plexus/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Fri Oct 31 09:55:22 2008
@@ -0,0 +1,4 @@
+.settings
+target
+.classpath
+.project

Added: maven/mercury/trunk/mercury-plexus/pom.xml
URL: http://svn.apache.org/viewvc/maven/mercury/trunk/mercury-plexus/pom.xml?rev=709473&view=auto
==============================================================================
--- maven/mercury/trunk/mercury-plexus/pom.xml (added)
+++ maven/mercury/trunk/mercury-plexus/pom.xml Fri Oct 31 09:55:22 2008
@@ -0,0 +1,89 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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>
+  
+  <parent>
+    <groupId>org.apache.maven.mercury</groupId>
+    <artifactId>mercury-pom</artifactId>
+    <version>1.0.0-alpha-2-SNAPSHOT</version>
+  </parent>
+
+  <artifactId>mercury-plexus</artifactId>
+  <name>Mercury Plexus Component:       ${project.version}</name>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.codehaus.plexus</groupId>
+        <artifactId>plexus-maven-plugin</artifactId>
+        <executions> 
+          <execution>
+            <goals>
+              <goal>descriptor</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
+        <artifactId>maven-compiler-plugin</artifactId>
+        <configuration>
+          <source>1.5</source>
+          <target>1.5</target>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+
+  <dependencies>
+
+    <dependency>
+      <groupId>org.codehaus.plexus</groupId>
+      <artifactId>plexus-utils</artifactId>
+      <version>1.5.1</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven.mercury</groupId>
+      <artifactId>mercury-repo-remote-m2</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven.mercury</groupId>
+      <artifactId>mercury-repo-virtual</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven.mercury</groupId>
+      <artifactId>mercury-md-sat</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.maven</groupId>
+      <artifactId>maven-mercury</artifactId>
+      <version>3.0-SNAPSHOT</version>
+      <scope>test</scope>
+    </dependency>
+
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-api</artifactId>
+      <version>1.5.3</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-jdk14</artifactId>
+      <version>1.5.3</version>
+      <scope>test</scope>
+    </dependency>
+
+    <dependency>
+      <groupId>org.codehaus.plexus</groupId>
+      <artifactId>plexus-container-default</artifactId>
+      <version>1.0-beta-1</version>
+    </dependency>
+
+  </dependencies>
+</project>
+

Added: maven/mercury/trunk/mercury-plexus/src/main/java/org/codehaus/plexus/components/mercury/DefaultPlexusMercury.java
URL: http://svn.apache.org/viewvc/maven/mercury/trunk/mercury-plexus/src/main/java/org/codehaus/plexus/components/mercury/DefaultPlexusMercury.java?rev=709473&view=auto
==============================================================================
--- maven/mercury/trunk/mercury-plexus/src/main/java/org/codehaus/plexus/components/mercury/DefaultPlexusMercury.java (added)
+++ maven/mercury/trunk/mercury-plexus/src/main/java/org/codehaus/plexus/components/mercury/DefaultPlexusMercury.java Fri Oct 31 09:55:22 2008
@@ -0,0 +1,270 @@
+package org.codehaus.plexus.components.mercury;
+
+/*
+ * Copyright 2001-2007 Codehaus Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import java.io.File;
+import java.io.InputStream;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.apache.maven.mercury.artifact.Artifact;
+import org.apache.maven.mercury.artifact.ArtifactBasicMetadata;
+import org.apache.maven.mercury.artifact.ArtifactMetadata;
+import org.apache.maven.mercury.artifact.ArtifactScopeEnum;
+import org.apache.maven.mercury.builder.api.DependencyProcessor;
+import org.apache.maven.mercury.crypto.api.StreamObserverFactory;
+import org.apache.maven.mercury.crypto.api.StreamVerifierAttributes;
+import org.apache.maven.mercury.crypto.api.StreamVerifierException;
+import org.apache.maven.mercury.crypto.api.StreamVerifierFactory;
+import org.apache.maven.mercury.crypto.pgp.PgpStreamVerifierFactory;
+import org.apache.maven.mercury.metadata.DependencyBuilder;
+import org.apache.maven.mercury.metadata.DependencyBuilderFactory;
+import org.apache.maven.mercury.metadata.MetadataTreeException;
+import org.apache.maven.mercury.metadata.MetadataTreeNode;
+import org.apache.maven.mercury.repository.api.ArtifactResults;
+import org.apache.maven.mercury.repository.api.Repository;
+import org.apache.maven.mercury.repository.api.RepositoryException;
+import org.apache.maven.mercury.repository.api.RepositoryWriter;
+import org.apache.maven.mercury.repository.local.m2.LocalRepositoryM2;
+import org.apache.maven.mercury.repository.remote.m2.RemoteRepositoryM2;
+import org.apache.maven.mercury.repository.virtual.VirtualRepositoryReader;
+import org.apache.maven.mercury.transport.api.Credentials;
+import org.apache.maven.mercury.transport.api.Server;
+import org.apache.maven.mercury.util.Util;
+import org.codehaus.plexus.lang.DefaultLanguage;
+import org.codehaus.plexus.lang.Language;
+import org.codehaus.plexus.logging.AbstractLogEnabled;
+import org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable;
+import org.codehaus.plexus.personality.plexus.lifecycle.phase.InitializationException;
+
+/**
+ * @plexus.component
+ * 
+ * @author Oleg Gusakov
+ * 
+ */
+public class DefaultPlexusMercury
+extends AbstractLogEnabled
+implements PlexusMercury, Initializable
+{
+  private static final org.slf4j.Logger _log = org.slf4j.LoggerFactory.getLogger( DefaultPlexusMercury.class ); 
+  private static final Language _lang = new DefaultLanguage( DefaultPlexusMercury.class );
+
+  //---------------------------------------------------------------
+  public void initialize()
+  throws InitializationException
+  {
+  }
+
+  //---------------------------------------------------------------
+  public RemoteRepositoryM2 constructRemoteRepositoryM2(
+                        String id
+                      , URL serverUrl, String serverUser, String serverPass 
+                      , URL proxyUrl,  String proxyUser,  String proxyPass
+                      , Set<StreamObserverFactory> readerStreamObservers
+                      , Set<StreamVerifierFactory> readerStreamVerifiers
+                      , Set<StreamObserverFactory> writerStreamObservers
+                      , Set<StreamVerifierFactory> writerStreamVerifiers
+                                                       )
+  throws RepositoryException
+  {
+    Server server = new Server( id, serverUrl );
+    
+    server.setReaderStreamObserverFactories( readerStreamObservers );
+    server.setReaderStreamVerifierFactories( readerStreamVerifiers );
+    server.setWriterStreamObserverFactories( writerStreamObservers );
+    server.setWriterStreamVerifierFactories( writerStreamVerifiers );
+    
+    if( serverUser != null )
+    {
+      Credentials cred = new Credentials( serverUser, serverPass );
+      server.setServerCredentials( cred );
+    }
+    
+    if( proxyUrl != null )
+    {
+      server.setProxy( proxyUrl );
+      
+      if( proxyUser != null )
+      {
+        Credentials cred = new Credentials( proxyUser, proxyPass );
+        server.setProxyCredentials( cred );
+      }
+    }
+
+    RemoteRepositoryM2 repo = new RemoteRepositoryM2( id, server );
+
+    return repo;
+  }
+
+  //---------------------------------------------------------------
+  public LocalRepositoryM2 constructLocalRepositoryM2(
+      String id,
+      File rootDir,
+      Set<StreamObserverFactory> readerStreamObservers,
+      Set<StreamVerifierFactory> readerStreamVerifiers,
+      Set<StreamObserverFactory> writerStreamObservers,
+      Set<StreamVerifierFactory> writerStreamVerifiers 
+                                                      )
+  throws RepositoryException
+  {
+    Server server;
+    try
+    {
+      server = new Server( id, rootDir.toURL() );
+    }
+    catch( MalformedURLException e )
+    {
+      throw new RepositoryException(e);
+    }
+    
+    server.setReaderStreamObserverFactories( readerStreamObservers );
+    server.setReaderStreamVerifierFactories( readerStreamVerifiers );
+    server.setWriterStreamObserverFactories( writerStreamObservers );
+    server.setWriterStreamVerifierFactories( writerStreamVerifiers );
+
+    LocalRepositoryM2 repo = new LocalRepositoryM2( server );
+
+    return repo;
+  }
+
+  //---------------------------------------------------------------
+  public void write( Repository repo, Artifact... artifacts )
+  throws RepositoryException
+  {
+    write( repo, Arrays.asList( artifacts ) );
+  }
+  
+  public void write(
+      Repository repo,
+      Collection<Artifact> artifacts )
+      throws RepositoryException
+  {
+    if( repo == null )
+      throw new RepositoryException( _lang.getMessage( "null.repo" ) );
+    
+    RepositoryWriter wr = repo.getWriter();
+    
+    wr.writeArtifacts( artifacts );
+    
+  }
+  //---------------------------------------------------------------
+  public List<Artifact> read( List<Repository> repos, List<ArtifactBasicMetadata> artifacts )
+  throws RepositoryException
+  {
+    if( Util.isEmpty( repos ) )
+      throw new RepositoryException( _lang.getMessage( "null.repo" ) );
+    
+    VirtualRepositoryReader vr = new VirtualRepositoryReader( repos, DependencyProcessor.NULL_PROCESSOR );
+    
+    ArtifactResults ar = vr.readArtifacts( artifacts );
+    if( ar.hasExceptions() )
+      throw new RepositoryException( ar.getExceptions().toString() );
+    
+    if( !ar.hasResults() )
+      return null;
+    
+    Map<ArtifactBasicMetadata, List<Artifact>> am = ar.getResults();
+    
+    List<Artifact> al = new ArrayList<Artifact>();
+    for( Map.Entry<ArtifactBasicMetadata, List<Artifact>> e : am.entrySet() )
+      al.addAll( e.getValue() );
+
+    return al;
+    
+  }
+  public List<Artifact> read( List<Repository> repo, ArtifactBasicMetadata... artifacts )
+      throws RepositoryException
+  {
+    return read( repo, Arrays.asList( artifacts ) );
+  }
+  //---------------------------------------------------------------
+  public PgpStreamVerifierFactory createPgpReaderFactory(
+      boolean lenient,
+      boolean sufficient,
+      InputStream pubRing )
+  throws StreamVerifierException
+  {
+    return new PgpStreamVerifierFactory(
+        new StreamVerifierAttributes(PgpStreamVerifierFactory.DEFAULT_EXTENSION,lenient,sufficient )
+        , pubRing
+                                      );
+  }
+
+  //---------------------------------------------------------------
+  public PgpStreamVerifierFactory createPgpWriterFactory(
+      boolean lenient,
+      boolean sufficient,
+      InputStream secRing,
+      String keyId,
+      String keyPass )
+      throws StreamVerifierException
+  {
+    return new PgpStreamVerifierFactory(
+        new StreamVerifierAttributes(PgpStreamVerifierFactory.DEFAULT_EXTENSION,lenient,sufficient )
+        , secRing , keyId, keyPass
+                                      );
+  }
+  //---------------------------------------------------------------
+
+  public List<ArtifactMetadata> resolve(
+                                        List<Repository> repos,
+                                        DependencyProcessor dependencyProcessor,
+                                        ArtifactScopeEnum scope,
+                                        List<ArtifactBasicMetadata> artifacts
+                                                      )
+  throws RepositoryException
+  {
+    if( Util.isEmpty( artifacts ) )
+      throw new IllegalArgumentException( _lang.getMessage( "no.artifacts" ) );
+    
+    if( artifacts.size() > 1 )
+      throw new RepositoryException( "I dont support more'n 1 artifact now" );
+    
+    try
+    {
+      DependencyBuilder depBuilder = DependencyBuilderFactory.create( DependencyBuilderFactory.JAVA_DEPENDENCY_MODEL, null, null, null, repos, dependencyProcessor );
+      
+      MetadataTreeNode root = depBuilder.buildTree( artifacts.get(0) );
+      List<ArtifactMetadata> res = depBuilder.resolveConflicts( root, scope );
+    
+      return res;
+    }
+    catch( MetadataTreeException e )
+    {
+      throw new RepositoryException( e );
+    }
+  }
+
+  public List<ArtifactMetadata> resolve( List<Repository> repos
+                                            , DependencyProcessor dependencyProcessor
+                                            , ArtifactScopeEnum   scope
+                                            , ArtifactBasicMetadata... artifacts
+                                            )
+  throws RepositoryException
+  {
+    return resolve( repos, dependencyProcessor, scope, Arrays.asList( artifacts ) );
+  }
+  //---------------------------------------------------------------
+  //---------------------------------------------------------------
+}

Added: maven/mercury/trunk/mercury-plexus/src/main/java/org/codehaus/plexus/components/mercury/PlexusMercury.java
URL: http://svn.apache.org/viewvc/maven/mercury/trunk/mercury-plexus/src/main/java/org/codehaus/plexus/components/mercury/PlexusMercury.java?rev=709473&view=auto
==============================================================================
--- maven/mercury/trunk/mercury-plexus/src/main/java/org/codehaus/plexus/components/mercury/PlexusMercury.java (added)
+++ maven/mercury/trunk/mercury-plexus/src/main/java/org/codehaus/plexus/components/mercury/PlexusMercury.java Fri Oct 31 09:55:22 2008
@@ -0,0 +1,179 @@
+package org.codehaus.plexus.components.mercury;
+
+import java.io.File;
+import java.io.InputStream;
+import java.net.URL;
+import java.util.Collection;
+import java.util.List;
+import java.util.Set;
+
+import org.apache.maven.mercury.artifact.Artifact;
+import org.apache.maven.mercury.artifact.ArtifactBasicMetadata;
+import org.apache.maven.mercury.artifact.ArtifactMetadata;
+import org.apache.maven.mercury.artifact.ArtifactScopeEnum;
+import org.apache.maven.mercury.builder.api.DependencyProcessor;
+import org.apache.maven.mercury.crypto.api.StreamObserverFactory;
+import org.apache.maven.mercury.crypto.api.StreamVerifierException;
+import org.apache.maven.mercury.crypto.api.StreamVerifierFactory;
+import org.apache.maven.mercury.crypto.pgp.PgpStreamVerifierFactory;
+import org.apache.maven.mercury.repository.api.Repository;
+import org.apache.maven.mercury.repository.api.RepositoryException;
+import org.apache.maven.mercury.repository.local.m2.LocalRepositoryM2;
+import org.apache.maven.mercury.repository.remote.m2.RemoteRepositoryM2;
+
+/*
+ * Copyright 2001-2007 Codehaus Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * 
+ * @author Oleg Gusakov
+ * 
+ */
+public interface PlexusMercury
+{
+  public static String ROLE = PlexusMercury.class.getName();
+
+  /**
+   * create PGP factory to configure into repository reader for signature verification
+   * 
+   * @param lenient
+   * @param sufficient
+   * @param pubRing - keyring with all acceptable public keys
+   * @return pgp verifier factory to be sent to Repository
+   * @throws PlexusMercuryException
+   */
+  public PgpStreamVerifierFactory createPgpReaderFactory( boolean lenient, boolean sufficient, InputStream pubRing )
+  throws StreamVerifierException;
+
+  /**
+   * create PGP factory to configure into repository writer for signature generation
+   * 
+   * @param lenient
+   * @param sufficient
+   * @param secRing
+   * @param keyId
+   * @param keyPass
+   * @return pgp verifier factory to be sent to Repository
+   * @throws PlexusMercuryException
+   */
+  public PgpStreamVerifierFactory createPgpWriterFactory( 
+                      boolean lenient
+                    , boolean sufficient
+                    , InputStream secRing
+                    , String keyId
+                    , String keyPass
+                                                        )
+  throws StreamVerifierException;
+  
+  /**
+   * construct remote M2 repository and configure it with supplied attributes
+   * 
+   * @param id
+   * @param serverUrl
+   * @param serverUser
+   * @param serverPass
+   * @param proxyUrl
+   * @param proxyUser
+   * @param proxyPass
+   * @param readerStreamObservers
+   * @param readerStreamVerifiers
+   * @param writerStreamObservers
+   * @param writerStreamVerifiers
+   * @return repository instance
+   * @throws PlexusMercuryException
+   */
+  public RemoteRepositoryM2 constructRemoteRepositoryM2(
+      String id
+    , URL serverUrl, String serverUser, String serverPass 
+    , URL proxyUrl,  String proxyUser,  String proxyPass
+    , Set<StreamObserverFactory> readerStreamObservers
+    , Set<StreamVerifierFactory> readerStreamVerifiers
+    , Set<StreamObserverFactory> writerStreamObservers
+    , Set<StreamVerifierFactory> writerStreamVerifiers
+                                     )
+  throws RepositoryException;
+
+  
+  /**
+   * construct local M2 repository and configure it with supplied attributes
+   * 
+   * @param id
+   * @param rootDir
+   * @param readerStreamObservers
+   * @param readerStreamVerifiers
+   * @param writerStreamObservers
+   * @param writerStreamVerifiers
+   * @return repository instance
+   * @throws PlexusMercuryException
+   */
+  public LocalRepositoryM2 constructLocalRepositoryM2(
+      String id
+    , File rootDir
+    , Set<StreamObserverFactory> readerStreamObservers
+    , Set<StreamVerifierFactory> readerStreamVerifiers
+    , Set<StreamObserverFactory> writerStreamObservers
+    , Set<StreamVerifierFactory> writerStreamVerifiers
+                                     )
+  throws RepositoryException;
+
+  /**
+   * write (deploy) given Artifact(s) to the repository
+   * 
+   * @param repo repository instance to search
+   * @param artfifacts to write
+   * @return
+   * @throws PlexusMercuryException
+   */
+  public void write( Repository repo, Artifact... artifacts )
+  throws RepositoryException;
+  public void write( Repository repo, Collection<Artifact> artifacts )
+  throws RepositoryException;
+
+  /**
+   * read given Artifact(s) from the repository
+   * 
+   * @param repo repository instance to search
+   * @param artfifacts to read
+   * @return
+   * @throws PlexusMercuryException
+   */
+  public List<Artifact> read( List<Repository> repo, List<ArtifactBasicMetadata> artifacts )
+  throws RepositoryException;
+  public List<Artifact> read( List<Repository> repo, ArtifactBasicMetadata... artifacts )
+  throws RepositoryException;
+
+  /**
+   * resolve Artifact dependencies
+   * 
+   * @param repo repository instance to search
+   * @param artfifacts to read
+   * @return
+   * @throws PlexusMercuryException
+   */
+  public List<? extends ArtifactBasicMetadata> resolve( List<Repository> repos
+                                        , DependencyProcessor dependencyProcessor
+                                        , ArtifactScopeEnum   scope
+                                        , ArtifactBasicMetadata... artifacts
+                                      )
+  throws RepositoryException;
+  
+  public List<? extends ArtifactBasicMetadata> resolve( List<Repository> repos
+                                      , DependencyProcessor dependencyProcessor
+                                      , ArtifactScopeEnum   scope
+                                      , List<ArtifactBasicMetadata> artifacts
+                                      )
+  throws RepositoryException;
+}

Added: maven/mercury/trunk/mercury-plexus/src/main/java/org/codehaus/plexus/components/mercury/PlexusMercuryException.java
URL: http://svn.apache.org/viewvc/maven/mercury/trunk/mercury-plexus/src/main/java/org/codehaus/plexus/components/mercury/PlexusMercuryException.java?rev=709473&view=auto
==============================================================================
--- maven/mercury/trunk/mercury-plexus/src/main/java/org/codehaus/plexus/components/mercury/PlexusMercuryException.java (added)
+++ maven/mercury/trunk/mercury-plexus/src/main/java/org/codehaus/plexus/components/mercury/PlexusMercuryException.java Fri Oct 31 09:55:22 2008
@@ -0,0 +1,30 @@
+package org.codehaus.plexus.components.mercury;
+
+public class PlexusMercuryException
+    extends Exception
+{
+
+  public PlexusMercuryException()
+  {
+  }
+
+  public PlexusMercuryException(
+      String message )
+  {
+    super( message );
+  }
+
+  public PlexusMercuryException(
+      Throwable cause )
+  {
+    super( cause );
+  }
+
+  public PlexusMercuryException(
+      String message,
+      Throwable cause )
+  {
+    super( message, cause );
+  }
+
+}

Added: maven/mercury/trunk/mercury-plexus/src/main/resources/org/codehaus/plexus/components/mercury/Messages.properties
URL: http://svn.apache.org/viewvc/maven/mercury/trunk/mercury-plexus/src/main/resources/org/codehaus/plexus/components/mercury/Messages.properties?rev=709473&view=auto
==============================================================================
--- maven/mercury/trunk/mercury-plexus/src/main/resources/org/codehaus/plexus/components/mercury/Messages.properties (added)
+++ maven/mercury/trunk/mercury-plexus/src/main/resources/org/codehaus/plexus/components/mercury/Messages.properties Fri Oct 31 09:55:22 2008
@@ -0,0 +1,2 @@
+null.repo=cannot do anything with null repository
+no.artifacts=no Artifacts supplied - null or empty collection

Added: maven/mercury/trunk/mercury-plexus/src/test/java/org/codehaus/plexus/components/mercury/DefaultPlexusMercuryTest.java
URL: http://svn.apache.org/viewvc/maven/mercury/trunk/mercury-plexus/src/test/java/org/codehaus/plexus/components/mercury/DefaultPlexusMercuryTest.java?rev=709473&view=auto
==============================================================================
--- maven/mercury/trunk/mercury-plexus/src/test/java/org/codehaus/plexus/components/mercury/DefaultPlexusMercuryTest.java (added)
+++ maven/mercury/trunk/mercury-plexus/src/test/java/org/codehaus/plexus/components/mercury/DefaultPlexusMercuryTest.java Fri Oct 31 09:55:22 2008
@@ -0,0 +1,218 @@
+package org.codehaus.plexus.components.mercury;
+
+/*
+ * The MIT License
+ *
+ * Copyright (c) 2005, The Codehaus
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+ * of the Software, and to permit persons to whom the Software is furnished to do
+ * so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+import java.io.File;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.List;
+
+import junit.framework.TestCase;
+
+import org.apache.maven.mercury.MavenDependencyProcessor;
+import org.apache.maven.mercury.artifact.Artifact;
+import org.apache.maven.mercury.artifact.ArtifactBasicMetadata;
+import org.apache.maven.mercury.artifact.ArtifactMetadata;
+import org.apache.maven.mercury.artifact.ArtifactScopeEnum;
+import org.apache.maven.mercury.artifact.DefaultArtifact;
+import org.apache.maven.mercury.crypto.api.StreamVerifierFactory;
+import org.apache.maven.mercury.crypto.pgp.PgpStreamVerifierFactory;
+import org.apache.maven.mercury.crypto.sha.SHA1VerifierFactory;
+import org.apache.maven.mercury.repository.api.Repository;
+import org.apache.maven.mercury.repository.api.RepositoryException;
+import org.apache.maven.mercury.repository.local.m2.LocalRepositoryM2;
+import org.apache.maven.mercury.repository.remote.m2.RemoteRepositoryM2;
+import org.apache.maven.mercury.transport.api.Server;
+import org.apache.maven.mercury.util.FileUtil;
+
+/**
+ * 
+ * 
+ * @author Oleg Gusakov
+ * @version $Id$
+ */
+public class DefaultPlexusMercuryTest
+extends TestCase
+{
+  PlexusMercury pm;
+
+  RemoteRepositoryM2 remoteRepo;
+  LocalRepositoryM2  localRepo;
+  
+  List<Repository>   repos;
+  
+  Artifact a;
+  
+  protected static final String keyId   = "0EDB5D91141BC4F2";
+
+  protected static final String secretKeyFile = "/pgp/secring.gpg";
+  protected static final String publicKeyFile = "/pgp/pubring.gpg";
+  protected static final String secretKeyPass = "testKey82";
+  
+//  public static final String SYSTEM_PARAMETER_PLEXUS_MERCURY_TEST_URL = "plexus.mercury.test.url";
+//  private String remoteServerUrl = System.getProperty( SYSTEM_PARAMETER_PLEXUS_MERCURY_TEST_URL, null );
+  static String remoteServerUrl = "http://people.apache.org/~ogusakov/repos/test";
+  String artifactCoord = "org.apache.maven.mercury:mercury-repo-virtual:1.0.0-alpha-2-SNAPSHOT";
+
+  private File localRepoDir;
+  
+  public static final String SYSTEM_PARAMETER_PLEXUS_MERCURY_TEST_USER = "plexus.mercury.test.user";
+  static String remoteServerUser = System.getProperty( SYSTEM_PARAMETER_PLEXUS_MERCURY_TEST_USER, "admin" );
+
+  public static final String SYSTEM_PARAMETER_PLEXUS_MERCURY_TEST_PASS = "plexus.mercury.test.pass";
+  static String remoteServerPass = System.getProperty( SYSTEM_PARAMETER_PLEXUS_MERCURY_TEST_PASS, "admin123" );
+  
+  PgpStreamVerifierFactory pgpRF;
+  PgpStreamVerifierFactory pgpWF;
+  
+  SHA1VerifierFactory      sha1F;
+  HashSet<StreamVerifierFactory> vFacSha1;
+  
+  //-------------------------------------------------------------------------------------
+  @Override
+  protected void setUp()
+  throws Exception
+  {
+    super.setUp();
+
+    // prep. Artifact
+    File artifactBinary = File.createTempFile( "test-repo-writer", "bin" );
+    FileUtil.writeRawData( artifactBinary, getClass().getResourceAsStream( "/maven-core-2.0.9.jar" ) );
+    
+    a = new DefaultArtifact( new ArtifactBasicMetadata("org.apache.maven.mercury:mercury-core:2.0.9") );
+    
+    a.setPomBlob( FileUtil.readRawData( getClass().getResourceAsStream( "/maven-core-2.0.9.pom" ) ) );
+    a.setFile( artifactBinary );
+    
+    // prep Repository
+    pm = new DefaultPlexusMercury();
+    
+    pgpRF = pm.createPgpReaderFactory( true, true, getClass().getResourceAsStream( publicKeyFile ) );
+    pgpWF = pm.createPgpWriterFactory( true, true, getClass().getResourceAsStream( secretKeyFile ), keyId, secretKeyPass );
+    
+    sha1F = new SHA1VerifierFactory( true, false );
+    
+    remoteRepo = pm.constructRemoteRepositoryM2( "testRepo"
+                        , new URL(remoteServerUrl), remoteServerUser, remoteServerPass
+                        , null, null, null
+                        , null, FileUtil.vSet( pgpRF, sha1F )
+                        , null, FileUtil.vSet( pgpWF, sha1F )
+                                        );
+    
+    localRepoDir = File.createTempFile( "local-", "-repo" );
+    localRepoDir.delete();
+    localRepoDir.mkdir();
+    
+    localRepo = new LocalRepositoryM2( "testLocalRepo", localRepoDir );
+    
+    repos = new ArrayList<Repository>();
+    repos.add( localRepo );
+    repos.add( remoteRepo );
+    
+  }
+  //-------------------------------------------------------------------------------------
+  @Override
+  protected void tearDown()
+  throws Exception
+  {
+    if( remoteServerUrl == null )
+      return;
+    
+    super.tearDown();
+  }
+  //-------------------------------------------------------------------------------------
+  public void notestWrite()
+  throws RepositoryException
+  {
+    pm.write( remoteRepo, a );
+  }
+  //-------------------------------------------------------------------------------------
+  public void testRead()
+  throws RepositoryException
+  {
+    ArtifactBasicMetadata bmd = new ArtifactBasicMetadata(artifactCoord);
+    
+    Collection<Artifact> res = pm.read( repos, bmd );
+    
+    assertNotNull( res );
+    
+    assertFalse( res.isEmpty() );
+    
+    Artifact a = res.toArray( new Artifact[1] )[0];
+    
+    assertNotNull( a );
+    
+    File fBin = a.getFile();
+    
+    assertNotNull( fBin );
+
+    assertTrue( fBin.exists() );
+    
+    byte [] pomBytes = a.getPomBlob();
+    
+    assertNotNull( pomBytes );
+    
+    assertTrue( pomBytes.length > 10 );
+  }
+  //-------------------------------------------------------------------------------------
+  public void testResolve()
+  throws Exception
+  {
+//    Server central = new Server( "central", new URL("http://repo1.maven.org/maven2") );
+    Server central = new Server( "central", new URL("http://repository.sonatype.org/content/groups/public") );
+    
+    repos.add( new RemoteRepositoryM2(central) );
+
+    String artifactId = "asm:asm-xml:3.0";
+
+    ArtifactBasicMetadata bmd = new ArtifactBasicMetadata( artifactId );
+    
+    List<ArtifactBasicMetadata> res = (List<ArtifactBasicMetadata>)pm.resolve( repos, new MavenDependencyProcessor(), ArtifactScopeEnum.compile, bmd );
+    
+    System.out.println("Resolved as "+res);
+
+    assertEquals( 4, res.size() );
+    
+    assertTrue( assertHasArtifact( res, "asm:asm-xml:3.0" ) );
+    assertTrue( assertHasArtifact( res, "asm:asm-util:3.0" ) );
+    assertTrue( assertHasArtifact( res, "asm:asm-tree:3.0" ) );
+    assertTrue( assertHasArtifact( res, "asm:asm:3.0" ) );
+  }
+  //----------------------------------------------------------------------------------------------
+  private static boolean assertHasArtifact( List<ArtifactBasicMetadata> res, String gav )
+  {
+    ArtifactMetadata gavMd = new ArtifactMetadata(gav);
+    
+    for( ArtifactBasicMetadata md : res )
+      if( md.sameGAV( gavMd ) )
+        return true;
+    
+    return false;
+  }
+  //-------------------------------------------------------------------------------------
+  //-------------------------------------------------------------------------------------
+}

Added: maven/mercury/trunk/mercury-plexus/src/test/resources/maven-core-2.0.9.jar
URL: http://svn.apache.org/viewvc/maven/mercury/trunk/mercury-plexus/src/test/resources/maven-core-2.0.9.jar?rev=709473&view=auto
==============================================================================
Binary file - no diff available.

Propchange: maven/mercury/trunk/mercury-plexus/src/test/resources/maven-core-2.0.9.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: maven/mercury/trunk/mercury-plexus/src/test/resources/maven-core-2.0.9.pom
URL: http://svn.apache.org/viewvc/maven/mercury/trunk/mercury-plexus/src/test/resources/maven-core-2.0.9.pom?rev=709473&view=auto
==============================================================================
--- maven/mercury/trunk/mercury-plexus/src/test/resources/maven-core-2.0.9.pom (added)
+++ maven/mercury/trunk/mercury-plexus/src/test/resources/maven-core-2.0.9.pom Fri Oct 31 09:55:22 2008
@@ -0,0 +1,234 @@
+<?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>
+  <parent>
+    <artifactId>maven</artifactId>
+    <groupId>org.apache.maven</groupId>
+    <version>2.0.9</version>
+  </parent>
+
+  <artifactId>maven-core</artifactId>
+  <name>Maven Core</name>
+
+  <pluginRepositories>
+    <pluginRepository>
+      <id>apache.snapshots</id>
+      <url>http://people.apache.org/repo/m2-snapshot-repository</url>
+    </pluginRepository>
+  </pluginRepositories>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.maven</groupId>
+      <artifactId>maven-settings</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven.wagon</groupId>
+      <artifactId>wagon-file</artifactId>
+      <scope>runtime</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven</groupId>
+      <artifactId>maven-plugin-parameter-documenter</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven.wagon</groupId>
+      <artifactId>wagon-webdav</artifactId>
+      <scope>runtime</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven.wagon</groupId>
+      <artifactId>wagon-http-lightweight</artifactId>
+      <scope>runtime</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven.reporting</groupId>
+      <artifactId>maven-reporting-api</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven</groupId>
+      <artifactId>maven-profile</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven</groupId>
+      <artifactId>maven-model</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven</groupId>
+      <artifactId>maven-artifact</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven.wagon</groupId>
+      <artifactId>wagon-provider-api</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.codehaus.plexus</groupId>
+      <artifactId>plexus-container-default</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven</groupId>
+      <artifactId>maven-repository-metadata</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven</groupId>
+      <artifactId>maven-error-diagnostics</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven</groupId>
+      <artifactId>maven-project</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>commons-cli</groupId>
+      <artifactId>commons-cli</artifactId>
+      <version>1.0</version>
+      <exclusions>
+        <exclusion>
+          <artifactId>commons-lang</artifactId>
+          <groupId>commons-lang</groupId>
+        </exclusion>
+        <exclusion>
+          <artifactId>commons-logging</artifactId>
+          <groupId>commons-logging</groupId>
+        </exclusion>
+      </exclusions>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven</groupId>
+      <artifactId>maven-plugin-api</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven.wagon</groupId>
+      <artifactId>wagon-ssh-external</artifactId>
+      <scope>runtime</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven</groupId>
+      <artifactId>maven-plugin-descriptor</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.codehaus.plexus</groupId>
+      <artifactId>plexus-interactivity-api</artifactId>
+      <version>1.0-alpha-4</version>
+      <exclusions>
+        <exclusion>
+          <artifactId>plexus-utils</artifactId>
+          <groupId>plexus</groupId>
+        </exclusion>
+        <exclusion>
+          <artifactId>plexus-container-default</artifactId>
+          <groupId>org.codehaus.plexus</groupId>
+        </exclusion>
+      </exclusions>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven</groupId>
+      <artifactId>maven-artifact-manager</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven</groupId>
+      <artifactId>maven-monitor</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven.wagon</groupId>
+      <artifactId>wagon-ssh</artifactId>
+      <scope>runtime</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.codehaus.plexus</groupId>
+      <artifactId>plexus-utils</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>classworlds</groupId>
+      <artifactId>classworlds</artifactId>
+    </dependency>
+  </dependencies>
+
+  <reporting>
+    <plugins>
+      <plugin>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>l10n-maven-plugin</artifactId>
+        <version>1.0-alpha-1</version>
+        <configuration>
+          <locales>
+            <locale>el</locale>
+            <locale>de</locale>
+            <locale>es</locale>
+            <locale>fr</locale>
+            <locale>ja</locale>
+            <locale>nl</locale>
+            <locale>no</locale>
+            <locale>pl</locale>
+            <locale>zh_CN</locale>
+          </locales>
+        </configuration>
+      </plugin>
+    </plugins>
+  </reporting>
+
+  <profiles>
+    <profile>
+      <id>include-site</id>
+      <build>
+        <plugins>
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-scm-plugin</artifactId>
+            <configuration>
+              <connectionUrl>scm:svn:http://svn.apache.org/repos/asf/maven/site/trunk</connectionUrl>
+              <checkoutDirectory>${project.build.directory}/maven-site</checkoutDirectory>
+            </configuration>
+            <executions>
+              <execution>
+                <phase>initialize</phase>
+                <goals>
+                  <goal>checkout</goal>
+                </goals>
+              </execution>
+            </executions>
+          </plugin>
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-invoker-plugin</artifactId>
+            <configuration>
+              <projectsDirectory>${project.build.directory}/maven-site</projectsDirectory>
+              <pom>${project.build.directory}/maven-site/pom.xml</pom>
+              <goals>
+                <goal>clean</goal>
+                <goal>site</goal>
+              </goals>
+            </configuration>
+            <executions>
+              <execution>
+                <id>initialize</id>
+                <phase>initialize</phase>
+                <goals>
+                  <goal>run</goal>
+                </goals>
+              </execution>
+            </executions>
+          </plugin>
+        </plugins>
+      </build>
+    </profile>
+  </profiles>
+</project>

Added: maven/mercury/trunk/mercury-plexus/src/test/resources/pgp/pubring.gpg
URL: http://svn.apache.org/viewvc/maven/mercury/trunk/mercury-plexus/src/test/resources/pgp/pubring.gpg?rev=709473&view=auto
==============================================================================
Binary file - no diff available.

Propchange: maven/mercury/trunk/mercury-plexus/src/test/resources/pgp/pubring.gpg
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: maven/mercury/trunk/mercury-plexus/src/test/resources/pgp/secring.gpg
URL: http://svn.apache.org/viewvc/maven/mercury/trunk/mercury-plexus/src/test/resources/pgp/secring.gpg?rev=709473&view=auto
==============================================================================
Binary file - no diff available.

Propchange: maven/mercury/trunk/mercury-plexus/src/test/resources/pgp/secring.gpg
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Modified: maven/mercury/trunk/pom.xml
URL: http://svn.apache.org/viewvc/maven/mercury/trunk/pom.xml?rev=709473&r1=709472&r2=709473&view=diff
==============================================================================
--- maven/mercury/trunk/pom.xml (original)
+++ maven/mercury/trunk/pom.xml Fri Oct 31 09:55:22 2008
@@ -28,6 +28,7 @@
     <module>mercury-external</module>
     <module>mercury-crypto</module>
     <module>mercury-util</module>
+    <module>mercury-plexus</module>
     <module>wagon-mercury</module>
   </modules>
 



Re: svn commit: r709473 - in /maven/mercury/trunk: ./ mercury-plexus/ mercury-plexus/src/ mercury-plexus/src/main/ mercury-plexus/src/main/java/ mercury-plexus/src/main/java/org/ mercury-plexus/src/main/java/org/codehaus/ mercury-plexus/src/main/java/org/c...

Posted by Benjamin Bentmann <be...@udo.edu>.
Hi Oleg,

> Author: ogusakov
> Date: Fri Oct 31 09:55:22 2008
> New Revision: 709473
> 
> URL: http://svn.apache.org/viewvc?rev=709473&view=rev
> Log:
> added plexus component
> 
> Added:
>     maven/mercury/trunk/mercury-plexus/   (with props)
>     maven/mercury/trunk/mercury-plexus/pom.xml
>     maven/mercury/trunk/mercury-plexus/src/main/java/org/codehaus/plexus/components/mercury/DefaultPlexusMercury.java
>     maven/mercury/trunk/mercury-plexus/src/main/java/org/codehaus/plexus/components/mercury/PlexusMercury.java
>     maven/mercury/trunk/mercury-plexus/src/main/java/org/codehaus/plexus/components/mercury/PlexusMercuryException.java

These files have no SVN properties set as given in [0].

> 
> Added: maven/mercury/trunk/mercury-plexus/pom.xml
> URL: http://svn.apache.org/viewvc/maven/mercury/trunk/mercury-plexus/pom.xml?rev=709473&view=auto
> ==============================================================================
> --- maven/mercury/trunk/mercury-plexus/pom.xml (added)
> +++ maven/mercury/trunk/mercury-plexus/pom.xml Fri Oct 31 09:55:22 2008
> @@ -0,0 +1,89 @@
> +<?xml version="1.0" encoding="UTF-8"?>
> +<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>
> +  
> [...]

This file (and others) is missing the license header as given in [1].

> Added: maven/mercury/trunk/mercury-plexus/src/main/java/org/codehaus/plexus/components/mercury/DefaultPlexusMercury.java
> URL: http://svn.apache.org/viewvc/maven/mercury/trunk/mercury-plexus/src/main/java/org/codehaus/plexus/components/mercury/DefaultPlexusMercury.java?rev=709473&view=auto
> ==============================================================================
> --- maven/mercury/trunk/mercury-plexus/src/main/java/org/codehaus/plexus/components/mercury/DefaultPlexusMercury.java (added)
> +++ maven/mercury/trunk/mercury-plexus/src/main/java/org/codehaus/plexus/components/mercury/DefaultPlexusMercury.java Fri Oct 31 09:55:22 2008
> @@ -0,0 +1,270 @@
> +package org.codehaus.plexus.components.mercury;
> +
> +/*
> + * Copyright 2001-2007 Codehaus Foundation.
> + *
> + * Licensed under the Apache License, Version 2.0 (the "License");
> + * you may not use this file except in compliance with the License.
> + * You may obtain a copy of the License at
> + *
> + *      http://www.apache.org/licenses/LICENSE-2.0
> + *
> + * Unless required by applicable law or agreed to in writing, software
> + * distributed under the License is distributed on an "AS IS" BASIS,
> + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
> + * See the License for the specific language governing permissions and
> + * limitations under the License.
> + */

This license header is outdated according to [2].


Benjamin


[0] http://maven.apache.org/developers/committer-environment.html
[1] http://maven.apache.org/developers/conventions/code.html
[2] http://www.apache.org/legal/src-headers.html#headers

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org