Package org.sonatype.aether.installation

Examples of org.sonatype.aether.installation.InstallRequest


                                                "pom" );
        pomArtifact = pomArtifact.setFile( pomfile );

        // install into local repository as it's preferred when loading kjars into KieContainer
        try {
            InstallRequest installRequest = new InstallRequest();
            installRequest
                    .addArtifact( jarArtifact )
                    .addArtifact( pomArtifact );

            Aether.getAether().getSystem().install( Aether.getAether().getSession(),
                                                    installRequest );
View Full Code Here


        if (metadataMatcher.matches()) {
            LOGGER.log(Level.INFO, String.format("Received upload request for maven metadata : %s", path));
            try {
                Metadata metadata = convertPathToMetadata(path);
                metadata = metadata.setFile(file);
                InstallRequest request = new InstallRequest();
                request.addMetadata(metadata);
                system.install(session, request);
                LOGGER.log(Level.INFO, "Maven metadata installed: " + request.toString());
            } catch (Exception e) {
                result = UploadContext.ERROR;
                LOGGER.log(Level.WARNING, String.format("Failed to upload metadata: %s due to %s", path, e), e);
            }
            //If no matching metadata found return nothing
        } else if (artifactMatcher.matches()) {
            LOGGER.log(Level.INFO, String.format("Received upload request for maven artifact : %s", path));
            Artifact artifact = null;
            try {
                artifact = convertPathToArtifact(path);
                artifact = artifact.setFile(file);
                InstallRequest request = new InstallRequest();
                request.addArtifact(artifact);
                system.install(session, request);

                result.setGroupId(artifact.getGroupId());
                result.setArtifactId(artifact.getArtifactId());
                result.setVersion(artifact.getVersion());
View Full Code Here

        jarArtifact = jarArtifact.setFile(jar);

        Artifact pomArtifact = new SubArtifact(jarArtifact, "", "pom");
        pomArtifact = pomArtifact.setFile(pom);

        InstallRequest installRequest = new InstallRequest();
        installRequest.addArtifact(jarArtifact).addArtifact(pomArtifact);

        rs.install(session, installRequest);

        return install(gav);
    }
View Full Code Here

TOP

Related Classes of org.sonatype.aether.installation.InstallRequest

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.