Class PDKPipelineJavaProjectOptions.Builder

    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • mainClass

        @Stability(Experimental)
        public PDKPipelineJavaProjectOptions.Builder mainClass​(String mainClass)
        Sets the value of AwsCdkJavaAppOptions.getMainClass()
        Parameters:
        mainClass - The name of the Java class with the static `main()` method. This parameter is required. This method should call app.synth() on the CDK app.
        Returns:
        this
      • sample

        @Stability(Experimental)
        public PDKPipelineJavaProjectOptions.Builder sample​(Boolean sample)
        Sets the value of JavaProjectOptions.getSample()
        Parameters:
        sample - Include sample code and test if the relevant directories don't exist.
        Returns:
        this
      • sampleJavaPackage

        @Stability(Experimental)
        public PDKPipelineJavaProjectOptions.Builder sampleJavaPackage​(String sampleJavaPackage)
        Sets the value of JavaProjectOptions.getSampleJavaPackage()
        Parameters:
        sampleJavaPackage - The java package to use for the code sample.
        Returns:
        this
      • compileOptions

        @Stability(Experimental)
        public PDKPipelineJavaProjectOptions.Builder compileOptions​(io.github.cdklabs.projen.java.MavenCompileOptions compileOptions)
        Sets the value of JavaProjectCommonOptions.getCompileOptions()
        Parameters:
        compileOptions - Compile options.
        Returns:
        this
      • deps

        @Stability(Experimental)
        public PDKPipelineJavaProjectOptions.Builder deps​(List<String> deps)
        Sets the value of JavaProjectCommonOptions.getDeps()
        Parameters:
        deps - List of runtime dependencies for this project. Dependencies use the format: <groupId>/<artifactId>@<semver>

        Additional dependencies can be added via project.addDependency().

        Returns:
        this
      • distdir

        @Stability(Experimental)
        public PDKPipelineJavaProjectOptions.Builder distdir​(String distdir)
        Sets the value of JavaProjectCommonOptions.getDistdir()
        Parameters:
        distdir - Final artifact output directory.
        Returns:
        this
      • junitOptions

        @Stability(Experimental)
        public PDKPipelineJavaProjectOptions.Builder junitOptions​(io.github.cdklabs.projen.java.JunitOptions junitOptions)
        Sets the value of JavaProjectCommonOptions.getJunitOptions()
        Parameters:
        junitOptions - junit options.
        Returns:
        this
      • packagingOptions

        @Stability(Experimental)
        public PDKPipelineJavaProjectOptions.Builder packagingOptions​(io.github.cdklabs.projen.java.MavenPackagingOptions packagingOptions)
        Sets the value of JavaProjectCommonOptions.getPackagingOptions()
        Parameters:
        packagingOptions - Packaging options.
        Returns:
        this
      • projenrcJava

        @Stability(Experimental)
        public PDKPipelineJavaProjectOptions.Builder projenrcJava​(Boolean projenrcJava)
        Sets the value of JavaProjectCommonOptions.getProjenrcJava()
        Parameters:
        projenrcJava - Use projenrc in java. This will install projen as a java dependency and will add a synth task which will compile & execute main() from src/main/java/projenrc.java.
        Returns:
        this
      • projenrcJavaOptions

        @Stability(Experimental)
        public PDKPipelineJavaProjectOptions.Builder projenrcJavaOptions​(io.github.cdklabs.projen.java.ProjenrcOptions projenrcJavaOptions)
        Sets the value of JavaProjectCommonOptions.getProjenrcJavaOptions()
        Parameters:
        projenrcJavaOptions - Options related to projenrc in java.
        Returns:
        this
      • testDeps

        @Stability(Experimental)
        public PDKPipelineJavaProjectOptions.Builder testDeps​(List<String> testDeps)
        Sets the value of JavaProjectCommonOptions.getTestDeps()
        Parameters:
        testDeps - List of test dependencies for this project. Dependencies use the format: <groupId>/<artifactId>@<semver>

        Additional dependencies can be added via project.addTestDependency().

        Returns:
        this
      • autoApproveOptions

        @Stability(Experimental)
        public PDKPipelineJavaProjectOptions.Builder autoApproveOptions​(io.github.cdklabs.projen.github.AutoApproveOptions autoApproveOptions)
        Sets the value of GitHubProjectOptions.getAutoApproveOptions()
        Parameters:
        autoApproveOptions - Enable and configure the 'auto approve' workflow.
        Returns:
        this
      • autoMerge

        @Stability(Experimental)
        public PDKPipelineJavaProjectOptions.Builder autoMerge​(Boolean autoMerge)
        Sets the value of GitHubProjectOptions.getAutoMerge()
        Parameters:
        autoMerge - Enable automatic merging on GitHub. Has no effect if github.mergify is set to false.
        Returns:
        this
      • autoMergeOptions

        @Stability(Experimental)
        public PDKPipelineJavaProjectOptions.Builder autoMergeOptions​(io.github.cdklabs.projen.github.AutoMergeOptions autoMergeOptions)
        Sets the value of GitHubProjectOptions.getAutoMergeOptions()
        Parameters:
        autoMergeOptions - Configure options for automatic merging on GitHub. Has no effect if github.mergify or autoMerge is set to false.
        Returns:
        this
      • clobber

        @Stability(Experimental)
        public PDKPipelineJavaProjectOptions.Builder clobber​(Boolean clobber)
        Sets the value of GitHubProjectOptions.getClobber()
        Parameters:
        clobber - Add a `clobber` task which resets the repo to origin.
        Returns:
        this
      • devContainer

        @Stability(Experimental)
        public PDKPipelineJavaProjectOptions.Builder devContainer​(Boolean devContainer)
        Sets the value of GitHubProjectOptions.getDevContainer()
        Parameters:
        devContainer - Add a VSCode development environment (used for GitHub Codespaces).
        Returns:
        this
      • github

        @Stability(Experimental)
        public PDKPipelineJavaProjectOptions.Builder github​(Boolean github)
        Sets the value of GitHubProjectOptions.getGithub()
        Parameters:
        github - Enable GitHub integration. Enabled by default for root projects. Disabled for non-root projects.
        Returns:
        this
      • githubOptions

        @Stability(Experimental)
        public PDKPipelineJavaProjectOptions.Builder githubOptions​(io.github.cdklabs.projen.github.GitHubOptions githubOptions)
        Sets the value of GitHubProjectOptions.getGithubOptions()
        Parameters:
        githubOptions - Options for GitHub integration.
        Returns:
        this
      • gitpod

        @Stability(Experimental)
        public PDKPipelineJavaProjectOptions.Builder gitpod​(Boolean gitpod)
        Sets the value of GitHubProjectOptions.getGitpod()
        Parameters:
        gitpod - Add a Gitpod development environment.
        Returns:
        this
      • mergify

        @Stability(Deprecated)
        @Deprecated
        public PDKPipelineJavaProjectOptions.Builder mergify​(Boolean mergify)
        Deprecated.
        use `githubOptions.mergify` instead
        Sets the value of GitHubProjectOptions.getMergify()
        Parameters:
        mergify - Whether mergify should be enabled on this repository or not.
        Returns:
        this
      • mergifyOptions

        @Stability(Deprecated)
        @Deprecated
        public PDKPipelineJavaProjectOptions.Builder mergifyOptions​(io.github.cdklabs.projen.github.MergifyOptions mergifyOptions)
        Deprecated.
        use `githubOptions.mergifyOptions` instead
        Sets the value of GitHubProjectOptions.getMergifyOptions()
        Parameters:
        mergifyOptions - Options for mergify.
        Returns:
        this
      • projectType

        @Stability(Deprecated)
        @Deprecated
        public PDKPipelineJavaProjectOptions.Builder projectType​(io.github.cdklabs.projen.ProjectType projectType)
        Deprecated.
        no longer supported at the base project level
        Sets the value of GitHubProjectOptions.getProjectType()
        Parameters:
        projectType - Which type of project this is (library/app).
        Returns:
        this
      • projenCredentials

        @Stability(Experimental)
        public PDKPipelineJavaProjectOptions.Builder projenCredentials​(io.github.cdklabs.projen.github.GithubCredentials projenCredentials)
        Sets the value of GitHubProjectOptions.getProjenCredentials()
        Parameters:
        projenCredentials - Choose a method of providing GitHub API access for projen workflows.
        Returns:
        this
      • projenTokenSecret

        @Stability(Deprecated)
        @Deprecated
        public PDKPipelineJavaProjectOptions.Builder projenTokenSecret​(String projenTokenSecret)
        Deprecated.
        use `projenCredentials`
        Sets the value of GitHubProjectOptions.getProjenTokenSecret()
        Parameters:
        projenTokenSecret - The name of a secret which includes a GitHub Personal Access Token to be used by projen workflows. This token needs to have the repo, workflows and packages scope.
        Returns:
        this
      • readme

        @Stability(Experimental)
        public PDKPipelineJavaProjectOptions.Builder readme​(io.github.cdklabs.projen.SampleReadmeProps readme)
        Sets the value of GitHubProjectOptions.getReadme()
        Parameters:
        readme - The README setup.
        Returns:
        this
      • stale

        @Stability(Experimental)
        public PDKPipelineJavaProjectOptions.Builder stale​(Boolean stale)
        Sets the value of GitHubProjectOptions.getStale()
        Parameters:
        stale - Auto-close of stale issues and pull request. See staleOptions for options.
        Returns:
        this
      • staleOptions

        @Stability(Experimental)
        public PDKPipelineJavaProjectOptions.Builder staleOptions​(io.github.cdklabs.projen.github.StaleOptions staleOptions)
        Sets the value of GitHubProjectOptions.getStaleOptions()
        Parameters:
        staleOptions - Auto-close stale issues and pull requests. To disable set stale to false.
        Returns:
        this
      • vscode

        @Stability(Experimental)
        public PDKPipelineJavaProjectOptions.Builder vscode​(Boolean vscode)
        Sets the value of GitHubProjectOptions.getVscode()
        Parameters:
        vscode - Enable VSCode integration. Enabled by default for root projects. Disabled for non-root projects.
        Returns:
        this
      • name

        @Stability(Experimental)
        public PDKPipelineJavaProjectOptions.Builder name​(String name)
        Sets the value of ProjectOptions.getName()
        Parameters:
        name - This is the name of your project. This parameter is required.
        Returns:
        this
      • commitGenerated

        @Stability(Experimental)
        public PDKPipelineJavaProjectOptions.Builder commitGenerated​(Boolean commitGenerated)
        Sets the value of ProjectOptions.getCommitGenerated()
        Parameters:
        commitGenerated - Whether to commit the managed files by default.
        Returns:
        this
      • logging

        @Stability(Experimental)
        public PDKPipelineJavaProjectOptions.Builder logging​(io.github.cdklabs.projen.LoggerOptions logging)
        Sets the value of ProjectOptions.getLogging()
        Parameters:
        logging - Configure logging options such as verbosity.
        Returns:
        this
      • outdir

        @Stability(Experimental)
        public PDKPipelineJavaProjectOptions.Builder outdir​(String outdir)
        Sets the value of ProjectOptions.getOutdir()
        Parameters:
        outdir - The root directory of the project. Relative to this directory, all files are synthesized.

        If this project has a parent, this directory is relative to the parent directory and it cannot be the same as the parent or any of it's other sub-projects.

        Returns:
        this
      • parent

        @Stability(Experimental)
        public PDKPipelineJavaProjectOptions.Builder parent​(io.github.cdklabs.projen.Project parent)
        Sets the value of ProjectOptions.getParent()
        Parameters:
        parent - The parent project, if this project is part of a bigger project.
        Returns:
        this
      • projenCommand

        @Stability(Experimental)
        public PDKPipelineJavaProjectOptions.Builder projenCommand​(String projenCommand)
        Sets the value of ProjectOptions.getProjenCommand()
        Parameters:
        projenCommand - The shell command to use in order to run the projen CLI. Can be used to customize in special environments.
        Returns:
        this
      • projenrcJson

        @Stability(Experimental)
        public PDKPipelineJavaProjectOptions.Builder projenrcJson​(Boolean projenrcJson)
        Sets the value of ProjectOptions.getProjenrcJson()
        Parameters:
        projenrcJson - Generate (once) .projenrc.json (in JSON). Set to `false` in order to disable .projenrc.json generation.
        Returns:
        this
      • projenrcJsonOptions

        @Stability(Experimental)
        public PDKPipelineJavaProjectOptions.Builder projenrcJsonOptions​(io.github.cdklabs.projen.ProjenrcOptions projenrcJsonOptions)
        Sets the value of ProjectOptions.getProjenrcJsonOptions()
        Parameters:
        projenrcJsonOptions - Options for .projenrc.json.
        Returns:
        this
      • renovatebot

        @Stability(Experimental)
        public PDKPipelineJavaProjectOptions.Builder renovatebot​(Boolean renovatebot)
        Sets the value of ProjectOptions.getRenovatebot()
        Parameters:
        renovatebot - Use renovatebot to handle dependency upgrades.
        Returns:
        this
      • renovatebotOptions

        @Stability(Experimental)
        public PDKPipelineJavaProjectOptions.Builder renovatebotOptions​(io.github.cdklabs.projen.RenovatebotOptions renovatebotOptions)
        Sets the value of ProjectOptions.getRenovatebotOptions()
        Parameters:
        renovatebotOptions - Options for renovatebot.
        Returns:
        this
      • artifactId

        @Stability(Experimental)
        public PDKPipelineJavaProjectOptions.Builder artifactId​(String artifactId)
        Sets the value of PomOptions.getArtifactId()
        Parameters:
        artifactId - The artifactId is generally the name that the project is known by. This parameter is required. Although the groupId is important, people within the group will rarely mention the groupId in discussion (they are often all be the same ID, such as the MojoHaus project groupId: org.codehaus.mojo). It, along with the groupId, creates a key that separates this project from every other project in the world (at least, it should :) ). Along with the groupId, the artifactId fully defines the artifact's living quarters within the repository. In the case of the above project, my-project lives in $M2_REPO/org/codehaus/mojo/my-project.
        Returns:
        this
      • groupId

        @Stability(Experimental)
        public PDKPipelineJavaProjectOptions.Builder groupId​(String groupId)
        Sets the value of PomOptions.getGroupId()
        Parameters:
        groupId - This is generally unique amongst an organization or a project. This parameter is required. For example, all core Maven artifacts do (well, should) live under the groupId org.apache.maven. Group ID's do not necessarily use the dot notation, for example, the junit project. Note that the dot-notated groupId does not have to correspond to the package structure that the project contains. It is, however, a good practice to follow. When stored within a repository, the group acts much like the Java packaging structure does in an operating system. The dots are replaced by OS specific directory separators (such as '/' in Unix) which becomes a relative directory structure from the base repository. In the example given, the org.codehaus.mojo group lives within the directory $M2_REPO/org/codehaus/mojo.
        Returns:
        this
      • version

        @Stability(Experimental)
        public PDKPipelineJavaProjectOptions.Builder version​(String version)
        Sets the value of PomOptions.getVersion()
        Parameters:
        version - This is the last piece of the naming puzzle. This parameter is required. groupId:artifactId denotes a single project but they cannot delineate which incarnation of that project we are talking about. Do we want the junit:junit of 2018 (version 4.12), or of 2007 (version 3.8.2)? In short: code changes, those changes should be versioned, and this element keeps those versions in line. It is also used within an artifact's repository to separate versions from each other. my-project version 1.0 files live in the directory structure $M2_REPO/org/codehaus/mojo/my-project/1.0.
        Returns:
        this
      • description

        @Stability(Experimental)
        public PDKPipelineJavaProjectOptions.Builder description​(String description)
        Sets the value of PomOptions.getDescription()
        Parameters:
        description - Description of a project is always good. Although this should not replace formal documentation, a quick comment to any readers of the POM is always helpful.
        Returns:
        this
      • packaging

        @Stability(Experimental)
        public PDKPipelineJavaProjectOptions.Builder packaging​(String packaging)
        Sets the value of PomOptions.getPackaging()
        Parameters:
        packaging - Project packaging format.
        Returns:
        this
      • url

        @Stability(Experimental)
        public PDKPipelineJavaProjectOptions.Builder url​(String url)
        Sets the value of PomOptions.getUrl()
        Parameters:
        url - The URL, like the name, is not required. This is a nice gesture for projects users, however, so that they know where the project lives.
        Returns:
        this
      • buildCommand

        @Stability(Experimental)
        public PDKPipelineJavaProjectOptions.Builder buildCommand​(String buildCommand)
        Sets the value of CdkConfigCommonOptions.getBuildCommand()
        Parameters:
        buildCommand - A command to execute before synthesis. This command will be called when running cdk synth or when cdk watch identifies a change in your source code before redeployment.
        Returns:
        this
      • context

        @Stability(Experimental)
        public PDKPipelineJavaProjectOptions.Builder context​(Map<String,​? extends Object> context)
        Sets the value of CdkConfigCommonOptions.getContext()
        Parameters:
        context - Additional context to include in `cdk.json`.
        Returns:
        this
      • featureFlags

        @Stability(Experimental)
        public PDKPipelineJavaProjectOptions.Builder featureFlags​(Boolean featureFlags)
        Sets the value of CdkConfigCommonOptions.getFeatureFlags()
        Parameters:
        featureFlags - Include all feature flags in cdk.json.
        Returns:
        this
      • requireApproval

        @Stability(Experimental)
        public PDKPipelineJavaProjectOptions.Builder requireApproval​(io.github.cdklabs.projen.awscdk.ApprovalLevel requireApproval)
        Sets the value of CdkConfigCommonOptions.getRequireApproval()
        Parameters:
        requireApproval - To protect you against unintended changes that affect your security posture, the AWS CDK Toolkit prompts you to approve security-related changes before deploying them.
        Returns:
        this
      • watchExcludes

        @Stability(Experimental)
        public PDKPipelineJavaProjectOptions.Builder watchExcludes​(List<String> watchExcludes)
        Sets the value of CdkConfigCommonOptions.getWatchExcludes()
        Parameters:
        watchExcludes - Glob patterns to exclude from `cdk watch`.
        Returns:
        this
      • watchIncludes

        @Stability(Experimental)
        public PDKPipelineJavaProjectOptions.Builder watchIncludes​(List<String> watchIncludes)
        Sets the value of CdkConfigCommonOptions.getWatchIncludes()
        Parameters:
        watchIncludes - Glob patterns to include in `cdk watch`.
        Returns:
        this
      • cdkVersion

        @Stability(Experimental)
        public PDKPipelineJavaProjectOptions.Builder cdkVersion​(String cdkVersion)
        Sets the value of AwsCdkDepsCommonOptions.getCdkVersion()
        Parameters:
        cdkVersion - Minimum version of the AWS CDK to depend on. This parameter is required.
        Returns:
        this
      • cdkAssert

        @Stability(Deprecated)
        @Deprecated
        public PDKPipelineJavaProjectOptions.Builder cdkAssert​(Boolean cdkAssert)
        Deprecated.
        The
        Sets the value of AwsCdkDepsCommonOptions.getCdkAssert()
        Parameters:
        cdkAssert - Warning: NodeJS only. Install the @aws-cdk/assert library?
        Returns:
        this
      • cdkAssertions

        @Stability(Experimental)
        public PDKPipelineJavaProjectOptions.Builder cdkAssertions​(Boolean cdkAssertions)
        Sets the value of AwsCdkDepsCommonOptions.getCdkAssertions()
        Parameters:
        cdkAssertions - Install the assertions library?. Only needed for CDK 1.x. If using CDK 2.x then assertions is already included in 'aws-cdk-lib'
        Returns:
        this
      • cdkDependencies

        @Stability(Deprecated)
        @Deprecated
        public PDKPipelineJavaProjectOptions.Builder cdkDependencies​(List<String> cdkDependencies)
        Deprecated.
        For CDK 2.x use "deps" instead. (or "peerDeps" if you're building a library)
        Sets the value of AwsCdkDepsCommonOptions.getCdkDependencies()
        Parameters:
        cdkDependencies - Which AWS CDKv1 modules this project requires.
        Returns:
        this
      • cdkDependenciesAsDeps

        @Stability(Deprecated)
        @Deprecated
        public PDKPipelineJavaProjectOptions.Builder cdkDependenciesAsDeps​(Boolean cdkDependenciesAsDeps)
        Deprecated.
        Not supported in CDK v2.
        Sets the value of AwsCdkDepsCommonOptions.getCdkDependenciesAsDeps()
        Parameters:
        cdkDependenciesAsDeps - If this is enabled (default), all modules declared in `cdkDependencies` will be also added as normal `dependencies` (as well as `peerDependencies`). This is to ensure that downstream consumers actually have your CDK dependencies installed when using npm < 7 or yarn, where peer dependencies are not automatically installed. If this is disabled, cdkDependencies will be added to devDependencies to ensure they are present during development.

        Note: this setting only applies to construct library projects

        Returns:
        this
      • cdkTestDependencies

        @Stability(Deprecated)
        @Deprecated
        public PDKPipelineJavaProjectOptions.Builder cdkTestDependencies​(List<String> cdkTestDependencies)
        Deprecated.
        For CDK 2.x use 'devDeps' (in node.js projects) or 'testDeps' (in java projects) instead
        Sets the value of AwsCdkDepsCommonOptions.getCdkTestDependencies()
        Parameters:
        cdkTestDependencies - AWS CDK modules required for testing.
        Returns:
        this
      • cdkVersionPinning

        @Stability(Experimental)
        public PDKPipelineJavaProjectOptions.Builder cdkVersionPinning​(Boolean cdkVersionPinning)
        Sets the value of AwsCdkDepsCommonOptions.getCdkVersionPinning()
        Parameters:
        cdkVersionPinning - Use pinned version instead of caret version for CDK. You can use this to prevent mixed versions for your CDK dependencies and to prevent auto-updates. If you use experimental features this will let you define the moment you include breaking changes.
        Returns:
        this
      • constructsVersion

        @Stability(Experimental)
        public PDKPipelineJavaProjectOptions.Builder constructsVersion​(String constructsVersion)
        Sets the value of AwsCdkDepsCommonOptions.getConstructsVersion()
        Parameters:
        constructsVersion - Minimum version of the `constructs` library to depend on.
        Returns:
        this