PR: MNG-613

clean up

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@280241 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Brett Leslie Porter 2005-09-12 03:13:50 +00:00
parent d4df5302fb
commit 40738a5a86
4 changed files with 3 additions and 10 deletions

View File

@ -24,7 +24,6 @@ import org.apache.maven.artifact.repository.ArtifactRepository;
*
* @author <a href="mailto:brett@apache.org">Brett Porter</a>
* @version $Id$
* @todo split instantiation (versioning, plugin mappings) from definition
*/
public class ArtifactRepositoryMetadata
extends AbstractRepositoryMetadata

View File

@ -61,7 +61,6 @@ public abstract class AbstractVersionTransformation
protected String resolveVersion( Artifact artifact, ArtifactRepository localRepository, List remoteRepositories )
throws ArtifactMetadataRetrievalException
{
// TODO: can we improve on this?
RepositoryMetadata metadata;
if ( !artifact.isSnapshot() || Artifact.LATEST_VERSION.equals( artifact.getBaseVersion() ) )
{

View File

@ -17,7 +17,6 @@ package org.apache.maven.artifact.transform;
*/
import org.apache.maven.artifact.Artifact;
import org.apache.maven.artifact.metadata.ArtifactMetadata;
import org.apache.maven.artifact.metadata.ArtifactMetadataRetrievalException;
import org.apache.maven.artifact.metadata.LegacyArtifactMetadata;
import org.apache.maven.artifact.metadata.SnapshotArtifactMetadata;
@ -75,16 +74,14 @@ public class SnapshotTransformation
{
int buildNumber = resolveLatestSnapshotBuildNumber( artifact, localRepository, remoteRepository );
// TODO: Better way to create this - should have to construct Versioning
Snapshot snapshot = new Snapshot();
snapshot.setTimestamp( getDeploymentTimestamp() );
snapshot.setBuildNumber( buildNumber + 1 );
ArtifactMetadata metadata = new SnapshotArtifactRepositoryMetadata( artifact, snapshot );
RepositoryMetadata metadata = new SnapshotArtifactRepositoryMetadata( artifact, snapshot );
Versioning versioning = new Versioning();
versioning.setSnapshot( snapshot );
artifact.setResolvedVersion( constructVersion( versioning, artifact.getBaseVersion() ) );
artifact.setResolvedVersion(
constructVersion( metadata.getMetadata().getVersioning(), artifact.getBaseVersion() ) );
artifact.addMetadata( metadata );
}
@ -127,7 +124,6 @@ public class SnapshotTransformation
ArtifactRepository remoteRepository )
throws ArtifactMetadataRetrievalException
{
// TODO: can we improve on this?
RepositoryMetadata metadata = new SnapshotArtifactRepositoryMetadata( artifact );
getLogger().info( "Retrieving previous build number from " + remoteRepository.getId() );

View File

@ -40,7 +40,6 @@ public class AddPluginArtifactMetadataMojo
{
Artifact projectArtifact = project.getArtifact();
// TODO: clean up
Versioning versioning = new Versioning();
versioning.setLatest( projectArtifact.getVersion() );
ArtifactRepositoryMetadata metadata = new ArtifactRepositoryMetadata( projectArtifact, versioning );