clean up unused code

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@280237 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Brett Leslie Porter 2005-09-12 02:11:12 +00:00
parent ff877b345d
commit 6d41274595
8 changed files with 15 additions and 63 deletions

View File

@ -96,11 +96,6 @@ public class LatestArtifactMetadata
this.version = content.trim(); this.version = content.trim();
} }
public void setVersion( String version )
{
this.version = version;
}
public String getBaseVersion() public String getBaseVersion()
{ {
return Artifact.LATEST_VERSION; return Artifact.LATEST_VERSION;
@ -110,10 +105,4 @@ public class LatestArtifactMetadata
{ {
return false; return false;
} }
public boolean isSnapshot()
{
return false;
}
} }

View File

@ -1,13 +1,5 @@
package org.apache.maven.artifact.metadata; package org.apache.maven.artifact.metadata;
import org.apache.maven.artifact.manager.WagonManager;
import org.apache.maven.artifact.repository.ArtifactRepository;
import org.apache.maven.wagon.ResourceDoesNotExistException;
import java.io.File;
import java.io.IOException;
import java.util.Date;
/* /*
* Copyright 2001-2005 The Apache Software Foundation. * Copyright 2001-2005 The Apache Software Foundation.
* *
@ -24,6 +16,14 @@ import java.util.Date;
* limitations under the License. * limitations under the License.
*/ */
import org.apache.maven.artifact.manager.WagonManager;
import org.apache.maven.artifact.repository.ArtifactRepository;
import org.apache.maven.wagon.ResourceDoesNotExistException;
import java.io.File;
import java.io.IOException;
import java.util.Date;
/** /**
* Methods used by the old artifact metadata. To be removed in beta-2. * Methods used by the old artifact metadata. To be removed in beta-2.
* *

View File

@ -103,11 +103,6 @@ public class ReleaseArtifactMetadata
this.version = content.trim(); this.version = content.trim();
} }
public void setVersion( String version )
{
this.version = version;
}
public String getBaseVersion() public String getBaseVersion()
{ {
return ReleaseArtifactTransformation.RELEASE_VERSION; return ReleaseArtifactTransformation.RELEASE_VERSION;
@ -117,10 +112,4 @@ public class ReleaseArtifactMetadata
{ {
return false; return false;
} }
public boolean isSnapshot()
{
return false;
}
} }

View File

@ -165,18 +165,8 @@ public class SnapshotArtifactMetadata
return true; return true;
} }
public boolean isSnapshot()
{
return true;
}
public String getBaseVersion() public String getBaseVersion()
{ {
return artifact.getBaseVersion(); return artifact.getBaseVersion();
} }
public void setRepository( ArtifactRepository remoteRepository )
{
artifact.setRepository( remoteRepository );
}
} }

View File

@ -49,4 +49,11 @@ public interface RepositoryMetadata
* @param metadata the metadata * @param metadata the metadata
*/ */
void setMetadata( Metadata metadata ); void setMetadata( Metadata metadata );
/**
* Whether this represents a snapshot.
*
* @return if it is a snapshot
*/
boolean isSnapshot();
} }

View File

@ -48,9 +48,4 @@ public abstract class AbstractArtifactMetadata
{ {
return artifact.getArtifactId(); return artifact.getArtifactId();
} }
public String getVersion()
{
return artifact.getVersion();
}
} }

View File

@ -46,8 +46,6 @@ public interface ArtifactMetadata
Object getKey(); Object getKey();
boolean isSnapshot();
/** /**
* Get the filename of this metadata on the local repository. * Get the filename of this metadata on the local repository.
* *

View File

@ -34,7 +34,6 @@ import java.io.FileNotFoundException;
import java.io.FileReader; import java.io.FileReader;
import java.io.FileWriter; import java.io.FileWriter;
import java.io.IOException; import java.io.IOException;
import java.util.Date;
/** /**
* Attach a POM to an artifact. * Attach a POM to an artifact.
@ -132,21 +131,6 @@ public class ProjectArtifactMetadata
return artifact.getBaseVersion(); return artifact.getBaseVersion();
} }
public boolean newerThanFile( File file )
{
return this.file.lastModified() > file.lastModified();
}
public Date getLastModified()
{
return new Date( file.lastModified() );
}
public boolean isSnapshot()
{
return artifact.isSnapshot();
}
public Object getKey() public Object getKey()
{ {
return "project " + artifact.getGroupId() + ":" + artifact.getArtifactId(); return "project " + artifact.getGroupId() + ":" + artifact.getArtifactId();