mirror of https://github.com/apache/archiva.git
Turning down the noise in the log.
git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/trunk@548828 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
a19f5c6e86
commit
0c58a1c253
|
@ -71,8 +71,8 @@ public class ProjectModel400Reader
|
|||
|
||||
if ( !"http://maven.apache.org/POM/4.0.0".equals( xml.getDefaultNamespaceURI() ) )
|
||||
{
|
||||
// No namespace defined
|
||||
// TODO: Output to monitor the problem with the Namespace.
|
||||
System.out.println( "No namespace defined: " + pomFile );
|
||||
}
|
||||
|
||||
xml.removeNamespaces();
|
||||
|
@ -220,16 +220,11 @@ public class ProjectModel400Reader
|
|||
if ( dependencyList.contains( dependency ) )
|
||||
{
|
||||
// TODO: throw into monitor as issue.
|
||||
System.err.println( "Duplicate non-unique dependency detected [" + StringUtils.join( parts, ":" )
|
||||
+ "]: " + toDependencyKey( dependency ) );
|
||||
}
|
||||
|
||||
dependencyList.add( dependency );
|
||||
System.out.println( "Added (list.size:" + dependencyList.size() + ") dependency: "
|
||||
+ toDependencyKey( dependency ) );
|
||||
}
|
||||
|
||||
System.out.println( "## Returning dependency list: size=" + dependencyList.size() );
|
||||
return dependencyList;
|
||||
}
|
||||
|
||||
|
@ -559,11 +554,4 @@ public class ProjectModel400Reader
|
|||
return defaultValue;
|
||||
}
|
||||
}
|
||||
|
||||
private String toDependencyKey( Dependency dep )
|
||||
{
|
||||
return "[" + dep.getGroupId() + ":" + dep.getArtifactId() + ":" + dep.getVersion() + ":" + dep.getClassifier()
|
||||
+ ":" + dep.getType() + "]";
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -19,15 +19,12 @@ package org.apache.maven.archiva.web.action.admin.database;
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import com.opensymphony.xwork.Preparable;
|
||||
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.apache.maven.archiva.configuration.ArchivaConfiguration;
|
||||
import org.apache.maven.archiva.configuration.Configuration;
|
||||
import org.apache.maven.archiva.configuration.DatabaseScanningConfiguration;
|
||||
import org.apache.maven.archiva.configuration.InvalidConfigurationException;
|
||||
import org.apache.maven.archiva.database.updater.DatabaseConsumers;
|
||||
import org.apache.maven.archiva.security.ArchivaRoleConstants;
|
||||
import org.apache.maven.archiva.web.action.admin.scanning.AdminRepositoryConsumerComparator;
|
||||
|
@ -35,10 +32,10 @@ import org.codehaus.plexus.redback.rbac.Resource;
|
|||
import org.codehaus.plexus.redback.xwork.interceptor.SecureAction;
|
||||
import org.codehaus.plexus.redback.xwork.interceptor.SecureActionBundle;
|
||||
import org.codehaus.plexus.redback.xwork.interceptor.SecureActionException;
|
||||
import org.codehaus.plexus.registry.RegistryException;
|
||||
import org.codehaus.plexus.xwork.action.PlexusActionSupport;
|
||||
|
||||
import com.opensymphony.xwork.Preparable;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* DatabaseAction
|
||||
|
@ -94,9 +91,6 @@ public class DatabaseAction
|
|||
|
||||
AddAdminDatabaseConsumerClosure addAdminDbConsumer;
|
||||
|
||||
getLogger().info( "Total Available Unprocessed Consumers: " + databaseConsumers.getAvailableUnprocessedConsumers().size() );
|
||||
getLogger().info( "Total Available Cleanup Consumers: " + databaseConsumers.getAvailableCleanupConsumers().size() );
|
||||
|
||||
addAdminDbConsumer = new AddAdminDatabaseConsumerClosure( dbscanning.getUnprocessedConsumers() );
|
||||
CollectionUtils.forAllDo( databaseConsumers.getAvailableUnprocessedConsumers(), addAdminDbConsumer );
|
||||
this.unprocessedConsumers = addAdminDbConsumer.getList();
|
||||
|
@ -110,8 +104,6 @@ public class DatabaseAction
|
|||
|
||||
public String updateUnprocessedConsumers()
|
||||
{
|
||||
getLogger().info( "updateUnprocesedConsumers()" );
|
||||
|
||||
archivaConfiguration.getConfiguration().getDatabaseScanning().setUnprocessedConsumers( enabledUnprocessedConsumers );
|
||||
|
||||
return saveConfiguration();
|
||||
|
@ -119,8 +111,6 @@ public class DatabaseAction
|
|||
|
||||
public String updateCleanupConsumers()
|
||||
{
|
||||
getLogger().info( "updateCleanupConsumers()" );
|
||||
|
||||
archivaConfiguration.getConfiguration().getDatabaseScanning().setCleanupConsumers( enabledCleanupConsumers );
|
||||
|
||||
return saveConfiguration();
|
||||
|
@ -128,8 +118,6 @@ public class DatabaseAction
|
|||
|
||||
public String updateSchedule()
|
||||
{
|
||||
getLogger().info( "updateSchedule()" );
|
||||
|
||||
archivaConfiguration.getConfiguration().getDatabaseScanning().setCronExpression( cron );
|
||||
|
||||
return saveConfiguration();
|
||||
|
@ -137,8 +125,6 @@ public class DatabaseAction
|
|||
|
||||
private String saveConfiguration()
|
||||
{
|
||||
getLogger().info( ".saveConfiguration()" );
|
||||
|
||||
try
|
||||
{
|
||||
archivaConfiguration.save( archivaConfiguration.getConfiguration() );
|
||||
|
|
|
@ -140,7 +140,10 @@ public class RepositoryServlet
|
|||
|
||||
public RepositoryConfiguration getRepository( DavServerRequest request )
|
||||
{
|
||||
return (RepositoryConfiguration) repositoryMap.get( request.getPrefix() );
|
||||
synchronized ( this.repositoryMap )
|
||||
{
|
||||
return (RepositoryConfiguration) repositoryMap.get( request.getPrefix() );
|
||||
}
|
||||
}
|
||||
|
||||
public String getRepositoryName( DavServerRequest request )
|
||||
|
@ -160,8 +163,11 @@ public class RepositoryServlet
|
|||
Closure localRepoMap = IfClosure.getInstance( LocalRepositoryPredicate.getInstance(), repoMapClosure );
|
||||
CollectionUtils.forAllDo( configuration.getConfiguration().getRepositories(), localRepoMap );
|
||||
|
||||
this.repositoryMap.clear();
|
||||
this.repositoryMap.putAll( repoMapClosure.getMap() );
|
||||
synchronized ( this.repositoryMap )
|
||||
{
|
||||
this.repositoryMap.clear();
|
||||
this.repositoryMap.putAll( repoMapClosure.getMap() );
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isAuthenticated( DavServerRequest davRequest, HttpServletResponse response )
|
||||
|
@ -227,7 +233,8 @@ public class RepositoryServlet
|
|||
if ( authzResult.getException() != null )
|
||||
{
|
||||
log( "Authorization Denied [ip=" + request.getRemoteAddr() + ",isWriteRequest=" + isWriteRequest
|
||||
+ ",permission=" + permission + ",repo=" + davRequest.getPrefix() + "] : " + authzResult.getException().getMessage() );
|
||||
+ ",permission=" + permission + ",repo=" + davRequest.getPrefix() + "] : "
|
||||
+ authzResult.getException().getMessage() );
|
||||
}
|
||||
|
||||
// Issue HTTP Challenge.
|
||||
|
@ -253,18 +260,25 @@ public class RepositoryServlet
|
|||
{
|
||||
if ( ConfigurationNames.isRepositories( propertyName ) )
|
||||
{
|
||||
updateRepositoryMap();
|
||||
|
||||
getDavManager().removeAllServers();
|
||||
|
||||
try
|
||||
// Attempt to reduce the number of times we refresh the repository map.
|
||||
if ( propertyName.endsWith( ".id" ) || propertyName.endsWith( ".url" ) )
|
||||
{
|
||||
initServers( getServletConfig() );
|
||||
}
|
||||
catch ( DavServerException e )
|
||||
{
|
||||
log( "Error restarting WebDAV server after configuration change - service disabled: " + e.getMessage(),
|
||||
e );
|
||||
synchronized ( this.repositoryMap )
|
||||
{
|
||||
updateRepositoryMap();
|
||||
|
||||
getDavManager().removeAllServers();
|
||||
|
||||
try
|
||||
{
|
||||
initServers( getServletConfig() );
|
||||
}
|
||||
catch ( DavServerException e )
|
||||
{
|
||||
log( "Error restarting WebDAV server after configuration change - service disabled: "
|
||||
+ e.getMessage(), e );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue