Package org.apache.maven.artifact.repository

Examples of org.apache.maven.artifact.repository.DefaultArtifactRepository


        f.createNewFile();

        ArtifactRepositoryLayout repoLayout = (ArtifactRepositoryLayout) lookup( ArtifactRepositoryLayout.ROLE,
                                                                                 "legacy" );

        return new DefaultArtifactRepository( "test", "file://" + f.getPath(), repoLayout );
    }
View Full Code Here


        File f = new File( getBasedir(), path );

        ArtifactRepositoryLayout repoLayout = (ArtifactRepositoryLayout) lookup( ArtifactRepositoryLayout.ROLE,
                                                                                 "legacy" );

        return new DefaultArtifactRepository( "local", "file://" + f.getPath(), repoLayout );
    }
View Full Code Here

        File f = new File( getBasedir(), path );

        ArtifactRepositoryLayout repoLayout = (ArtifactRepositoryLayout) lookup( ArtifactRepositoryLayout.ROLE,
                                                                                 "legacy" );

        return new DefaultArtifactRepository( "test", "file://" + f.getPath(), repoLayout,
                                              new ArtifactRepositoryPolicy(), new ArtifactRepositoryPolicy() );
    }
View Full Code Here

        throws Exception
    {
        ArtifactRepositoryLayout repoLayout = (ArtifactRepositoryLayout) lookup( ArtifactRepositoryLayout.ROLE,
                                                                                 "legacy" );

        return new DefaultArtifactRepository( "test", "http://foo.bar/repository", repoLayout );
    }
View Full Code Here

        return "bin/bootstrap.jar" + cpSep + "bin/tomcat-juli.jar";
    }

    private File resolve() {
        if ("snapshots".equals(apacheRepos) || "true".equals(apacheRepos)) {
            remoteRepos.add(new DefaultArtifactRepository("apache", "https://repository.apache.org/content/repositories/snapshots/",
                    new DefaultRepositoryLayout(),
                    new ArtifactRepositoryPolicy(true, UPDATE_POLICY_DAILY, CHECKSUM_POLICY_WARN),
                    new ArtifactRepositoryPolicy(false, UPDATE_POLICY_NEVER, CHECKSUM_POLICY_WARN)));
        } else {
            try {
                new URI(apacheRepos); // to check it is a uri
                remoteRepos.add(new DefaultArtifactRepository("additional-repo-tomee-mvn-plugin", apacheRepos,
                        new DefaultRepositoryLayout(),
                        new ArtifactRepositoryPolicy(true, UPDATE_POLICY_DAILY, CHECKSUM_POLICY_WARN),
                        new ArtifactRepositoryPolicy(true, UPDATE_POLICY_NEVER, CHECKSUM_POLICY_WARN)));
            } catch (URISyntaxException e) {
                // ignored, use classical repos
View Full Code Here

        {
            localRepo = System.getProperty( "user.home" ) + "/.m2/repository";
        }
        ArtifactRepositoryLayout repositoryLayout =
            (ArtifactRepositoryLayout) container.lookup(ArtifactRepositoryLayout.ROLE, "default" );
        return new DefaultArtifactRepository( "local", "file://" + localRepo, repositoryLayout );
    }
View Full Code Here

        }

        ArtifactRepositoryLayout repositoryLayout = (ArtifactRepositoryLayout) container.lookup(
            ArtifactRepositoryLayout.ROLE, "default" );

        localRepository = new DefaultArtifactRepository( "local", "file://" + localRepo, repositoryLayout );
    }
View Full Code Here

        {
            id = "mirror-" + anonymousMirrorIdSeed++;
            getLogger().warn( "You are using a mirror that doesn't declare an <id/> element. Using \'" + id + "\' instead:\nId: " + id + "\nmirrorOf: " + mirrorOf + "\nurl: " + url + "\n" );
        }
       
        ArtifactRepository mirror = new DefaultArtifactRepository( id, url, null );

        //to preserve first wins, don't add repeated mirrors.
        if (!mirrors.containsKey( mirrorOf ))
        {
            mirrors.put( mirrorOf, mirror );
View Full Code Here

    }

    private ArtifactRepository createStringRepo()
    {
        ArtifactRepository repo =
            new DefaultArtifactRepository( "id", "string://url", new ArtifactRepositoryLayoutStub() );
        return repo;
    }
View Full Code Here

     * @param url
     * @return
     */
    private ArtifactRepository getRepo( String id, String url )
    {
        return new DefaultArtifactRepository( id, url, new DefaultRepositoryLayout() );
    }
View Full Code Here

TOP

Related Classes of org.apache.maven.artifact.repository.DefaultArtifactRepository

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.