mirror of https://github.com/apache/maven.git
code format and add @since
git-svn-id: https://svn.apache.org/repos/asf/maven/maven-3/trunk@1409718 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
commit
bd143134c9
|
@ -1,58 +0,0 @@
|
||||||
package org.apache.maven.artifact.repository;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* 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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Caches auxiliary data used during repository access like already processed metadata. The data in the cache is meant
|
|
||||||
* for exclusive consumption by the repository system and is opaque to the cache implementation.
|
|
||||||
*
|
|
||||||
* @author Benjamin Bentmann
|
|
||||||
*/
|
|
||||||
@Deprecated
|
|
||||||
//
|
|
||||||
// Used by Tycho and will break users and force them to upgrade to Maven 3.1 so we should really leave
|
|
||||||
// this here, possibly indefinitely.
|
|
||||||
//
|
|
||||||
public interface RepositoryCache
|
|
||||||
{
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Puts the specified data into the cache. <strong>Warning:</strong> The cache will directly save the provided
|
|
||||||
* reference. If the cached data is mutable, i.e. could be modified after being put into the cache, the caller is
|
|
||||||
* responsible for creating a copy of the original data and store the copy in the cache.
|
|
||||||
*
|
|
||||||
* @param request The repository request from which this cache was retrieved, must not be {@code null}.
|
|
||||||
* @param key The key to use associate the data with, must not be {@code null}.
|
|
||||||
* @param data The data to store in the cache, may be {@code null}.
|
|
||||||
*/
|
|
||||||
void put( RepositoryRequest request, Object key, Object data );
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the specified data from the cache. <strong>Warning:</strong> The cache will directly return the saved
|
|
||||||
* reference. If the cached data is to be modified after its retrieval, the caller is responsible to create a copy
|
|
||||||
* of the returned data and use this instead of the cache record.
|
|
||||||
*
|
|
||||||
* @param request The repository request from which this cache was retrieved, must not be {@code null}.
|
|
||||||
* @param key The key to use for lookup of the data, must not be {@code null}.
|
|
||||||
* @return The requested data or {@code null} if none was present in the cache.
|
|
||||||
*/
|
|
||||||
Object get( RepositoryRequest request, Object key );
|
|
||||||
|
|
||||||
}
|
|
|
@ -26,7 +26,6 @@ import java.util.Set;
|
||||||
|
|
||||||
import org.apache.maven.artifact.Artifact;
|
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.repository.RepositoryCache;
|
|
||||||
import org.apache.maven.artifact.repository.RepositoryRequest;
|
import org.apache.maven.artifact.repository.RepositoryRequest;
|
||||||
import org.apache.maven.artifact.resolver.filter.ArtifactFilter;
|
import org.apache.maven.artifact.resolver.filter.ArtifactFilter;
|
||||||
import org.apache.maven.settings.Mirror;
|
import org.apache.maven.settings.Mirror;
|
||||||
|
@ -318,12 +317,4 @@ public class ArtifactResolutionRequest
|
||||||
return proxies;
|
return proxies;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
|
||||||
// Used by Tycho and will break users and force them to upgrade to Maven 3.1 so we should really leave
|
|
||||||
// this here, possibly indefinitely.
|
|
||||||
//
|
|
||||||
public ArtifactResolutionRequest setCache( RepositoryCache cache )
|
|
||||||
{
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,7 +28,6 @@ import java.util.Properties;
|
||||||
import java.util.concurrent.ConcurrentHashMap;
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
|
|
||||||
import org.apache.maven.artifact.repository.ArtifactRepository;
|
import org.apache.maven.artifact.repository.ArtifactRepository;
|
||||||
import org.apache.maven.artifact.repository.RepositoryCache;
|
|
||||||
import org.apache.maven.monitor.event.EventDispatcher;
|
import org.apache.maven.monitor.event.EventDispatcher;
|
||||||
import org.apache.maven.plugin.descriptor.PluginDescriptor;
|
import org.apache.maven.plugin.descriptor.PluginDescriptor;
|
||||||
import org.apache.maven.project.MavenProject;
|
import org.apache.maven.project.MavenProject;
|
||||||
|
@ -382,14 +381,4 @@ public class MavenSession
|
||||||
return repositorySession;
|
return repositorySession;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Deprecated
|
|
||||||
//
|
|
||||||
// Used by Tycho and will break users and force them to upgrade to Maven 3.1 so we should really leave
|
|
||||||
// this here, possibly indefinitely.
|
|
||||||
//
|
|
||||||
public RepositoryCache getRepositoryCache()
|
|
||||||
{
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,46 +7,58 @@ import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Use an SLF4J {@link org.slf4j.ILoggerFactory} as a backing for a Plexus {@link org.codehaus.plexus.logging.LoggerManager}.
|
* Use an SLF4J {@link org.slf4j.ILoggerFactory} as a backing for a Plexus {@link org.codehaus.plexus.logging.LoggerManager}.
|
||||||
*
|
*
|
||||||
* @author Jason van Zyl
|
* @author Jason van Zyl
|
||||||
|
* @since 3.1
|
||||||
*/
|
*/
|
||||||
public class Slf4jLoggerManager implements LoggerManager {
|
public class Slf4jLoggerManager
|
||||||
|
implements LoggerManager
|
||||||
|
{
|
||||||
|
|
||||||
private ILoggerFactory loggerFactory;
|
private ILoggerFactory loggerFactory;
|
||||||
|
|
||||||
public Slf4jLoggerManager() {
|
public Slf4jLoggerManager()
|
||||||
loggerFactory = LoggerFactory.getILoggerFactory();
|
{
|
||||||
}
|
loggerFactory = LoggerFactory.getILoggerFactory();
|
||||||
|
}
|
||||||
|
|
||||||
public Logger getLoggerForComponent(String role) {
|
public Logger getLoggerForComponent( String role )
|
||||||
return new Slf4jLogger(loggerFactory.getLogger(role));
|
{
|
||||||
}
|
return new Slf4jLogger( loggerFactory.getLogger( role ) );
|
||||||
|
}
|
||||||
|
|
||||||
public Logger getLoggerForComponent(String role, String hint) {
|
public Logger getLoggerForComponent( String role, String hint )
|
||||||
return new Slf4jLogger(loggerFactory.getLogger(role + "." + hint));
|
{
|
||||||
}
|
return new Slf4jLogger( loggerFactory.getLogger( role + "." + hint ) );
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Trying to give loggers back is a bad idea. Ceki said so :-)
|
// Trying to give loggers back is a bad idea. Ceki said so :-)
|
||||||
//
|
//
|
||||||
public void returnComponentLogger(String role) {
|
public void returnComponentLogger( String role )
|
||||||
}
|
{
|
||||||
|
}
|
||||||
|
|
||||||
public void returnComponentLogger(String role, String hint) {
|
public void returnComponentLogger( String role, String hint )
|
||||||
}
|
{
|
||||||
|
}
|
||||||
|
|
||||||
public int getThreshold() {
|
public int getThreshold()
|
||||||
return 0;
|
{
|
||||||
}
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
public void setThreshold(int threshold) {
|
public void setThreshold( int threshold )
|
||||||
}
|
{
|
||||||
|
}
|
||||||
|
|
||||||
public void setThresholds(int threshold) {
|
public void setThresholds( int threshold )
|
||||||
}
|
{
|
||||||
|
}
|
||||||
|
|
||||||
public int getActiveLoggerCount() {
|
public int getActiveLoggerCount()
|
||||||
return 0;
|
{
|
||||||
}
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue