mirror of https://github.com/apache/maven.git
o Refactored code to be more general/clear
git-svn-id: https://svn.apache.org/repos/asf/maven/maven-3/trunk@927050 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
4b084a7e3f
commit
dfd067b3ed
|
@ -75,6 +75,14 @@ public interface ArtifactRepository
|
|||
*/
|
||||
List<String> findVersions( Artifact artifact );
|
||||
|
||||
/**
|
||||
* Indicates whether this repository is backed by actual projects. For instance, the build reactor or IDE workspace
|
||||
* are examples of such repositories.
|
||||
*
|
||||
* @return {@code true} if the repository is backed by actual projects, {@code false} otherwise.
|
||||
*/
|
||||
boolean isProjectAware();
|
||||
|
||||
void setAuthentication( Authentication authentication );
|
||||
Authentication getAuthentication();
|
||||
|
||||
|
|
|
@ -216,6 +216,11 @@ public class DefaultArtifactRepository
|
|||
return Collections.emptyList();
|
||||
}
|
||||
|
||||
public boolean isProjectAware()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public Authentication getAuthentication()
|
||||
{
|
||||
return authentication;
|
||||
|
|
|
@ -276,4 +276,11 @@ public class ReactorArtifactRepository
|
|||
|
||||
return eq( reactorProjects.keySet(), other.reactorProjects.keySet() );
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isProjectAware()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -375,4 +375,9 @@ public class MavenArtifactRepository
|
|||
return true;
|
||||
}
|
||||
|
||||
public boolean isProjectAware()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -238,7 +238,7 @@ public class DefaultProjectBuilder
|
|||
"Error resolving project artifact: " + e.getMessage(), e );
|
||||
}
|
||||
|
||||
boolean localProject = artifact.getRepository() != null && "reactor".equals( artifact.getRepository().getId() );
|
||||
boolean localProject = artifact.getRepository() != null && artifact.getRepository().isProjectAware();
|
||||
|
||||
File pomFile = artifact.getFile();
|
||||
|
||||
|
|
Loading…
Reference in New Issue