mirror of https://github.com/apache/maven.git
add copyrights
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@219819 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
18fa2476bc
commit
19696518b3
|
@ -1,5 +1,21 @@
|
||||||
package org.apache.maven.artifact.repository.metadata;
|
package org.apache.maven.artifact.repository.metadata;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Copyright 2001-2005 The Apache Software Foundation.
|
||||||
|
*
|
||||||
|
* Licensed 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.
|
||||||
|
*/
|
||||||
|
|
||||||
import org.apache.maven.artifact.manager.WagonManager;
|
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.wagon.ResourceDoesNotExistException;
|
import org.apache.maven.wagon.ResourceDoesNotExistException;
|
||||||
|
@ -54,7 +70,8 @@ public class DefaultRepositoryMetadataManager
|
||||||
if ( !metadataFile.exists() )
|
if ( !metadataFile.exists() )
|
||||||
{
|
{
|
||||||
throw new RepositoryMetadataManagementException( metadata,
|
throw new RepositoryMetadataManagementException( metadata,
|
||||||
"Remote repository metadata not found.", e );
|
"Remote repository metadata not found.",
|
||||||
|
e );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -81,7 +98,8 @@ public class DefaultRepositoryMetadataManager
|
||||||
{
|
{
|
||||||
if ( !verifyFileNotEmpty( metadataFile ) )
|
if ( !verifyFileNotEmpty( metadataFile ) )
|
||||||
{
|
{
|
||||||
throw new InvalidRepositoryMetadataException( metadata, "Metadata located in file: " + metadataFile + " appears to be corrupt (file is empty). DOWNLOAD FAILED." );
|
throw new InvalidRepositoryMetadataException( metadata, "Metadata located in file: " +
|
||||||
|
metadataFile + " appears to be corrupt (file is empty). DOWNLOAD FAILED." );
|
||||||
}
|
}
|
||||||
|
|
||||||
cachedMetadata.put( metadata.getRepositoryPath(), metadataFile );
|
cachedMetadata.put( metadata.getRepositoryPath(), metadataFile );
|
||||||
|
@ -161,7 +179,8 @@ public class DefaultRepositoryMetadataManager
|
||||||
{
|
{
|
||||||
if ( !metadataFile.delete() )
|
if ( !metadataFile.delete() )
|
||||||
{
|
{
|
||||||
throw new RepositoryMetadataManagementException( metadata, "Failed to purge local copy from: " + metadataFile );
|
throw new RepositoryMetadataManagementException( metadata,
|
||||||
|
"Failed to purge local copy from: " + metadataFile );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,21 @@
|
||||||
package org.apache.maven.artifact.repository.metadata;
|
package org.apache.maven.artifact.repository.metadata;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Copyright 2001-2005 The Apache Software Foundation.
|
||||||
|
*
|
||||||
|
* Licensed 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.
|
||||||
|
*/
|
||||||
|
|
||||||
public class InvalidRepositoryMetadataException
|
public class InvalidRepositoryMetadataException
|
||||||
extends RepositoryMetadataManagementException
|
extends RepositoryMetadataManagementException
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue