Package org.sonatype.aether.util.layout

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


    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

TOP

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

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.