MNG-4221: Another pass over making maven-compat only used by external consumers

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@789080 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jason van Zyl 2009-06-28 09:46:11 +00:00
parent 5f2cfdabb8
commit 1cef292135
14 changed files with 26 additions and 131 deletions

View File

@ -222,9 +222,11 @@ protected Map<String,MavenProject> getProjectsForMavenReactor( MavenExecutionReq
if ( !collisions.isEmpty() )
{
throw new org.apache.maven.DuplicateProjectException( "Two or more projects in the reactor"
/*
throw new DuplicateProjectException( "Two or more projects in the reactor"
+ " have the same identifier, please make sure that <groupId>:<artifactId>:<version>"
+ " is unique for each project: " + collisions, collisions );
+ " is unique for each project: " + collisions );
*/
}
return index;

View File

@ -19,8 +19,8 @@
* under the License.
*/
import org.apache.maven.artifact.metadata.ArtifactMetadataRetrievalException;
import org.apache.maven.artifact.versioning.InvalidVersionSpecificationException;
import org.apache.maven.repository.legacy.metadata.ArtifactMetadataRetrievalException;
public class PluginVersionResolutionException
extends Exception

View File

@ -29,10 +29,10 @@
import org.apache.maven.artifact.InvalidArtifactRTException;
import org.apache.maven.artifact.handler.ArtifactHandler;
import org.apache.maven.artifact.handler.manager.ArtifactHandlerManager;
import org.apache.maven.artifact.metadata.ArtifactMetadata;
import org.apache.maven.artifact.repository.ArtifactRepository;
import org.apache.maven.artifact.versioning.VersionRange;
import org.apache.maven.model.Resource;
import org.apache.maven.repository.legacy.metadata.ArtifactMetadata;
import org.codehaus.plexus.component.annotations.Component;
import org.codehaus.plexus.component.annotations.Requirement;
import org.codehaus.plexus.logging.AbstractLogEnabled;

View File

@ -3,8 +3,8 @@
import java.util.List;
import org.apache.maven.artifact.Artifact;
import org.apache.maven.artifact.metadata.ResolutionGroup;
import org.apache.maven.artifact.repository.ArtifactRepository;
import org.apache.maven.artifact.metadata.ResolutionGroup;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more contributor license

View File

@ -69,8 +69,7 @@ private String getFilename()
public void storeInLocalRepository( ArtifactRepository localRepository, ArtifactRepository remoteRepository )
throws RepositoryMetadataStoreException
{
File destination = new File( localRepository.getBasedir(),
localRepository.pathOfLocalRepositoryMetadata( this, remoteRepository ) );
File destination = new File( localRepository.getBasedir(), localRepository.pathOfLocalRepositoryMetadata( this, remoteRepository ) );
// ----------------------------------------------------------------------------
// I'm fully aware that the file could just be moved using File.rename but
@ -117,4 +116,9 @@ public void merge( ArtifactMetadata metadata )
throw new IllegalStateException( "Cannot add two different pieces of metadata for: " + getKey() );
}
}
public void merge( org.apache.maven.repository.legacy.metadata.ArtifactMetadata metadata )
{
this.merge( (ArtifactMetadata)metadata );
}
}

View File

@ -11,8 +11,8 @@
import org.apache.maven.artifact.metadata.ResolutionGroup;
import org.apache.maven.artifact.repository.ArtifactRepository;
import org.apache.maven.artifact.resolver.filter.ArtifactFilter;
import org.apache.maven.artifact.resolver.metadata.MetadataSource;
import org.apache.maven.project.artifact.MavenMetadataSource;
import org.apache.maven.repository.metadata.MetadataSource;
import org.codehaus.plexus.component.annotations.Component;
@Component(role=ArtifactMetadataSource.class,hint="classpath")

View File

@ -10,8 +10,6 @@
import java.util.TimeZone;
import org.apache.maven.embedder.MavenEmbedderLogger;
import org.apache.maven.execution.ApplicationInformation;
import org.apache.maven.execution.DefaultRuntimeInformation;
import org.codehaus.plexus.util.IOUtil;
import org.codehaus.plexus.util.Os;

View File

