Class PomEditor.Profiles

  • Enclosing class:
    PomEditor

    public class PomEditor.Profiles
    extends java.lang.Object
    Helper for inspecting Maven profiles within a POM.

    Provides methods to find and check the existence of <profile> elements by their <id>. The returned elements can be passed to PomEditor.Dependencies.forProfile(Element) for profile-scoped dependency operations.

    Since:
    1.1.0
    • Constructor Summary

      Constructors 
      Constructor Description
      Profiles()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      eu.maveniverse.domtrip.Element findProfile​(java.lang.String id)
      Finds a profile element by its <id>.
      boolean hasProfile​(java.lang.String id)
      Checks whether a profile with the given <id> exists.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Profiles

        public Profiles()
    • Method Detail

      • findProfile

        public eu.maveniverse.domtrip.Element findProfile​(java.lang.String id)
        Finds a profile element by its <id>.
        Parameters:
        id - the profile id to look for
        Returns:
        the <profile> element, or null if not found
        Since:
        1.1.0
      • hasProfile

        public boolean hasProfile​(java.lang.String id)
        Checks whether a profile with the given <id> exists.
        Parameters:
        id - the profile id to check
        Returns:
        true if a matching profile exists, false otherwise
        Since:
        1.1.0