VersionsMetadataGenerator( RepositorySystemSession session, InstallRequest request ) { this( session, request.getMetadata() ); }
LegacyLocalRepositoryManager.overlay( localRepository, legacySupport.getRepositorySession(), repoSystem ); InstallRequest request = new InstallRequest(); request.setTrace( RequestTrace.newChild( null, legacySupport.getSession().getCurrentProject() ) ); request.addArtifact( mainArtifact ); request.addArtifact( pomArtifact ); request.addMetadata( new MetadataBridge( metadata ) ); throw new ArtifactInstallationException( e.getMessage(), e );
@Override public String toString() { return getArtifacts() + ", " + getMetadata(); }
public void install( Artifact artifact, Artifact pom ) throws InstallationException { RepositorySystemSession session = newSession(); InstallRequest installRequest = new InstallRequest(); installRequest.addArtifact( artifact ).addArtifact( pom ); repositorySystem.install( session, installRequest ); }
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; } }
/** * 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(); } }
/** * Installs a file as artifact to a local repository. * * @param spec <groupId>:<artifactId>[:<extension>[:<classifier>]]:<version> * @param file artifact file * @throws InstallationException */ public void install(String spec, File file) throws InstallationException { InstallRequest request = new InstallRequest(); Artifact artifact = new DefaultArtifact(spec).setFile(file); request.setArtifacts(ImmutableList.of(artifact)); repositorySystem.install(session, request); }
@Override public String toString() { return getArtifacts() + ", " + getMetadata(); }
@Override public InstallResult answer(InvocationOnMock invocation) throws Throwable { return new InstallResult((InstallRequest) invocation.getArguments()[1]); } });
@Override public void deploy(final String pom, Artifact... artifacts) { try { final InstallRequest installRequest = new InstallRequest(); for (Artifact artifact : artifacts) { installRequest .addArtifact(artifact); } Aether.getAether().getSystem().install(Aether.getAether().getSession(), installRequest); } catch (InstallationException e) { throw new RuntimeException(e); } }
public void installArtifact(String groupId, String artifactId, String ext, String classifier, String version, File artifactFile, File pomFile) throws Exception { Artifact jarArtifact = new DefaultArtifact(groupId, artifactId, classifier, ext, version); jarArtifact = jarArtifact.setFile(artifactFile); Artifact pomArtifact = new SubArtifact(jarArtifact, "", "pom"); pomArtifact = pomArtifact.setFile(pomFile); InstallRequest installRequest = new InstallRequest(); installRequest.addArtifact(jarArtifact ).addArtifact( pomArtifact ); InstallResult result = system.install(session, installRequest); if (!result.getArtifacts().contains(jarArtifact)) { throw new AssertionError("Could not install jar " + jarArtifact); } if (!result.getArtifacts().contains(pomArtifact)) { throw new AssertionError("Could not install pom " + jarArtifact); } }
/** * 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(); } }
@Override public String toString() { return getArtifacts() + ", " + getMetadata(); }
public VersionsMetadataGenerator( RepositorySystemSession session, InstallRequest request ) { this( session, request.getMetadata() ); }
@Override public String toString() { return getArtifacts() + ", " + getMetadata(); }
@Override public InstallResult answer(InvocationOnMock invocation) throws Throwable { return new InstallResult((InstallRequest) invocation.getArguments()[1]); } });
@Override public void deploy(final String pom, Artifact... artifacts) { try { final InstallRequest installRequest = new InstallRequest(); for (Artifact artifact : artifacts) { installRequest .addArtifact(artifact); } Aether.getAether().getSystem().install(Aether.getAether().getSession(), installRequest); } catch (InstallationException e) { throw new RuntimeException(e); } }
public VersionsMetadataGenerator( RepositorySystemSession session, InstallRequest request ) { this( session, request.getMetadata() ); }
@Override public InstallResult answer(InvocationOnMock invocation) throws Throwable { return new InstallResult((InstallRequest) invocation.getArguments()[1]); } });
VersionsMetadataGenerator( RepositorySystemSession session, InstallRequest request ) { this( session, request.getMetadata() ); }