craft_parts.utils.maven package

Submodules

Module contents

Common Maven utilities.

craft_parts.utils.maven.create_maven_settings(*, part_info, set_mirror)[source]

Create a Maven configuration file.

The settings file contains additional configuration for Maven, such as proxy parameters.

If it detects that no configuration is necessary, it will return None and do nothing.

Parameters:
  • part_info (PartInfo) – The part info for the part invoking Maven.

  • set_mirror (bool) – Whether to configure for a local build.

Return type:

Path | None

Returns:

Returns a Path object to the settings file if one is created, otherwise None.

craft_parts.utils.maven.update_pom(*, part_info, add_distribution, self_contained)[source]

Update the POM file of a Maven project.

Parameters:
  • part_info (PartInfo) – Information about the invoking part.

  • add_distribution (bool) – Whether or not to configure the mvn deploy location.

  • self_contained (bool) – Whether or not to patch version numbers with what is actually available.

Return type:

None