"' from the repository: " + e.getMessage(), e );
logger.debug( "While recursing: " + e.getMessage(), e ); result.addErrorArtifactException( e );
public boolean isResolvable(String groupId, String artifactId, String version, String type, Log log) { try { Artifact pomArtifact = this.factory.createArtifact(groupId, artifactId, version, "", type); artifactResolver.resolve(pomArtifact, remoteRepositories, localRepository); return true; } catch (ArtifactResolutionException e) { log.warn("can't resolve parent pom: " + e.getMessage()); } catch (ArtifactNotFoundException e) { log.info("can't resolve artifact: " + e.getMessage()); } return false; } }
private void resolveSource( ArtifactFactory artifactFactory, ArtifactResolver resolver, List<ArtifactRepository> remoteArtifactRepositories, ArtifactRepository localRepo, Artifact artifact, String classifier, FileSet sourcesFileSet ) { Artifact sourceArtifact = artifactFactory.createArtifactWithClassifier( artifact.getGroupId(), artifact.getArtifactId(), artifact.getVersion(), "java-source", classifier ); try { resolver.resolve( sourceArtifact, remoteArtifactRepositories, localRepo ); addArtifactToResult( localRepo, sourceArtifact, sourcesFileSet ); } catch ( ArtifactResolutionException e ) { throw new BuildException( "Unable to resolve artifact: " + e.getMessage(), e ); } catch ( ArtifactNotFoundException e ) { // no source available: no problem, it's optional } }
throw new MojoExecutionException(ex.getMessage(), ex); } catch (ArtifactNotFoundException ex) { throw new MojoExecutionException(ex.getMessage(), ex);
protected Artifact resolve( String groupId, String artifactId, String version, String type, String classifier ) throws MojoExecutionException { // return project.getArtifactMap().get( groupId + ":" + artifactId ); Artifact artifact = artifactFactory.createArtifactWithClassifier( groupId, artifactId, version, type, classifier ); try { resolver.resolve(artifact, remoteRepositories, localRepository); } catch ( ArtifactNotFoundException e ) { throw new MojoExecutionException( "artifact not found - " + e.getMessage(), e ); } catch ( ArtifactResolutionException e ) { throw new MojoExecutionException( "artifact resolver problem - " + e.getMessage(), e ); } return artifact; }
protected Artifact resolve( String groupId, String artifactId, String version, String type, String classifier ) throws MojoExecutionException { // return project.getArtifactMap().get( groupId + ":" + artifactId ); Artifact artifact = artifactFactory.createArtifactWithClassifier( groupId, artifactId, version, type, classifier ); try { resolver.resolve(artifact, remoteRepositories, localRepository); } catch ( ArtifactNotFoundException e ) { throw new MojoExecutionException( "artifact not found - " + e.getMessage(), e ); } catch ( ArtifactResolutionException e ) { throw new MojoExecutionException( "artifact resolver problem - " + e.getMessage(), e ); } return artifact; }
throw new MojoFailureException( ex.getMessage() );
/** * resolves an Artifact from the repositorys. * * @param groupId - Artifact GroupId * @param artifactId - Artifact Id * @param version - Artifact Version * @param classifier - Artifact Version * @param type - Artifact Type * @param scope - Artifact Scope * @return * @throws MojoExecutionException */ public Artifact resolve(String groupId, String artifactId, String version, String classifier, String type, String scope) throws MojoExecutionException { Artifact artifact = factory.createDependencyArtifact(groupId, artifactId, VersionRange.createFromVersion(version), type, classifier, Artifact.SCOPE_COMPILE); try { resolver.resolve(artifact, remoteRepositories, local); } catch (ArtifactResolutionException e) { throw new MojoExecutionException(e.getMessage(), e); } catch (ArtifactNotFoundException e) { throw new MojoExecutionException(e.getMessage(), e); } return artifact; }
"ArtifactResolutionException: Unable to locate third party descriptor: " + e.getMessage(), e );
artifact.getId(), e.getMessage() } );
@Override public ModelSource resolveModel(String groupId, String artifactId, String version) throws UnresolvableModelException { Artifact artifactParent = embedder.lookupComponent(RepositorySystem.class).createProjectArtifact(groupId, artifactId, version); try { embedder.resolve(artifactParent, remoteRepositories, embedder.getLocalRepository()); } catch (ArtifactResolutionException ex) { Exceptions.printStackTrace(ex); throw new UnresolvableModelException(ex.getMessage(), groupId , artifactId , version ); } catch (ArtifactNotFoundException ex) { Exceptions.printStackTrace(ex); throw new UnresolvableModelException( ex.getMessage(), groupId , artifactId , version ); } return new FileModelSource(artifactParent.getFile()); } }
getLog().debug( e.getMessage(), e ); msg.append( "Caused by: " + e.getMessage() );
throw new MojoFailureException("Could not resolved the dependency : " + e.getMessage()); } catch (ArtifactNotFoundException e) { getLog().debug("Could not find the dependency", e);
throw new ExtractionException( e.getMessage(), e );
throw new MojoFailureException("Could not resolved the dependency : " + e.getMessage()); } catch (ArtifactNotFoundException e) { getLog().debug("Could not find the dependency", e);
getLog().warn( e.getMessage() );
throw new LifecycleExecutionException( e.getMessage(), e );