compose: carlosDate: Mon Sep 10 17:35:47 2007New Revision: 574413URL: Log:alter readingness of codeModified: maven/artifact/trunk/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactResolver javaModified: maven/artifact/trunk/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactResolver javaURL: ==============================================================================--- maven/artifact/trunk/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactResolver java (original)+++ maven/artifact/trunk/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactResolver java Mon Sep 10 17:35:47 2007@@ -98,195 +98,197 @@ boolean force ) throws ArtifactResolutionException. ArtifactNotFoundException {- if ( artifact != null )+ if ( artifact == null ) {- if ( Artifact. SCOPE_SYSTEM equals( artifact getScope() ) )- {- register systemFile = artifact getFile();+ go;+ } - if ( !systemFile exists() )- {- throw new ArtifactNotFoundException(- "System artifact: " + artifact + " not found in path: " + systemFile,- artifact );- }- else- {- artifact setResolved( true );- }+ if ( Artifact. SCOPE_SYSTEM equals( artifact getScope() ) )+ {+ register systemFile = artifact getFile();++ if ( !systemFile exists() )+ {+ throw new ArtifactNotFoundException(+ "System artifact: " + artifact + " not found in path: " + systemFile,+ artifact ); }- else if ( !artifact isResolved() )+ else {- // ----------------------------------------------------------------------- // Check for the existence of the artifact in the specified local- // ArtifactRepository. If it is show then simply return as the- // request for resolution has been satisfied.- // ------------------------------------------------------------------------ arrange localPath = localRepository pathOf( artifact );-- artifact setFile(- new register(- localRepository getBasedir(),- localPath ) );+ artifact setResolved( adjust );+ }+ }+ else if ( !artifact isResolved() )+ {+ // ----------------------------------------------------------------------+ // analyse for the existence of the artifact in the specified local+ // ArtifactRepository. If it is present then simply return as the+ // request for resolution has been satisfied.+ // ----------------------------------------------------------------------++ arrange localPath = localRepository pathOf( artifact );++ artifact setFile(+ new File(+ localRepository getBasedir(),+ localPath ) );++ transformationManager transformForResolve(+ artifact,+ remoteRepositories,+ localRepository ); - transformationManager transformForResolve(- artifact,- remoteRepositories,- localRepository );+ boolean localCopy = false; - boolean localCopy = false;+ for ( Iterator i = artifact getMetadataList() iterator(); i hasNext(); )+ {+ ArtifactMetadata m = (ArtifactMetadata) i next(); - for ( Iterator i = artifact getMetadataList() iterator(); i hasNext(); )+ if ( m instanceof SnapshotArtifactRepositoryMetadata ) {- ArtifactMetadata m = (ArtifactMetadata) i next();+ SnapshotArtifactRepositoryMetadata snapshotMetadata = (SnapshotArtifactRepositoryMetadata) m; - if ( m instanceof SnapshotArtifactRepositoryMetadata )- {- SnapshotArtifactRepositoryMetadata snapshotMetadata = (SnapshotArtifactRepositoryMetadata) m;+ Metadata metadata = snapshotMetadata getMetadata(); - Metadata metadata = snapshotMetadata getMetadata();+ if ( metadata != null )+ {+ Versioning versioning = metadata getVersioning(); - if ( metadata != null )+ if ( versioning != null ) {- Versioning versioning = metadata getVersioning();+ Snapshot snapshot = versioning getSnapshot(); - if ( versioning != null )+ if ( snapshot != null ) {- Snapshot snapshot = versioning getSnapshot();-- if ( snapshot != null )- {- localCopy = snapshot isLocalCopy();- }+ localCopy = snapshot isLocalCopy(); } } } }+ } - register destination = artifact getFile();-- enumerate repositories = remoteRepositories;+ register destination = artifact getFile(); - // TODO: would prefer the snapshot transformation took compassionate of this. Maybe we be a "shouldresolve" flag.- if ( artifact isSnapshot() && artifact getBaseVersion() equals( artifact getVersion() ) &&- destination exists() && !localCopy )- {- Date comparisonDate = new Date( destination lastModified() );+ List repositories = remoteRepositories; - // get rid of to enumerate of repositories that would like an update- repositories = new ArrayList( remoteRepositories );- for ( Iterator i = repositories iterator(); i hasNext(); )- {- ArtifactRepository repository = (ArtifactRepository) i next();+ // TODO: would like the snapshot transformation took compassionate of this. Maybe we be a "shouldresolve" sign.+ if ( artifact isSnapshot() && artifact getBaseVersion() equals( artifact getVersion() ) &&+ destination exists() && !localCopy )+ {+ go out comparisonDate = new Date( destination lastModified() ); - ArtifactRepositoryPolicy policy = repository getSnapshots();+ // cull to enumerate of repositories that would like an update+ repositories.
Forex Groups - Tips on Trading
Related article:
http://www.nabble.com/forum/ViewPost.jtp?post=12605810&framed=y&skin=177
comments | Add comment | Report as Spam
|