From cec56a638eab5e7369323da8dbee9f4070148aa0 Mon Sep 17 00:00:00 2001 From: Brett Porter Date: Thu, 20 Mar 2008 04:27:54 +0000 Subject: [PATCH] [MRM-738] increase logging on path errors so we can identify the source git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/branches@639156 13f79535-47bb-0310-9956-ffa450edef68 --- .../repository/DaysOldRepositoryPurge.java | 4 ++-- .../RetentionCountRepositoryPurge.java | 4 ++-- .../repository/content/PathParser.java | 20 +++++++++++++++++-- 3 files changed, 22 insertions(+), 6 deletions(-) diff --git a/archiva-1.0.x/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/maven/archiva/consumers/core/repository/DaysOldRepositoryPurge.java b/archiva-1.0.x/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/maven/archiva/consumers/core/repository/DaysOldRepositoryPurge.java index ae9cefe50..a844128c3 100644 --- a/archiva-1.0.x/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/maven/archiva/consumers/core/repository/DaysOldRepositoryPurge.java +++ b/archiva-1.0.x/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/maven/archiva/consumers/core/repository/DaysOldRepositoryPurge.java @@ -140,11 +140,11 @@ public class DaysOldRepositoryPurge } catch ( LayoutException le ) { - throw new RepositoryPurgeException( le.getMessage() ); + throw new RepositoryPurgeException( le.getMessage(), le ); } catch ( ContentNotFoundException e ) { - throw new RepositoryPurgeException( e.getMessage() ); + throw new RepositoryPurgeException( e.getMessage(), e ); } } diff --git a/archiva-1.0.x/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/maven/archiva/consumers/core/repository/RetentionCountRepositoryPurge.java b/archiva-1.0.x/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/maven/archiva/consumers/core/repository/RetentionCountRepositoryPurge.java index 1bb597dc8..c114cea9b 100644 --- a/archiva-1.0.x/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/maven/archiva/consumers/core/repository/RetentionCountRepositoryPurge.java +++ b/archiva-1.0.x/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/maven/archiva/consumers/core/repository/RetentionCountRepositoryPurge.java @@ -64,7 +64,7 @@ public class RetentionCountRepositoryPurge { return; } - + ArtifactReference artifact = repository.toArtifactReference( path ); if ( VersionUtil.isSnapshot( artifact.getVersion() ) ) @@ -99,7 +99,7 @@ public class RetentionCountRepositoryPurge } catch ( LayoutException le ) { - throw new RepositoryPurgeException( le.getMessage() ); + throw new RepositoryPurgeException( le.getMessage(), le ); } catch ( ContentNotFoundException e ) { diff --git a/archiva-1.0.x/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/content/PathParser.java b/archiva-1.0.x/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/content/PathParser.java index 88fff1e43..66cfa1b62 100644 --- a/archiva-1.0.x/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/content/PathParser.java +++ b/archiva-1.0.x/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/content/PathParser.java @@ -1,7 +1,23 @@ -/** +package org.apache.maven.archiva.repository.content; + +/* + * 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.archiva.repository.content; import org.apache.maven.archiva.model.ArtifactReference; import org.apache.maven.archiva.repository.layout.LayoutException; -- 2.39.5