use of org.eclipse.aether.installation.InstallResult in project unleash-maven-plugin by shillner.
the class ArtifactInstaller method installArtifacts.
/**
* Installs the given artifacts into the local Maven repository.
*
* @param artifacts the artifacts to install.
* @return the artifacts that have been installed successfully.
* @throws InstallationException if anything goes wrong during the installation process.
*/
public Collection<Artifact> installArtifacts(Collection<Artifact> artifacts) throws InstallationException {
InstallRequest request = new InstallRequest();
request.setArtifacts(artifacts);
InstallResult result = this.installer.install(this.repoSession, request);
return result.getArtifacts();
}
use of org.eclipse.aether.installation.InstallResult in project ceylon by eclipse.
the class Bug2414 method bug.
public static void bug(Artifact jarArtifact) {
// locator.getService(RepositorySystem.class);
final RepositorySystem system = null;
// MavenRepositorySystemUtils.newSession();
final DefaultRepositorySystemSession session = null;
ModuleCopycat copycat = new ModuleCopycat(rmb.buildManager(), new RepositoryManager() {
@Override
public void putArtifact(ArtifactContext artifactContext, File file) throws RepositoryException {
try {
InstallRequest installRequest = new InstallRequest();
installRequest.addArtifact(jarArtifact);
InstallResult result = system.install(session, installRequest);
} catch (InstallationException e) {
throw new RepositoryException(e);
}
}
});
}
use of org.eclipse.aether.installation.InstallResult in project kie-wb-common by kiegroup.
the class MavenArtifactResolverTest method deployTestJar.
private boolean deployTestJar(Artifact jarArtifact, RepositorySystemSession session) throws InstallationException {
final InstallRequest installRequest = new InstallRequest();
installRequest.addArtifact(jarArtifact);
InstallResult result = Aether.getAether().getSystem().install(session, installRequest);
return result.getArtifacts().size() == 1;
}
Aggregations