addWarning( artifact, Messages.getString( "unable.to.copy.artifact" ) ); //$NON-NLS-1$
return;
}
Metadata metadata = createBaseMetadata( artifact );
Versioning versioning = new Versioning();
versioning.addVersion( artifact.getBaseVersion() );
metadata.setVersioning( versioning );
updateMetadata( new ArtifactRepositoryMetadata( artifact ), targetRepository, metadata, transaction );
metadata = createBaseMetadata( artifact );
metadata.setVersion( artifact.getBaseVersion() );
versioning = new Versioning();
Matcher matcher = Artifact.VERSION_FILE_PATTERN.matcher( artifact.getVersion() );
if ( matcher.matches() )
{
Snapshot snapshot = new Snapshot();
snapshot.setBuildNumber( Integer.parseInt( matcher.group( 3 ) ) );
snapshot.setTimestamp( matcher.group( 2 ) );
versioning.setSnapshot( snapshot );
}
// TODO: merge latest/release/snapshot from source instead
metadata.setVersioning( versioning );
updateMetadata( new SnapshotArtifactRepositoryMetadata( artifact ), targetRepository, metadata, transaction );