public class Publisher extends Object
| Modifier and Type | Field and Description |
|---|---|
static URL |
MAVEN_CENTRAL |
static String |
MAVEN_CENTRAL_URL |
| Constructor and Description |
|---|
Publisher(Path localRepoPath,
URL remoteRepoUrl,
Optional<String> username,
Optional<String> password,
boolean dryRun) |
| Modifier and Type | Method and Description |
|---|---|
org.eclipse.aether.deployment.DeployResult |
publish(org.eclipse.aether.artifact.Artifact descriptor,
List<File> toPublish) |
org.eclipse.aether.deployment.DeployResult |
publish(List<org.eclipse.aether.artifact.Artifact> toPublish) |
com.google.common.collect.ImmutableSet<org.eclipse.aether.deployment.DeployResult> |
publish(SourcePathResolverAdapter pathResolver,
com.google.common.collect.ImmutableSet<MavenPublishable> publishables) |
org.eclipse.aether.deployment.DeployResult |
publish(String groupId,
String artifactId,
String version,
List<File> toPublish) |
public static final String MAVEN_CENTRAL_URL
public static final URL MAVEN_CENTRAL
public Publisher(Path localRepoPath, URL remoteRepoUrl, Optional<String> username, Optional<String> password, boolean dryRun)
localRepoPath - Typically obtained as ProjectFilesystem.getRootPath()remoteRepoUrl - Canonically MAVEN_CENTRAL_URLdryRun - if true, a dummy DeployResult will be returned, with the fully
constructed DeployRequest. No actual publishing will happenpublic com.google.common.collect.ImmutableSet<org.eclipse.aether.deployment.DeployResult> publish(SourcePathResolverAdapter pathResolver, com.google.common.collect.ImmutableSet<MavenPublishable> publishables) throws org.eclipse.aether.deployment.DeploymentException
org.eclipse.aether.deployment.DeploymentExceptionpublic org.eclipse.aether.deployment.DeployResult publish(String groupId, String artifactId, String version, List<File> toPublish) throws org.eclipse.aether.deployment.DeploymentException
org.eclipse.aether.deployment.DeploymentExceptionpublic org.eclipse.aether.deployment.DeployResult publish(org.eclipse.aether.artifact.Artifact descriptor,
List<File> toPublish)
throws org.eclipse.aether.deployment.DeploymentException
descriptor - an Artifact, holding the maven coordinates for the published files
less the extension that is to be derived from the files. The descriptor itself will
not be published as is, and the File attached to it (if any) will be ignored.toPublish - File(s) to be published using the given coordinates. The filename
extension of each given file will be used as a maven "extension" coordinateorg.eclipse.aether.deployment.DeploymentExceptionpublic org.eclipse.aether.deployment.DeployResult publish(List<org.eclipse.aether.artifact.Artifact> toPublish) throws org.eclipse.aether.deployment.DeploymentException
toPublish - each Artifact must contain a file, that will be published under maven
coordinates in the corresponding Artifact.org.eclipse.aether.deployment.DeploymentExceptionArtifact.setFile(java.io.File)