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; }
getLogger().debug( "Artifact not found - using stub model: " + e.getMessage() ); e.getMessage(), 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; } }
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; }
@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( "\n " + repository.getId() + "(" + repository.getUrl() + ")" ); msg.append( "\nCaused by: " + e.getMessage() );
} catch (ArtifactNotFoundException e) { getLog().debug("Could not find the dependency", e); throw new MojoFailureException("Could not find the dependency : " + e.getMessage()); } catch (ProjectBuildingException e) { getLog().debug("Error Creating the pom project for artifact : " + artifact, e);
getLogger().debug( "skip ArtifactNotFoundException:" + e.getMessage() ); getLogger().warn( "Unable to get sources artifact for " + artifact.getGroupId() + ":" + artifact.getArtifactId() + ":"
} catch (ArtifactNotFoundException e) { getLog().debug("Could not find the dependency", e); throw new MojoFailureException("Could not find the dependency : " + e.getMessage()); } catch (ProjectBuildingException e) { getLog().debug("Error Creating the pom project for artifact : " + artifact, e);
getLog().warn( e.getMessage() );
throw new BuildException( "Unable to locate wagon provider in remote repository: " + e.getMessage(), e );
"Failed to resolve one or more javadoc source/resource artifacts:\n\n" + e.getMessage(), e );
throw new SiteToolException( "ArtifactNotFoundException: The skin does not exist: " + e.getMessage(), e );
throw new SiteToolException( "ArtifactNotFoundException: The skin does not exist: " + e.getMessage(), e );
throw new LifecycleExecutionException( e.getMessage(), e );