Class Pom

  • All Implemented Interfaces:
    software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

    @Generated(value="jsii-pacmak/1.96.0 (build 921e240)",
               date="2024-03-28T21:16:43.145Z")
    @Stability(Experimental)
    public class Pom
    extends Component
    (experimental) A Project Object Model or POM is the fundamental unit of work in Maven.

    It is an XML file that contains information about the project and configuration details used by Maven to build the project.

    • Constructor Detail

      • Pom

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

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

        @Stability(Experimental)
        public Pom​(@NotNull
                   Project project,
                   @NotNull
                   PomOptions options)
        Parameters:
        project - This parameter is required.
        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.
      • addProperty

        @Stability(Experimental)
        public void addProperty​(@NotNull
                                String key,
                                @NotNull
                                String value)
        (experimental) Adds a key/value property to the pom.

        Parameters:
        key - the key. This parameter is required.
        value - the value. This parameter is required.
      • addRepository

        @Stability(Experimental)
        public void addRepository​(@NotNull
                                  MavenRepository repository)
        (experimental) Adds a repository to the pom.

        Parameters:
        repository - the repository to add. 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.
      • getArtifactId

        @Stability(Experimental)
        @NotNull
        public String getArtifactId()
        (experimental) Maven artifact ID.
      • getFileName

        @Stability(Experimental)
        @NotNull
        public String getFileName()
        (experimental) The name of the pom file.
      • getGroupId

        @Stability(Experimental)
        @NotNull
        public String getGroupId()
        (experimental) Maven group ID.
      • getPackaging

        @Stability(Experimental)
        @NotNull
        public String getPackaging()
        (experimental) Maven packaging format.
      • getVersion

        @Stability(Experimental)
        @NotNull
        public String getVersion()
        (experimental) Project version.
      • getDescription

        @Stability(Experimental)
        @Nullable
        public String getDescription()
        (experimental) Project description.
      • getName

        @Stability(Experimental)
        @Nullable
        public String getName()
        (experimental) Project display name.
      • getUrl

        @Stability(Experimental)
        @Nullable
        public String getUrl()
        (experimental) Project URL.