Package io.github.cdklabs.projen.release
Class MavenPublishOptions.Builder
- java.lang.Object
-
- io.github.cdklabs.projen.release.MavenPublishOptions.Builder
-
- All Implemented Interfaces:
software.amazon.jsii.Builder<MavenPublishOptions>
- Enclosing interface:
- MavenPublishOptions
@Stability(Experimental) public static final class MavenPublishOptions.Builder extends Object implements software.amazon.jsii.Builder<MavenPublishOptions>
A builder forMavenPublishOptions
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
-
-
-
Method Detail
-
mavenEndpoint
@Stability(Experimental) public MavenPublishOptions.Builder mavenEndpoint(String mavenEndpoint)
Sets the value ofMavenPublishOptions.getMavenEndpoint()- Parameters:
mavenEndpoint- URL of Nexus repository. if not set, defaults to https://oss.sonatype.org- Returns:
this
-
mavenGpgPrivateKeyPassphrase
@Stability(Experimental) public MavenPublishOptions.Builder mavenGpgPrivateKeyPassphrase(String mavenGpgPrivateKeyPassphrase)
Sets the value ofMavenPublishOptions.getMavenGpgPrivateKeyPassphrase()- Parameters:
mavenGpgPrivateKeyPassphrase- GitHub secret name which contains the GPG private key or file that includes it. This is used to sign your Maven packages. See instructions.- Returns:
this
-
mavenGpgPrivateKeySecret
@Stability(Experimental) public MavenPublishOptions.Builder mavenGpgPrivateKeySecret(String mavenGpgPrivateKeySecret)
Sets the value ofMavenPublishOptions.getMavenGpgPrivateKeySecret()- Parameters:
mavenGpgPrivateKeySecret- GitHub secret name which contains the GPG private key or file that includes it. This is used to sign your Maven packages. See instructions.- Returns:
this
-
mavenPassword
@Stability(Experimental) public MavenPublishOptions.Builder mavenPassword(String mavenPassword)
Sets the value ofMavenPublishOptions.getMavenPassword()- Parameters:
mavenPassword- GitHub secret name which contains the Password for maven repository. For Maven Central, you will need to Create JIRA account and then request a new project (see links).- Returns:
this
-
mavenRepositoryUrl
@Stability(Experimental) public MavenPublishOptions.Builder mavenRepositoryUrl(String mavenRepositoryUrl)
Sets the value ofMavenPublishOptions.getMavenRepositoryUrl()- Parameters:
mavenRepositoryUrl- Deployment repository when not deploying to Maven Central.- Returns:
this
-
mavenServerId
@Stability(Experimental) public MavenPublishOptions.Builder mavenServerId(String mavenServerId)
Sets the value ofMavenPublishOptions.getMavenServerId()- Parameters:
mavenServerId- Used in maven settings for credential lookup (e.g. use github when publishing to GitHub).- Returns:
this
-
mavenStagingProfileId
@Stability(Experimental) public MavenPublishOptions.Builder mavenStagingProfileId(String mavenStagingProfileId)
Sets the value ofMavenPublishOptions.getMavenStagingProfileId()- Parameters:
mavenStagingProfileId- GitHub secret name which contains the Maven Central (sonatype) staging profile ID (e.g. 68a05363083174). Staging profile ID can be found in the URL of the "Releases" staging profile under "Staging Profiles" in https://oss.sonatype.org (e.g. https://oss.sonatype.org/#stagingProfiles;11a33451234521).- Returns:
this
-
mavenUsername
@Stability(Experimental) public MavenPublishOptions.Builder mavenUsername(String mavenUsername)
Sets the value ofMavenPublishOptions.getMavenUsername()- Parameters:
mavenUsername- GitHub secret name which contains the Username for maven repository. For Maven Central, you will need to Create JIRA account and then request a new project (see links).- Returns:
this
-
postPublishSteps
@Stability(Experimental) public MavenPublishOptions.Builder postPublishSteps(List<? extends JobStep> postPublishSteps)
Sets the value ofCommonPublishOptions.getPostPublishSteps()- Parameters:
postPublishSteps- Steps to execute after executing the publishing command. These can be used to add/update the release artifacts ot any other tasks needed.Note that when using this in
publishToGitHubReleasesthis will override steps added viaaddGitHubPostPublishingSteps.- Returns:
this
-
prePublishSteps
@Stability(Experimental) public MavenPublishOptions.Builder prePublishSteps(List<? extends JobStep> prePublishSteps)
Sets the value ofCommonPublishOptions.getPrePublishSteps()- Parameters:
prePublishSteps- Steps to execute before executing the publishing command. These can be used to prepare the artifact for publishing if neede. These steps are executed afterdist/has been populated with the build output.Note that when using this in
publishToGitHubReleasesthis will override steps added viaaddGitHubPrePublishingSteps.- Returns:
this
-
publishTools
@Stability(Experimental) public MavenPublishOptions.Builder publishTools(Tools publishTools)
Sets the value ofCommonPublishOptions.getPublishTools()- Parameters:
publishTools- Additional tools to install in the publishing job.- Returns:
this
-
build
@Stability(Experimental) public MavenPublishOptions build()
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<MavenPublishOptions>- Returns:
- a new instance of
MavenPublishOptions - Throws:
NullPointerException- if any required attribute was not provided
-
-