Examples of ArtifactMetadataRetrievalException


Examples of org.apache.maven.artifact.metadata.ArtifactMetadataRetrievalException

                        buildProject( new RepositoryModelResolver( basedir, pathTranslator ), artifact.getGroupId(),
                                      artifact.getArtifactId(), artifact.getVersion() );
                }
                catch ( ModelBuildingException e )
                {
                    throw new ArtifactMetadataRetrievalException( e.getMessage(), e, artifact );
                }
                catch ( UnresolvableModelException e )
                {
                    throw new ArtifactMetadataRetrievalException( e.getMessage(), e, artifact );
                }
            }

            ResolutionGroup result;

            if ( project == null )
            {
                // TODO: we could record this so that it is displayed in the dependency tree as (...) or similar

                // if the project is null, we encountered an invalid model (read: m1 POM)
                // we'll just return an empty resolution group.
                // or used the inherited scope (should that be passed to the buildFromRepository method above?)
                result = new ResolutionGroup( pomArtifact, Collections.<Artifact>emptySet(), Collections.<ArtifactRepository>emptyList() );
            }
            else
            {
                Set<Artifact> artifacts = Collections.emptySet();
                if ( !artifact.getArtifactHandler().isIncludesDependencies() )
                {
                    try
                    {
                        artifacts = createArtifacts( project, artifact.getDependencyFilter() );
                    }
                    catch ( InvalidVersionSpecificationException e )
                    {
                        throw new ArtifactMetadataRetrievalException( e.getMessage(), e, artifact );
                    }
                }

                result = new ResolutionGroup( pomArtifact, artifacts, Collections.<ArtifactRepository>emptyList() );
            }
View Full Code Here

Examples of org.apache.maven.artifact.metadata.ArtifactMetadataRetrievalException

                    projectVersions = resolver.resolveProjectVersions( session, repoId, artifact.getGroupId(),
                                                                       artifact.getArtifactId() );
                }
                catch ( MetadataResolutionException e )
                {
                    throw new ArtifactMetadataRetrievalException( e.getMessage(), e, artifact );
                }
                for ( String version : projectVersions )
                {
                    versions.add( new DefaultArtifactVersion( version ) );
                }
View Full Code Here

Examples of org.apache.maven.artifact.metadata.ArtifactMetadataRetrievalException

                    project = null;
                }
                catch ( ProjectBuildingException e )
                {
                    throw new ArtifactMetadataRetrievalException( "Unable to read the metadata file for artifact '" +
                        artifact.getDependencyConflictId() + "': " + e.getMessage(), e, artifact );
                }

                if ( project != null )
                {
View Full Code Here

Examples of org.apache.maven.artifact.metadata.ArtifactMetadataRetrievalException

                    artifacts = project.createArtifacts( artifactFactory, artifact.getScope(),
                                                         artifact.getDependencyFilter() );
                }
                catch ( InvalidDependencyVersionException e )
                {
                    throw new ArtifactMetadataRetrievalException( "Error in metadata for artifact '" +
                        artifact.getDependencyConflictId() + "': " + e.getMessage(), e );
                }
            }

            List repositories = aggregateRepositoryLists( remoteRepositories, project.getRemoteArtifactRepositories() );
View Full Code Here

Examples of org.apache.maven.artifact.metadata.ArtifactMetadataRetrievalException

            {
                superProject = mavenProjectBuilder.buildStandaloneSuperProject( new DefaultProjectBuilderConfiguration() );
            }
            catch ( ProjectBuildingException e )
            {
                throw new ArtifactMetadataRetrievalException(
                    "Unable to parse the Maven built-in model: " + e.getMessage(), e );
            }
        }

        List repositories = new ArrayList();
View Full Code Here

Examples of org.apache.maven.artifact.metadata.ArtifactMetadataRetrievalException

        {
            repositoryMetadataManager.resolve( metadata, remoteRepositories, localRepository );
        }
        catch ( RepositoryMetadataResolutionException e )
        {
            throw new ArtifactMetadataRetrievalException( e.getMessage(), e );
        }

        List versions;
        Metadata repoMetadata = metadata.getMetadata();
        if ( repoMetadata != null && repoMetadata.getVersioning() != null )
View Full Code Here

Examples of org.apache.maven.artifact.metadata.ArtifactMetadataRetrievalException

                        a = createArtifact( "org.apache.maven", "h", "1.0", "jar" );
                        dependencies.add( a );
                    }
                    catch ( Exception e )
                    {
                        throw new ArtifactMetadataRetrievalException( "Error retrieving metadata", e, a );
                    }
                }

                return new ResolutionGroup( artifact, dependencies, remoteRepositories );
            }
View Full Code Here

Examples of org.apache.maven.artifact.metadata.ArtifactMetadataRetrievalException

                        a = createArtifact( "org.apache.maven", "j", "1.0", "jar" );
                        dependencies.add( a );
                    }
                    catch ( Exception e )
                    {
                        throw new ArtifactMetadataRetrievalException( "Error retrieving metadata", e, a );
                    }
                }

                return new ResolutionGroup( artifact, dependencies, remoteRepositories );
            }
View Full Code Here

Examples of org.apache.maven.artifact.metadata.ArtifactMetadataRetrievalException

                        a = createArtifact( "org.apache.maven", "h", "1.0", "jar" );
                        dependencies.add( a );
                    }
                    catch ( Exception e )
                    {
                        throw new ArtifactMetadataRetrievalException( "Error retrieving metadata", e, a );
                    }
                }

                return new ResolutionGroup( artifact, dependencies, remoteRepositories );
            }
View Full Code Here

Examples of org.apache.maven.artifact.metadata.ArtifactMetadataRetrievalException

                        a = createArtifact( "org.apache.maven", "j", "1.0", "jar" );
                        dependencies.add( a );
                    }
                    catch ( Exception e )
                    {
                        throw new ArtifactMetadataRetrievalException( "Error retrieving metadata", e, a );
                    }
                }

                return new ResolutionGroup( artifact, dependencies, remoteRepositories );
            }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.