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 ArtifactNotFoundException( e.getMessage(), artifact, remoteRepositories, e ); throw new ArtifactResolutionException( e.getMessage(), artifact, remoteRepositories, e );
@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; }
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) { 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 = "
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);
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 );
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 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 );
@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);
toDownload.setVersion(version); getLog().info("Choose version: " + version); artifactResolver.resolve(toDownload, remoteRepositoryList, localRepository); } catch (ArtifactResolutionException e) { throw new MojoFailureException("Download theme artifact failed: " + e.getMessage(), e); } catch (ArtifactNotFoundException e) { throw new MojoFailureException("Theme artifact not found: " + e.getMessage()); return toDownload.getFile();
private void assertResolved( Artifact artifact ) throws ArtifactNotFoundException { if ( !artifact.isResolved() || artifact.getFile() == null || !artifact.getFile().canRead() ) { throw new ArtifactNotFoundException( "Artifact is not resolved", artifact ); } }
localRepository); return artifact.getFile(); + e.getMessage(), e);
public void transformForResolve( Artifact artifact, RepositoryRequest request ) throws ArtifactResolutionException, ArtifactNotFoundException { if ( Artifact.RELEASE_VERSION.equals( artifact.getVersion() ) ) { try { String version = resolveVersion( artifact, request ); if ( Artifact.RELEASE_VERSION.equals( version ) ) { throw new ArtifactNotFoundException( "Unable to determine the release version", artifact ); } artifact.setBaseVersion( version ); artifact.updateVersion( version, request.getLocalRepository() ); } catch ( RepositoryMetadataResolutionException e ) { throw new ArtifactResolutionException( e.getMessage(), artifact, e ); } } }
protected void unpackBaseImage(File buildDir, boolean useDefaultPrefix) throws Exception { String imageName = project.getProperties().getProperty(DOCKER_BASE_IMAGE_PROPERTY); Objects.notNull(imageName, DOCKER_BASE_IMAGE_PROPERTY); ImageMavenCoords baseImageCoords = ImageMavenCoords.parse(imageName, useDefaultPrefix); String coords = baseImageCoords.getAetherCoords(); Artifact artifact = repositorySystem.createArtifactWithClassifier(baseImageCoords.getGroupId(), baseImageCoords.getArtifactId(), baseImageCoords.getVersion(), baseImageCoords.getType(), baseImageCoords.getClassifier()); getLog().info("Resolving Jube image: " + artifact); ArtifactResolutionRequest request = new ArtifactResolutionRequest(); request.setArtifact(artifact); request.setLocalRepository(localRepository); request.setRemoteRepositories(pomRemoteRepositories); ArtifactResolutionResult result = artifactResolver.resolve(request); if (!result.isSuccess()) { throw new ArtifactNotFoundException("Cannot download Jube image", artifact); } getLog().info("Resolved Jube image: " + artifact); if (artifact.getFile() != null) { File file = artifact.getFile(); getLog().info("File: " + file); if (!file.exists() || file.isDirectory()) { throw new MojoExecutionException("Resolved file for " + coords + " is not a valid file: " + file.getAbsolutePath()); } getLog().info("Unpacking base image " + file.getAbsolutePath() + " to build dir: " + buildDir); Zips.unzip(new FileInputStream(file), buildDir); } }
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; } }