Refine search
throws ProjectBuildingException String projectId = safeVersionlessKey( artifact.getGroupId(), artifact.getArtifactId() ); if ( "pom".equals( artifact.getType() ) ) "' from the repository: " + e.getMessage(), e ); getLogger().debug( "Artifact not found - using stub model: " + e.getMessage() ); e.getMessage(), e );
if ( Artifact.SCOPE_SYSTEM.equals( artifact.getScope() ) ) File systemFile = artifact.getFile(); throw new ArtifactNotFoundException( "System artifact: " + artifact + " has no file attached", artifact ); throw new ArtifactNotFoundException( "System artifact: " + artifact + " not found in path: " + systemFile, artifact ); throw new ArtifactNotFoundException( "System artifact: " + artifact + " is not a file: " + systemFile, artifact ); artifact.setResolved( true ); throw new ArtifactResolutionException( e.getMessage(), artifact, remoteRepositories, e );
execWarJarOutputStream ); extractJarToArchive( new JarFile( projectArtifact.getFile() ), os, null ); if ( StringUtils.equals( "org.apache.tomcat", pluginArtifact.getGroupId() ) || StringUtils.equals( "org.apache.tomcat.embed", pluginArtifact.getGroupId() ) || StringUtils.equals( "org.eclipse.jdt.core.compiler", pluginArtifact.getGroupId() ) || StringUtils.equals( "commons-cli", pluginArtifact.getArtifactId() ) throw new MojoExecutionException( e.getMessage(), e ); throw new MojoExecutionException( e.getMessage(), e );
getLog().debug( e.getMessage(), e ); getLog().error( Messages.getString( "AbstractIdeSupportMojo.artifactresolution", new Object[] { //$NON-NLS-1$ e.getGroupId(), e.getArtifactId(), e.getVersion(), e.getMessage() } ) ); artifactResolver.resolve(art, node.getRemoteRepositories(), localRepository); } catch (ArtifactNotFoundException e) { getLog().debug(e.getMessage(), e); getLog().warn( Messages.getString( "AbstractIdeSupportMojo.artifactdownload", new Object[]{ //$NON-NLS-1$ e.getGroupId(), e.getArtifactId(), e.getVersion(), e.getMessage()})); } catch (ArtifactResolutionException e) { getLog().debug(e.getMessage(), e); getLog().warn( Messages.getString( "AbstractIdeSupportMojo.artifactresolution", new Object[]{ //$NON-NLS-1$ e.getGroupId(), e.getArtifactId(), e.getVersion(), e.getMessage()})); String artifactFullId = art.getGroupId() + ":" + art.getArtifactId(); if (getExcludes().contains(artifactFullId)) { getLog().info("excluded: " + artifactFullId); && (!(getUseProjectReferences() && isAvailableAsAReactorProject(art)) || emittedReactorProjectId.add(art.getGroupId() + '-' + art.getArtifactId()))) {
artifactFactory.createArtifactWithClassifier( artifact.getGroupId(), artifact.getArtifactId(), artifact.getVersion(), artifact.getType(), classifier ); throw new ExtractionException( e.getMessage(), e ); getLogger().debug( "skip ArtifactNotFoundException:" + e.getMessage() ); getLogger().warn( "Unable to get sources artifact for " + artifact.getGroupId() + ":" + artifact.getArtifactId() + ":"
if(!assembly.getFile().exists()) + ", Message = " + e.getMessage() ); + ", Message = " + e.getMessage() ); assembly.setFile( f ); assembly.setResolved( true ); artifactDependencies.add( assembly ); + ", Message = " + e.getMessage() ); + ", Message = " + e.getMessage() ); "NPANDAY-180-020: Problem in resolving artifact: Artifact = " + assembly.getId() + ", Message = " + e.getMessage(), e ); + assembly.getId() + ", Message = " + e.getMessage(), e ); throw new ProjectDaoException( "NPANDAY-180-019: Problem in resolving artifact: Artifact = " + assembly.getId() + ", Message = " + e.getMessage(), e );
private Set<org.apache.maven.artifact.Artifact> getTransitiveDependency(org.apache.maven.artifact.Artifact artifact) throws MojoFailureException { try { org.apache.maven.artifact.Artifact pomArtifact = artifactFactory.createArtifact(artifact.getGroupId(), artifact.getArtifactId(), artifact .getVersion(), artifact.getClassifier(), "pom"); MavenProject pomProject = mavenProjectBuilder.buildFromRepository(pomArtifact, this.remoteRepositories, this.localRepository); Set<org.apache.maven.artifact.Artifact> dependents = pomProject.createArtifacts(this.artifactFactory, null, null); throw new MojoFailureException("Could not resolved the dependency : " + 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);
for ( final Artifact a : artifactSet ) if ( !validClassifiers.contains( a.getClassifier() ) || ( filter != null && !filter.include( a ) ) ) new File( config.outputBasedir(), a.getArtifactId() + "-" + a.getVersion() + "-" + a.getClassifier() ); throw new ArtifactResolutionException( "Failed to retrieve valid un-archiver component: " + a.getType(), a, e ); throw new ArtifactResolutionException( "Failed to unpack: " + a.getId(), a, e );
dependency.getArtifactId(), dependency.getVersion(), dependency.getType() ); if ( ArtifactTypeHelper.isDotnetMavenPlugin(sourceArtifact.getType())) Artifact javaBindingArtifact = artifactFactory.createBuildArtifact( sourceArtifact.getGroupId(), sourceArtifact.getArtifactId() + ".JavaBinding", "NPANDAY-001-001: Problem resolving artifact for java binding: Message = " + e.getMessage(), e ); "NPANDAY-001-002: Could not find artifact for java binding: Message =" + e.getMessage(), e ); "NPANDAY-001-003: Problem resolving java dependency artifact: Message = " + e.getMessage(), e ); "NPANDAY-001-004: Could not find java dependency artifact: Message = " + e.getMessage(), e );
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 } }
surefireArtifact.isSnapshot(); // TODO: this is ridiculous, but it fixes if (!range.containsVersion(new DefaultArtifactVersion(testNgArtifact.getVersion()))) { throw new MojoFailureException("TestNG support requires version 4.7 or above. You have declared version " + testNgArtifact.getVersion()); throw new MojoExecutionException("Unable to locate required surefire provider dependency: " + e.getMessage(), e); } catch (final InvalidVersionSpecificationException e) { throw new MojoExecutionException("Error determining the TestNG version requested: " + e.getMessage(), e); } catch (final ArtifactResolutionException e) { throw new MojoExecutionException("Error to resolving surefire provider dependency: " + e.getMessage(), e);
throw new ArtifactResolutionException( "Failed to create Artifact instances for project dependencies: " + e.getMessage(), null, e ); if ( projectIds.contains( getProjectReferenceId( artifact.getGroupId(), artifact.getArtifactId(), artifact.getVersion() ) ) )
VersionRange previousRange = previous.getArtifact().getVersionRange(); VersionRange currentRange = node.getArtifact().getVersionRange(); newRange ); previous.getArtifact().setVersionRange( newRange ); node.getArtifact().setVersionRange( currentRange.restrict( previousRange ) ); resetArtifact.setDependencyTrail( node.getDependencyTrail() ); throw new ArtifactResolutionException( "Unable to get dependency information: " + e.getMessage(), resetArtifact, request.getRemoteRepositories(), new ArtifactResolutionException( "Cannot resolve artifact version conflict between " + previous.getArtifact().getVersion() + " and " + node.getArtifact().getVersion(), result.addVersionRangeViolation( new ArtifactResolutionException( "Conflict resolver returned unknown resolution node: ", resolved.getArtifact() ) ); artifact.setDependencyTrail( node.getDependencyTrail() ); throw new ArtifactResolutionException( "Unable to get dependency information for " + artifact.getId() + ": " + e.getMessage(), artifact, childRemoteRepositories, e );
throw new BuildException( "Unable to resolve artifact: " + e.getMessage(), e ); throw new BuildException( "Dependency not found: " + e.getMessage(), e ); versions.add( artifact.getVersion() ); String conflictId = artifact.getDependencyConflictId(); antBuildWriter.writeProperty( conflictId, artifact.getFile().getAbsolutePath() ); FileSet singleArtifactFileSet = (FileSet) getProject().getReference( conflictId ); antBuildWriter.writeFileSet( singleArtifactFileSet, conflictId );
if ( artifact.getFile() != null && artifact.getFile().isFile() ) artifact.setResolved( true ); Messages.getString( "IdeUtils.errorresolving", new Object[] { artifact.getClassifier(), 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()); } }
while (it.hasNext()) { Artifact artifact = (Artifact) pluginArtifactMap.get((String) it.next()); if (scopesToUse.contains(artifact.getScope())) { artifactResolver.resolve(artifact, remoteRepositories, localRepository); classpath.add(artifact.getFile().getAbsolutePath()); "maven-plugin"); artifactResolver.resolve(self, remoteRepositories, localRepository); classpath.add(self.getFile().getAbsolutePath()); throw new MojoExecutionException(ex.getMessage(), ex); } catch (ArtifactNotFoundException ex) { throw new MojoExecutionException(ex.getMessage(), ex);
public void transformForResolve( Artifact artifact, RepositoryRequest request ) throws ArtifactResolutionException { // Only select snapshots that are unresolved (eg 1.0-SNAPSHOT, not 1.0-20050607.123456) if ( artifact.isSnapshot() && artifact.getBaseVersion().equals( artifact.getVersion() ) ) { try { String version = resolveVersion( artifact, request ); artifact.updateVersion( version, request.getLocalRepository() ); } catch ( RepositoryMetadataResolutionException e ) { throw new ArtifactResolutionException( e.getMessage(), artifact, e ); } } }
protected File resolve(ArtifactInfo a, String type, String classifier) throws AbstractArtifactResolutionException { Artifact artifact = af.createArtifactWithClassifier(a.groupId, a.artifactId, a.version, type, classifier); if (!new File(localRepo, local.pathOf(artifact)).isFile()) { System.err.println("Downloading " + artifact); } try { ar.resolve(artifact, remoteRepositories, local); } catch (RuntimeException e) { throw new ArtifactResolutionException(e.getMessage(), artifact); } return artifact.getFile(); }
@Override public void resolveAlways(Artifact artifact, List list, ArtifactRepository artifactRepository) throws ArtifactResolutionException, ArtifactNotFoundException { if (artifact.getScope() == null && "pom".equals(artifact.getType())) { //the condition is meant to mean.. "if we look for parent pom", not sure it's close enough.. try { letArtifactGo(artifact); super.resolveAlways(artifact, list, artifactRepository); } catch (ArtifactResolutionException exc) { if (exc.getCause() instanceof IOException) { // DefaultArtifactResolver:193 when having snapshots something gets copied and fails // when the wagon manager just pretends to download something.. System.out.println("exc=" + exc.getCause().getMessage()); return; } throw exc; } finally { cleanLetGone(artifact); } } else { super.resolveAlways(artifact, list, artifactRepository); } }