mirror of https://github.com/apache/maven.git
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:
parent
5f2cfdabb8
commit
1cef292135
|
@ -222,9 +222,11 @@ public class DefaultMaven
|
||||||
|
|
||||||
if ( !collisions.isEmpty() )
|
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>"
|
+ " 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;
|
return index;
|
||||||
|
|
|
@ -19,8 +19,8 @@ package org.apache.maven.plugin;
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import org.apache.maven.artifact.metadata.ArtifactMetadataRetrievalException;
|
|
||||||
import org.apache.maven.artifact.versioning.InvalidVersionSpecificationException;
|
import org.apache.maven.artifact.versioning.InvalidVersionSpecificationException;
|
||||||
|
import org.apache.maven.repository.legacy.metadata.ArtifactMetadataRetrievalException;
|
||||||
|
|
||||||
public class PluginVersionResolutionException
|
public class PluginVersionResolutionException
|
||||||
extends Exception
|
extends Exception
|
||||||
|
|
|
@ -29,10 +29,10 @@ import org.apache.maven.artifact.DefaultArtifact;
|
||||||
import org.apache.maven.artifact.InvalidArtifactRTException;
|
import org.apache.maven.artifact.InvalidArtifactRTException;
|
||||||
import org.apache.maven.artifact.handler.ArtifactHandler;
|
import org.apache.maven.artifact.handler.ArtifactHandler;
|
||||||
import org.apache.maven.artifact.handler.manager.ArtifactHandlerManager;
|
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.repository.ArtifactRepository;
|
||||||
import org.apache.maven.artifact.versioning.VersionRange;
|
import org.apache.maven.artifact.versioning.VersionRange;
|
||||||
import org.apache.maven.model.Resource;
|
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.Component;
|
||||||
import org.codehaus.plexus.component.annotations.Requirement;
|
import org.codehaus.plexus.component.annotations.Requirement;
|
||||||
import org.codehaus.plexus.logging.AbstractLogEnabled;
|
import org.codehaus.plexus.logging.AbstractLogEnabled;
|
||||||
|
|
|
@ -3,8 +3,8 @@ package org.apache.maven.project.artifact;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.apache.maven.artifact.Artifact;
|
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.repository.ArtifactRepository;
|
||||||
|
import org.apache.maven.artifact.metadata.ResolutionGroup;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Licensed to the Apache Software Foundation (ASF) under one or more contributor license
|
* Licensed to the Apache Software Foundation (ASF) under one or more contributor license
|
||||||
|
|
|
@ -69,8 +69,7 @@ public class ProjectArtifactMetadata
|
||||||
public void storeInLocalRepository( ArtifactRepository localRepository, ArtifactRepository remoteRepository )
|
public void storeInLocalRepository( ArtifactRepository localRepository, ArtifactRepository remoteRepository )
|
||||||
throws RepositoryMetadataStoreException
|
throws RepositoryMetadataStoreException
|
||||||
{
|
{
|
||||||
File destination = new File( localRepository.getBasedir(),
|
File destination = new File( localRepository.getBasedir(), localRepository.pathOfLocalRepositoryMetadata( this, remoteRepository ) );
|
||||||
localRepository.pathOfLocalRepositoryMetadata( this, remoteRepository ) );
|
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// I'm fully aware that the file could just be moved using File.rename but
|
// I'm fully aware that the file could just be moved using File.rename but
|
||||||
|
@ -117,4 +116,9 @@ public class ProjectArtifactMetadata
|
||||||
throw new IllegalStateException( "Cannot add two different pieces of metadata for: " + getKey() );
|
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 );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,8 +11,8 @@ import org.apache.maven.artifact.metadata.ArtifactMetadataSource;
|
||||||
import org.apache.maven.artifact.metadata.ResolutionGroup;
|
import org.apache.maven.artifact.metadata.ResolutionGroup;
|
||||||
import org.apache.maven.artifact.repository.ArtifactRepository;
|
import org.apache.maven.artifact.repository.ArtifactRepository;
|
||||||
import org.apache.maven.artifact.resolver.filter.ArtifactFilter;
|
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.project.artifact.MavenMetadataSource;
|
||||||
|
import org.apache.maven.repository.metadata.MetadataSource;
|
||||||
import org.codehaus.plexus.component.annotations.Component;
|
import org.codehaus.plexus.component.annotations.Component;
|
||||||
|
|
||||||
@Component(role=ArtifactMetadataSource.class,hint="classpath")
|
@Component(role=ArtifactMetadataSource.class,hint="classpath")
|
||||||
|
|
|
@ -10,8 +10,6 @@ import java.util.Properties;
|
||||||
import java.util.TimeZone;
|
import java.util.TimeZone;
|
||||||
|
|
||||||
import org.apache.maven.embedder.MavenEmbedderLogger;
|
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.IOUtil;
|
||||||
import org.codehaus.plexus.util.Os;
|
import org.codehaus.plexus.util.Os;
|
||||||
|
|
||||||
|
|
|
@ -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";
|
|
||||||
}
|
|
|
@ -62,6 +62,10 @@ under the License.
|
||||||
<groupId>org.apache.maven.wagon</groupId>
|
<groupId>org.apache.maven.wagon</groupId>
|
||||||
<artifactId>wagon-file</artifactId>
|
<artifactId>wagon-file</artifactId>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jsecurity</groupId>
|
||||||
|
<artifactId>jsecurity</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
<build>
|
<build>
|
||||||
|
|
|
@ -31,58 +31,6 @@ public class Authentication
|
||||||
*/
|
*/
|
||||||
private String password;
|
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.
|
* Get the user's password which is used when connecting to the repository.
|
||||||
*
|
*
|
||||||
|
|
|
@ -29,8 +29,8 @@ import org.apache.maven.artifact.Artifact;
|
||||||
import org.apache.maven.artifact.repository.ArtifactRepository;
|
import org.apache.maven.artifact.repository.ArtifactRepository;
|
||||||
import org.apache.maven.artifact.resolver.ArtifactResolutionException;
|
import org.apache.maven.artifact.resolver.ArtifactResolutionException;
|
||||||
import org.apache.maven.artifact.resolver.CyclicDependencyException;
|
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.artifact.versioning.OverConstrainedVersionException;
|
||||||
|
import org.apache.maven.repository.legacy.resolver.DefaultArtifactCollector;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -105,7 +105,9 @@ public interface RepositorySystem
|
||||||
|
|
||||||
// Map types of artifacts
|
// Map types of artifacts
|
||||||
|
|
||||||
|
//
|
||||||
// Raw file transfers
|
// Raw file transfers
|
||||||
|
//
|
||||||
void publish( ArtifactRepository repository, File source, String remotePath, TransferListener downloadMonitor )
|
void publish( ArtifactRepository repository, File source, String remotePath, TransferListener downloadMonitor )
|
||||||
throws TransferFailedException;
|
throws TransferFailedException;
|
||||||
|
|
||||||
|
|
|
@ -30,7 +30,6 @@ import java.util.Map;
|
||||||
import org.apache.maven.artifact.Artifact;
|
import org.apache.maven.artifact.Artifact;
|
||||||
import org.apache.maven.artifact.InvalidRepositoryException;
|
import org.apache.maven.artifact.InvalidRepositoryException;
|
||||||
import org.apache.maven.artifact.factory.ArtifactFactory;
|
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.ArtifactRepository;
|
||||||
import org.apache.maven.artifact.repository.ArtifactRepositoryFactory;
|
import org.apache.maven.artifact.repository.ArtifactRepositoryFactory;
|
||||||
import org.apache.maven.artifact.repository.ArtifactRepositoryPolicy;
|
import org.apache.maven.artifact.repository.ArtifactRepositoryPolicy;
|
||||||
|
@ -387,32 +386,6 @@ public class LegacyRepositorySystem
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
|
||||||
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
|
// Mirror
|
||||||
|
|
||||||
public void addMirror( String id, String mirrorOf, String url )
|
public void addMirror( String id, String mirrorOf, String url )
|
||||||
|
|
5
pom.xml
5
pom.xml
|
@ -286,6 +286,11 @@
|
||||||
<artifactId>plexus-plugin-manager</artifactId>
|
<artifactId>plexus-plugin-manager</artifactId>
|
||||||
<version>${plexusPluginManagerVersion}</version>
|
<version>${plexusPluginManagerVersion}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jsecurity</groupId>
|
||||||
|
<artifactId>jsecurity</artifactId>
|
||||||
|
<version>0.9.0-RC2</version>
|
||||||
|
</dependency>
|
||||||
<!--bootstrap-start-comment-->
|
<!--bootstrap-start-comment-->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>easymock</groupId>
|
<groupId>easymock</groupId>
|
||||||
|
|
Loading…
Reference in New Issue