Package org.sonatype.aether.util.layout

Examples of org.sonatype.aether.util.layout.MavenDefaultLayout


    private AetherRepositoryWriter() {
    }

    public static void write(Set<Artifact> artifacts, String targetDirectory) throws MojoExecutionException {
        RepositoryLayout m2layout = new MavenDefaultLayout();

        for (Artifact artifact : artifacts) {
            File src = artifact.getFile();
            // set the version (which could be a resolved snapshot) to the base version (which in that case would be
            // literally SNAPSHOT), because that is what lily runtime expects.
            artifact = artifact.setVersion(artifact.getBaseVersion());
            File dest = new File(targetDirectory, m2layout.getPath(artifact).getPath());
            try {
                System.out.println("Copying " + src + " to " + dest);
                FileUtils.copyFile(src, dest);
            } catch (IOException e) {
                throw new MojoExecutionException("Error copying file " + src + " to " + dest);
View Full Code Here


    {
        repository =
            new RemoteRepository( "test", "default",
                                  TestFileUtils.createTempDir( "test-remote-repository" ).toURL().toString() );
        session = new TestRepositorySystemSession();
        layout = new MavenDefaultLayout();
    }
View Full Code Here

    public String getRelativePath()
    {
        if ( artifactTransfer != null )
        {
            return new MavenDefaultLayout().getPath( getArtifact() ).getRawPath();
        }
        else if ( metadataTransfer != null )
        {
            return new MavenDefaultLayout().getPath( getMetadata() ).getRawPath();
        }
        else
        {
            return null;
        }
View Full Code Here

TOP

Related Classes of org.sonatype.aether.util.layout.MavenDefaultLayout

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.