Class PomEditor.Profiles

java.lang.Object
eu.maveniverse.domtrip.maven.PomEditor.Profiles
Enclosing class:
PomEditor

public class PomEditor.Profiles extends 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 Details

    • Profiles

      public Profiles()
  • Method Details

    • findProfile

      public eu.maveniverse.domtrip.Element findProfile(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(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