<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
</dependency>
+ <dependency>
+ <groupId>com.google.guava</groupId>
+ <artifactId>guava</artifactId>
+ </dependency>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
* under the License.
*/
+import com.google.common.collect.Lists;
import org.apache.archiva.scheduler.ArchivaTaskScheduler;
import org.apache.archiva.scheduler.repository.RepositoryTask;
import org.apache.commons.collections.CollectionUtils;
{
if ( log.isDebugEnabled() )
{
- log.debug( "Metadata " + logicalPath + " not found on remote repository \""
- + targetRepository.getRepository().getId() + "\".", e );
+ log.debug( "Metadata {} not found on remote repository \"{}\".",
+ Lists.<Object>newArrayList( logicalPath, targetRepository.getRepository().getId() ), e );
}
}
catch ( NotModifiedException e )
{
if ( log.isDebugEnabled() )
{
- log.debug( "Metadata " + logicalPath + " not updated on remote repository \""
- + targetRepository.getRepository().getId() + "\".", e );
+ log.debug( "Metadata {} not updated on remote repository \"{}\".",
+ Lists.<Object>newArrayList( logicalPath, targetRepository.getRepository().getId() ), e );
}
}
catch ( ProxyException e )
String defaultSetting = policy.getDefaultOption();
String setting = StringUtils.defaultString( settings.get( key ), defaultSetting );
- log.debug( "Applying [" + key + "] policy with [" + setting + "]" );
+ log.debug( "Applying [{}] policy with [{}]", key, setting );
try
{
// all policies must approve the exception, any can cancel
{
localFile.mkdir();
- log.debug( "Directory '" + resource.getDisplayName() + "' (current user '" + this.principal + "')" );
+ log.debug( "Directory '{}' (current user '{}')", resource.getDisplayName(), this.principal );
triggerAuditEvent( resource, AuditEvent.CREATE_DIR );
}
{
list.add( resource );
}
- log.debug( "Resource '" + item + "' retrieved by '" + this.principal + "'" );
+ log.debug( "Resource '{}' retrieved by '{}'", item, this.principal );
}
}
catch ( DavException e )
public void initialize()
{
-
}
public DavResource createResource( final DavResourceLocator locator, final DavServletRequest request,
if ( isAuthorized( request, repository ) )
{
mergedRepositoryContents.add( resourceFile );
- log.debug( "Repository '" + repository + "' accessed by '" + activePrincipal + "'" );
+ log.debug( "Repository '{}' accessed by '{}'", repository, activePrincipal );
}
}
catch ( DavException e )
request.getMethod() ) ) )
{
mergedRepositoryContents.add( resourceFile );
- log.debug( "Repository '" + repository + "' accessed by '" + activePrincipal + "'" );
+ log.debug( "Repository '{}' accessed by '{}'", repository, activePrincipal );
}
}
catch ( UnauthorizedException e )