craft_parts.plugins.maven_use_plugin module

The maven-use plugin.

class craft_parts.plugins.maven_use_plugin.MavenUsePlugin(*, properties, part_info)[source]

Bases: JavaPlugin

The Maven use plugin.

Parameters:
get_build_commands()[source]

Return a list of commands to run during the build step.

Return type:

list[str]

get_build_packages()[source]

Return a set of required packages to install in the build environment.

Return type:

set[str]

get_build_snaps()[source]

Return a set of required snaps to install in the build environment.

Return type:

set[str]

properties_class

alias of MavenUsePluginProperties

validator_class

alias of MavenUsePluginEnvironmentValidator

class craft_parts.plugins.maven_use_plugin.MavenUsePluginEnvironmentValidator(*, part_name, env, properties)[source]

Bases: PluginEnvironmentValidator

Check the execution environment for the maven plugin.

Parameters:
  • part_name (str) – The part whose build environment is being validated.

  • env (str) – A string containing the build step environment setup.

  • properties (PluginProperties)

validate_environment(*, part_dependencies=None)[source]

Ensure the environment contains dependencies needed by the plugin.

Parameters:

part_dependencies (Optional[list[str]]) – A list of the parts this part depends on.

Raises:

PluginEnvironmentValidationError – If maven is invalid and there are no parts named maven-deps.

Return type:

None

class craft_parts.plugins.maven_use_plugin.MavenUsePluginProperties(**data)[source]

Bases: PluginProperties

The part properties used by the maven plugin.

Parameters:

data (Any)

maven_use_parameters: list[str]
model_config: ClassVar[ConfigDict] = {'alias_generator': <function PluginProperties.<lambda>>, 'extra': 'forbid', 'frozen': True, 'validate_assignment': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

plugin: Literal['maven-use']
source: str