use of org.eclipse.aether.installation.InstallationException 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.InstallationException in project drools by kiegroup.
the class MavenRepository method installArtifact.
/**
* Installs the given jar into the local repository.
*
* @param releaseId The releaseId with which the kjar will be installed
* @param jar The jar to be installed
* @param pomfile The pom file to be installed together with the kjar
*/
public void installArtifact(ReleaseId releaseId, File jar, File pomfile) {
Artifact jarArtifact = new DefaultArtifact(releaseId.getGroupId(), releaseId.getArtifactId(), "jar", releaseId.getVersion());
jarArtifact = jarArtifact.setFile(jar);
Artifact pomArtifact = new SubArtifact(jarArtifact, "", "pom");
pomArtifact = pomArtifact.setFile(pomfile);
InstallRequest installRequest = new InstallRequest();
installRequest.addArtifact(jarArtifact).addArtifact(pomArtifact);
try {
aether.getSystem().install(aether.getSession(), installRequest);
} catch (InstallationException e) {
throw new RuntimeException(e);
}
}
Aggregations