Package org.apache.maven.repository.internal

Examples of org.apache.maven.repository.internal.DefaultArtifactDescriptorReader


    public void setUp()
        throws Exception
    {
        ArtifactResolver resolver = lookup( ArtifactResolver.class, "classpath" );
        DefaultArtifactDescriptorReader pomReader = (DefaultArtifactDescriptorReader)lookup(ArtifactDescriptorReader.class);
        pomReader.setArtifactResolver( resolver );

        projectBuilder = lookup( ProjectBuilder.class, "classpath" );

        // the metadata source looks up the default impl, so we have to trick it
        getContainer().addComponent( projectBuilder, ProjectBuilder.class, "default" );
View Full Code Here


    public void setUp()
        throws Exception
    {
        ArtifactResolver resolver = lookup( ArtifactResolver.class, "classpath" );
        DefaultArtifactDescriptorReader pomReader = (DefaultArtifactDescriptorReader)lookup(ArtifactDescriptorReader.class);
        pomReader.setArtifactResolver( resolver );

        projectBuilder = lookup( ProjectBuilder.class, "classpath" );

        // the metadata source looks up the default impl, so we have to trick it
        getContainer().addComponent( projectBuilder, ProjectBuilder.class, "default" );
View Full Code Here

     * @throws IllegalAccessException
     */
    private void enforceArtifactoryResolver() throws ComponentLookupException, InvocationTargetException, IllegalAccessException {
        logger.debug("Enforcing Artifactory artifact resolver");

        DefaultArtifactDescriptorReader descriptorReader = (DefaultArtifactDescriptorReader)plexusContainer.lookup("org.sonatype.aether.impl.ArtifactDescriptorReader");
        org.sonatype.aether.impl.internal.DefaultRepositorySystem repositorySystem = (org.sonatype.aether.impl.internal.DefaultRepositorySystem)plexusContainer.lookup("org.sonatype.aether.RepositorySystem");

        org.sonatype.aether.impl.ArtifactResolver artifactoryResolver = (org.sonatype.aether.impl.ArtifactResolver)plexusContainer.lookup("org.jfrog.build.extractor.maven.resolver.ArtifactorySonatypeArtifactResolver");
        this.artifactoryResolver = (ArtifactorySonatypeArtifactResolver)artifactoryResolver;
        repositorySystem.setArtifactResolver(artifactoryResolver);
View Full Code Here

     * @throws ComponentLookupException
     */
    private void enforceArtifactoryResolver() throws ComponentLookupException {
        logger.debug("Enforcing Artifactory artifact resolver");

        DefaultArtifactDescriptorReader descriptorReader = (DefaultArtifactDescriptorReader)plexusContainer.lookup("org.eclipse.aether.impl.ArtifactDescriptorReader");
        org.eclipse.aether.internal.impl.DefaultRepositorySystem repositorySystem = (org.eclipse.aether.internal.impl.DefaultRepositorySystem)plexusContainer.lookup("org.eclipse.aether.RepositorySystem");

        org.eclipse.aether.impl.ArtifactResolver artifactoryResolver = (org.eclipse.aether.impl.ArtifactResolver)plexusContainer.lookup("org.jfrog.build.extractor.maven.resolver.ArtifactoryEclipseArtifactResolver");

        this.artifactoryResolver = (ArtifactoryEclipseArtifactResolver)artifactoryResolver;

        descriptorReader.setArtifactResolver(artifactoryResolver);
        repositorySystem.setArtifactResolver(artifactoryResolver);

        artifactoryRepositoriesEnforced = true;
        synchronized (artifactoryRepositoriesEnforced) {
            artifactoryRepositoriesEnforced.notifyAll();
View Full Code Here

        internalConfiguration = new ArtifactoryClientConfiguration(log);
        internalConfiguration.fillFromProperties(allProps);
    }

    private void setArtifactoryEclipseArtifactResolver() throws ComponentLookupException {
        DefaultArtifactDescriptorReader descriptorReader = (DefaultArtifactDescriptorReader)plexusContainer.lookup("org.eclipse.aether.impl.ArtifactDescriptorReader");
        org.eclipse.aether.internal.impl.DefaultRepositorySystem repositorySystem = (org.eclipse.aether.internal.impl.DefaultRepositorySystem)plexusContainer.lookup("org.eclipse.aether.RepositorySystem");

        org.eclipse.aether.impl.ArtifactResolver artifactoryResolver = (org.eclipse.aether.impl.ArtifactResolver)plexusContainer.lookup("org.jfrog.build.extractor.maven.resolver.ArtifactoryEclipseArtifactResolver");

        descriptorReader.setArtifactResolver(artifactoryResolver);
        repositorySystem.setArtifactResolver(artifactoryResolver);//
    }
View Full Code Here

        descriptorReader.setArtifactResolver(artifactoryResolver);
        repositorySystem.setArtifactResolver(artifactoryResolver);//
    }

    private void setArtifactorySonatypeArtifactResolver() throws ComponentLookupException, InvocationTargetException, IllegalAccessException {
        DefaultArtifactDescriptorReader descriptorReader = (DefaultArtifactDescriptorReader)plexusContainer.lookup("org.sonatype.aether.impl.ArtifactDescriptorReader");
        org.sonatype.aether.impl.internal.DefaultRepositorySystem repositorySystem = (org.sonatype.aether.impl.internal.DefaultRepositorySystem)plexusContainer.lookup("org.sonatype.aether.RepositorySystem");

        org.sonatype.aether.impl.ArtifactResolver artifactoryResolver = (org.sonatype.aether.impl.ArtifactResolver)plexusContainer.lookup("org.jfrog.build.extractor.maven.resolver.ArtifactorySonatypeArtifactResolver");
        repositorySystem.setArtifactResolver(artifactoryResolver);
View Full Code Here

    public void setUp()
        throws Exception
    {
        ArtifactResolver resolver = lookup( ArtifactResolver.class, "classpath" );
        DefaultArtifactDescriptorReader pomReader = (DefaultArtifactDescriptorReader)lookup(ArtifactDescriptorReader.class);
        pomReader.setArtifactResolver( resolver );

        projectBuilder = lookup( ProjectBuilder.class, "classpath" );

        // the metadata source looks up the default impl, so we have to trick it
        getContainer().addComponent( projectBuilder, ProjectBuilder.class, "default" );
View Full Code Here

TOP

Related Classes of org.apache.maven.repository.internal.DefaultArtifactDescriptorReader

Copyright © 2018 www.massapicom. 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.