Class JavaProject

  • All Implemented Interfaces:
    software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable
    Direct Known Subclasses:
    AwsCdkJavaApp

    @Generated(value="jsii-pacmak/1.96.0 (build 921e240)",
               date="2024-03-28T21:16:43.137Z")
    @Stability(Experimental)
    public class JavaProject
    extends GitHubProject
    (experimental) Java project.
    • Constructor Detail

      • JavaProject

        protected JavaProject​(software.amazon.jsii.JsiiObjectRef objRef)
      • JavaProject

        protected JavaProject​(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
      • JavaProject

        @Stability(Experimental)
        public JavaProject​(@NotNull
                           JavaProjectOptions options)
        Parameters:
        options - This parameter is required.
    • Method Detail

      • addDependency

        @Stability(Experimental)
        public void addDependency​(@NotNull
                                  String spec)
        (experimental) Adds a runtime dependency.

        Parameters:
        spec - Format <groupId>/<artifactId>@<semver>. This parameter is required.
      • addPlugin

        @Stability(Experimental)
        @NotNull
        public Dependency addPlugin​(@NotNull
                                    String spec,
                                    @Nullable
                                    PluginOptions options)
        (experimental) Adds a build plugin to the pom.

        The plug in is also added as a BUILD dep to the project.

        Parameters:
        spec - dependency spec (group/artifact@version). This parameter is required.
        options - plugin options.
      • addPlugin

        @Stability(Experimental)
        @NotNull
        public Dependency addPlugin​(@NotNull
                                    String spec)
        (experimental) Adds a build plugin to the pom.

        The plug in is also added as a BUILD dep to the project.

        Parameters:
        spec - dependency spec (group/artifact@version). This parameter is required.
      • addTestDependency

        @Stability(Experimental)
        public void addTestDependency​(@NotNull
                                      String spec)
        (experimental) Adds a test dependency.

        Parameters:
        spec - Format <groupId>/<artifactId>@<semver>. This parameter is required.
      • getCompile

        @Stability(Experimental)
        @NotNull
        public MavenCompile getCompile()
        (experimental) Compile component.
      • getDistdir

        @Stability(Experimental)
        @NotNull
        public String getDistdir()
        (experimental) Maven artifact output directory.
      • getPackaging

        @Stability(Experimental)
        @NotNull
        public MavenPackaging getPackaging()
        (experimental) Packaging component.
      • getPom

        @Stability(Experimental)
        @NotNull
        public Pom getPom()
        (experimental) API for managing pom.xml.
      • getJunit

        @Stability(Experimental)
        @Nullable
        public Junit getJunit()
        (experimental) JUnit component.
      • getProjenrc

        @Stability(Experimental)
        @Nullable
        public Projenrc getProjenrc()
        (experimental) Projenrc component.