public long getLastModified( Artifact artifact )
        throws IOException, ArtifactNotFoundException
    {
        org.apache.maven.artifact.Artifact mavenArtifact =
            artifactFactory.createArtifactWithClassifier( artifact.getGroupId(), artifact.getArtifactId(),
                                                          artifact.getTimestampVersion(), artifact.getType(),
                                                          artifact.getClassifier() );
        try
        {
            artifactResolver.resolve( mavenArtifact, remoteRepositories, localRepository );
            final File file = mavenArtifact.getFile();
            if ( file != null && file.isFile() )
            {
                addResolved( artifact );
                return file.lastModified();
            }
            throw new ArtifactNotFoundException( artifact );
        }
        catch ( org.apache.maven.artifact.resolver.ArtifactNotFoundException e )
        {
            ArtifactNotFoundException anfe = new ArtifactNotFoundException( artifact );
            anfe.initCause( e );
            throw anfe;
        }
        catch ( ArtifactResolutionException e )
        {
            IOException ioe = new IOException( e.getMessage() );
            ioe.initCause( e );
            throw ioe;
        }
    }
public long getLastModified ( Artifact artifact ) throws IOException , ArtifactNotFoundException { org . apache . maven . artifact . Artifact mavenArtifact = artifactFactory . createArtifactWithClassifier ( artifact . getGroupId ( ) , artifact . getArtifactId ( ) , artifact . getTimestampVersion ( ) , artifact . getType ( ) , artifact . getClassifier ( ) ) ; try { artifactResolver . resolve ( mavenArtifact , remoteRepositories , localRepository ) ; final File file = mavenArtifact . getFile ( ) ; if ( file != null && file . isFile ( ) ) { addResolved ( artifact ) ; return file . lastModified ( ) ; } throw new ArtifactNotFoundException ( artifact ) ; } catch ( org . apache . maven . artifact . resolver . ArtifactNotFoundException e ) { ArtifactNotFoundException anfe = new ArtifactNotFoundException ( artifact ) ; anfe . initCause ( e ) ; throw anfe ; } catch ( ArtifactResolutionException e ) { IOException ioe = new IOException ( e . getMessage ( ) ) ; ioe . initCause ( e ) ; throw ioe ; } }
{@inheritDoc}