mirror of https://github.com/apache/maven.git
clean up artifact handler a little - fields are all final
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@163645 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
7b1f2de259
commit
f07d86f311
|
@ -32,19 +32,19 @@ public class DefaultArtifact
|
|||
// These are the only things i need to specify
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
private String groupId;
|
||||
private final String groupId;
|
||||
|
||||
private String artifactId;
|
||||
private final String artifactId;
|
||||
|
||||
private String version;
|
||||
private final String version;
|
||||
|
||||
private String type;
|
||||
private final String type;
|
||||
|
||||
private String classifier;
|
||||
private final String classifier;
|
||||
|
||||
private String scope;
|
||||
private final String scope;
|
||||
|
||||
private String extension;
|
||||
private final String extension;
|
||||
|
||||
private String path;
|
||||
|
||||
|
@ -81,8 +81,15 @@ public class DefaultArtifact
|
|||
|
||||
this.classifier = classifier;
|
||||
|
||||
if ( extension == null )
|
||||
{
|
||||
this.extension = type;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.extension = extension;
|
||||
}
|
||||
}
|
||||
|
||||
public DefaultArtifact( String groupId, String artifactId, String version, String type )
|
||||
{
|
||||
|
@ -125,15 +132,10 @@ public class DefaultArtifact
|
|||
}
|
||||
|
||||
public String getExtension()
|
||||
{
|
||||
if ( extension != null )
|
||||
{
|
||||
return extension;
|
||||
}
|
||||
|
||||
return type;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
|
|
|
@ -1,11 +1,7 @@
|
|||
package org.apache.maven.artifact.handler.manager;
|
||||
|
||||
import org.apache.maven.artifact.handler.ArtifactHandler;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
/*
|
||||
* Copyright 2001-2004 The Apache Software Foundation.
|
||||
* 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.
|
||||
|
@ -20,6 +16,10 @@ import java.util.Set;
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import org.apache.maven.artifact.handler.ArtifactHandler;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* @author <a href="mailto:jason@maven.org">Jason van Zyl</a>
|
||||
* @version $Id$
|
||||
|
@ -28,7 +28,8 @@ public interface ArtifactHandlerManager
|
|||
{
|
||||
String ROLE = ArtifactHandlerManager.class.getName();
|
||||
|
||||
ArtifactHandler getArtifactHandler( String type ) throws ArtifactHandlerNotFoundException;
|
||||
ArtifactHandler getArtifactHandler( String type )
|
||||
throws ArtifactHandlerNotFoundException;
|
||||
|
||||
// String localRepositoryPath( Artifact artifact, ArtifactRepository localRepository )
|
||||
// throws ArtifactHandlerNotFoundException;
|
||||
|
|
Loading…
Reference in New Issue