@ -1,41 +0,0 @@
/*
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
*/
package org.apache.maven.embedder.execution;
import org.sonatype.plexus.components.sec.dispatcher.DefaultSecDispatcher;
/**
*
*
* @author Oleg Gusakov
* @version $Id$
*
* @plexus.component role="" hint="maven"
*/
//@Component( role=SecDispatcher.class, hint="maven" )
public class MavenSecurityDispatcher
extends DefaultSecDispatcher
{
// @Configuration( value="~/.m2/settings-security.xml" )
/**
* @plexus.configuration default-value="~/.m2/settings-security.xml"
*/
protected String _configurationFile = "~/.m2/settings-security.xml";
}

View File

@ -62,6 +62,10 @@ under the License.
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-file</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jsecurity</groupId>
<artifactId>jsecurity</artifactId>
</dependency>
</dependencies>
<build>

View File

@ -31,58 +31,6 @@ public class Authentication
*/
private String password;
/**
* Passphrase of the user's private key file
*/
private String passphrase;
/**
* The absolute path to private key file
*/
private String privateKey;
/**
* Get the passphrase of the private key file. The passphrase is used only when host/protocol
* supports authentication via exchange of private/public keys and private key was used for
* authentication.
*
* @return passphrase of the private key file
*/
public String getPassphrase()
{
return passphrase;
}
/**
* Set the passphrase of the private key file.
*
* @param passphrase passphrase of the private key file
*/
public void setPassphrase( String passphrase )
{
this.passphrase = passphrase;
}
/**
* Get the absolute path to the private key file.
*
* @return absolute path to private key
*/
public String getPrivateKey()
{
return privateKey;
}
/**
* Set the absolute path to private key file.
*
* @param privateKey path to private key in local file system
*/
public void setPrivateKey( String privateKey )
{
this.privateKey = privateKey;
}
/**
* Get the user's password which is used when connecting to the repository.
*

View File

@ -29,8 +29,8 @@
import org.apache.maven.artifact.repository.ArtifactRepository;
import org.apache.maven.artifact.resolver.ArtifactResolutionException;
import org.apache.maven.artifact.resolver.CyclicDependencyException;
import org.apache.maven.artifact.resolver.DefaultArtifactCollector;
import org.apache.maven.artifact.versioning.OverConstrainedVersionException;
import org.apache.maven.repository.legacy.resolver.DefaultArtifactCollector;
/**

View File

@ -105,7 +105,9 @@ ArtifactRepository createLocalRepository( File localRepository )
// Map types of artifacts
//
// Raw file transfers
//
void publish( ArtifactRepository repository, File source, String remotePath, TransferListener downloadMonitor )
throws TransferFailedException;

View File

@ -30,7 +30,6 @@
import org.apache.maven.artifact.Artifact;
import org.apache.maven.artifact.InvalidRepositoryException;
import org.apache.maven.artifact.factory.ArtifactFactory;
import org.apache.maven.artifact.manager.WagonManager;
import org.apache.maven.artifact.repository.ArtifactRepository;
import org.apache.maven.artifact.repository.ArtifactRepositoryFactory;
import org.apache.maven.artifact.repository.ArtifactRepositoryPolicy;
@ -387,32 +386,6 @@ public void addAuthenticationInfo( String repositoryId, String username, String
}
*/
/*
public void addPermissionInfo( String repositoryId, String filePermissions, String directoryPermissions )
{
RepositoryPermissions permissions = new RepositoryPermissions();
boolean addPermissions = false;
if ( filePermissions != null )
{
permissions.setFileMode( filePermissions );
addPermissions = true;
}
if ( directoryPermissions != null )
{
permissions.setDirectoryMode( directoryPermissions );
addPermissions = true;
}
if ( addPermissions )
{
serverPermissionsMap.put( repositoryId, permissions );
}
}
*/
// Mirror
public void addMirror( String id, String mirrorOf, String url )

View File

@ -286,6 +286,11 @@
<artifactId>plexus-plugin-manager</artifactId>
<version>${plexusPluginManagerVersion}</version>
</dependency>
<dependency>
<groupId>org.jsecurity</groupId>
<artifactId>jsecurity</artifactId>
<version>0.9.0-RC2</version>
</dependency>
<!--bootstrap-start-comment-->
<dependency>
<groupId>easymock</groupId>