public ArtifactResolutionResult resolveWithExceptions( ArtifactResolutionRequest request ) throws ArtifactResolutionException, ArtifactNotFoundException { ArtifactResolutionResult result = resolve( request ); // We have collected all the problems so let's mimic the way the old code worked and just blow up right here. // That's right lets just let it rip right here and send a big incomprehensible blob of text at unsuspecting // users. Bad dog! resolutionErrorHandler.throwErrors( request, result ); return result; }
@SuppressWarnings( "checkstyle:parameternumber" ) private ArtifactNotFoundException( String message, String groupId, String artifactId, String version, String type, String classifier, List<ArtifactRepository> remoteRepositories, String downloadUrl, List<String> path ) { super( constructMissingArtifactMessage( message, "", groupId, artifactId, version, type, classifier, downloadUrl, path ), groupId, artifactId, version, type, classifier, remoteRepositories, null ); this.downloadUrl = downloadUrl; }
public PluginNotFoundException( Plugin plugin, ArtifactNotFoundException e ) { super( "Plugin could not be found - check that the goal name is correct: " + e.getMessage(), e.getGroupId(), e.getArtifactId(), e.getVersion(), "maven-plugin", null, e.getRemoteRepositories(), null, e.getCause() ); this.plugin = plugin; }
private void injectSession2( ArtifactResolutionRequest request, MavenSession session ) { injectSession1( request, session ); if ( session != null ) { request.setServers( session.getRequest().getServers() ); request.setMirrors( session.getRequest().getMirrors() ); request.setProxies( session.getRequest().getProxies() ); } }
public boolean isSuccess() { return !( hasMissingArtifacts() || hasExceptions() ); }
public void resolve( Artifact artifact, List<ArtifactRepository> remoteRepositories, ArtifactRepository localRepository, TransferListener resolutionListener ) throws ArtifactResolutionException, ArtifactNotFoundException { resolve( artifact, remoteRepositories, getSession( localRepository ) ); }
public ArtifactResolutionResult resolveTransitively( Set<Artifact> artifacts, Artifact originatingArtifact, Map<String, Artifact> managedVersions, ArtifactRepository localRepository, List<ArtifactRepository> remoteRepositories, ArtifactMetadataSource source, ArtifactFilter filter ) throws ArtifactResolutionException, ArtifactNotFoundException { return resolveTransitively( artifacts, originatingArtifact, managedVersions, localRepository, remoteRepositories, source, filter, null ); }
public void resolve( Artifact artifact, List<ArtifactRepository> remoteRepositories, ArtifactRepository localRepository ) throws ArtifactResolutionException, ArtifactNotFoundException { resolve( artifact, remoteRepositories, localRepository, null ); }
/** * Create an instance of the exception with allrequired information. * * @param originatingArtifact the artifact that was being resolved * @param resolvedArtifacts artifacts that could be resolved * @param missingArtifacts artifacts that could not be resolved * @param remoteRepositories remote repositories where the missing artifacts were not found */ public MultipleArtifactsNotFoundException( Artifact originatingArtifact, List<Artifact> resolvedArtifacts, List<Artifact> missingArtifacts, List<ArtifactRepository> remoteRepositories ) { super( constructMessage( missingArtifacts ), originatingArtifact, remoteRepositories ); this.resolvedArtifacts = resolvedArtifacts; this.missingArtifacts = missingArtifacts; }
public void disable() { active = false; if ( children != null ) { for ( ResolutionNode node : children ) { node.disable(); } } }
public void enable() { active = true; // TODO if it was null, we really need to go find them now... or is this taken care of by the ordering? if ( children != null ) { for ( ResolutionNode node : children ) { node.enable(); } } }
public void resolveAlways( Artifact artifact, List<ArtifactRepository> remoteRepositories, ArtifactRepository localRepository ) throws ArtifactResolutionException, ArtifactNotFoundException { resolve( artifact, remoteRepositories, getSession( localRepository ) ); }
public ArtifactResolutionResult resolveTransitively( Set<Artifact> artifacts, Artifact originatingArtifact, List<ArtifactRepository> remoteRepositories, ArtifactRepository localRepository, ArtifactMetadataSource source ) throws ArtifactResolutionException, ArtifactNotFoundException { return resolveTransitively( artifacts, originatingArtifact, localRepository, remoteRepositories, source, null ); }
@SuppressWarnings( "checkstyle:parameternumber" ) public ArtifactNotFoundException( String message, String groupId, String artifactId, String version, String type, String classifier, List<ArtifactRepository> remoteRepositories, String downloadUrl, List<String> path, Throwable cause ) { super( constructMissingArtifactMessage( message, "", groupId, artifactId, version, type, classifier, downloadUrl, path ), groupId, artifactId, version, type, classifier, remoteRepositories, null, cause ); this.downloadUrl = downloadUrl; }
/** * Create an instance of the exception with allrequired information. * * @param originatingArtifact the artifact that was being resolved * @param resolvedArtifacts artifacts that could be resolved * @param missingArtifacts artifacts that could not be resolved * @param remoteRepositories remote repositories where the missing artifacts were not found */ public MultipleArtifactsNotFoundException( Artifact originatingArtifact, List<Artifact> resolvedArtifacts, List<Artifact> missingArtifacts, List<ArtifactRepository> remoteRepositories ) { super( constructMessage( missingArtifacts ), originatingArtifact, remoteRepositories ); this.resolvedArtifacts = resolvedArtifacts; this.missingArtifacts = missingArtifacts; }
@SuppressWarnings( "checkstyle:parameternumber" ) public ArtifactResolutionResult resolveTransitively( Set<Artifact> artifacts, Artifact originatingArtifact, Map<String, Artifact> managedVersions, ArtifactRepository localRepository, List<ArtifactRepository> remoteRepositories, ArtifactMetadataSource source, ArtifactFilter filter, List<ResolutionListener> listeners ) throws ArtifactResolutionException, ArtifactNotFoundException { return resolveTransitively( artifacts, originatingArtifact, managedVersions, localRepository, remoteRepositories, source, filter, listeners, null ); }
@SuppressWarnings( "checkstyle:parameternumber" ) private ArtifactNotFoundException( String message, String groupId, String artifactId, String version, String type, String classifier, List<ArtifactRepository> remoteRepositories, String downloadUrl, List<String> path ) { super( constructMissingArtifactMessage( message, "", groupId, artifactId, version, type, classifier, downloadUrl, path ), groupId, artifactId, version, type, classifier, remoteRepositories, null ); this.downloadUrl = downloadUrl; }
@SuppressWarnings( "checkstyle:parameternumber" ) public ArtifactNotFoundException( String message, String groupId, String artifactId, String version, String type, String classifier, List<ArtifactRepository> remoteRepositories, String downloadUrl, List<String> path, Throwable cause ) { super( constructMissingArtifactMessage( message, "", groupId, artifactId, version, type, classifier, downloadUrl, path ), groupId, artifactId, version, type, classifier, remoteRepositories, null, cause ); this.downloadUrl = downloadUrl; }