Fork me on GitHub

mn:generate-import-factory

Full name:

io.micronaut.maven:micronaut-maven-plugin:4.7.2-SNAPSHOT:generate-import-factory

Description:

Import beans from project dependencies by generating factories annotated with @Import containing the list of packages.

Attributes:

  • Requires a Maven project to be executed.
  • Requires dependency resolution of artifacts in scope: compile+runtime.
  • The goal is thread-safe and supports parallel builds.
  • Since version: 4.5.0.
  • Binds by default to the lifecycle phase: generate-sources.

Required Parameters

Name Type Since Description
<excludeDependenciesFilter> String 4.5.0 Regexp pattern which allows excluding certain dependencies.
Default: ^$
User Property: micronaut.importfactory.excludeDependenciesFilter
<excludePackagesFilter> String 4.5.0 Regexp pattern which allows excluding certain packages.
Default: ^$
User Property: micronaut.importfactory.excludePackagesFilter
<includeDependenciesFilter> String 4.5.0 Regexp pattern which allows including certain dependencies.
Default: ^.*:.*$
User Property: micronaut.importfactory.includeDependenciesFilter
<includePackagesFilter> String 4.5.0 Regexp pattern which allows including certain packages.
Default: ^.*$
User Property: micronaut.importfactory.includePackagesFilter
<outputDirectory> File 4.5.0 The output directory to which all the sources will be generated.
Default: ${project.build.directory}/generated-sources/importfactory
User Property: micronaut.importfactory.outputDirectory

Optional Parameters

Name Type Since Description
<addCompileSourceRoot> boolean 4.5.0 Add the output directory to the project as a source root in order to let the generated java classes be compiled and included in the project artifact.
Default: true
User Property: micronaut.importfactory.addCompileSourceRoot
<enabled> boolean 4.5.0 Whether to enable or disable the generation of the import factory.
Default: false
User Property: micronaut.importfactory.enabled
<targetPackage> String 4.5.0 The package name which is used for the generated import factories. When not specified a factory is generated for each package within that package in order to access package protected fields.
User Property: micronaut.importfactory.targetPackage

Parameter Details

<addCompileSourceRoot>

Add the output directory to the project as a source root in order to let the generated java classes be compiled and included in the project artifact.
  • Type: boolean
  • Since: 4.5.0
  • Required: No
  • User Property: micronaut.importfactory.addCompileSourceRoot
  • Default: true

<enabled>

Whether to enable or disable the generation of the import factory.
  • Type: boolean
  • Since: 4.5.0
  • Required: No
  • User Property: micronaut.importfactory.enabled
  • Default: false

<excludeDependenciesFilter>

Regexp pattern which allows excluding certain dependencies.
  • Type: java.lang.String
  • Since: 4.5.0
  • Required: Yes
  • User Property: micronaut.importfactory.excludeDependenciesFilter
  • Default: ^$

<excludePackagesFilter>

Regexp pattern which allows excluding certain packages.
  • Type: java.lang.String
  • Since: 4.5.0
  • Required: Yes
  • User Property: micronaut.importfactory.excludePackagesFilter
  • Default: ^$

<includeDependenciesFilter>

Regexp pattern which allows including certain dependencies.
  • Type: java.lang.String
  • Since: 4.5.0
  • Required: Yes
  • User Property: micronaut.importfactory.includeDependenciesFilter
  • Default: ^.*:.*$

<includePackagesFilter>

Regexp pattern which allows including certain packages.
  • Type: java.lang.String
  • Since: 4.5.0
  • Required: Yes
  • User Property: micronaut.importfactory.includePackagesFilter
  • Default: ^.*$

<outputDirectory>

The output directory to which all the sources will be generated.
  • Type: java.io.File
  • Since: 4.5.0
  • Required: Yes
  • User Property: micronaut.importfactory.outputDirectory
  • Default: ${project.build.directory}/generated-sources/importfactory

<targetPackage>

The package name which is used for the generated import factories. When not specified a factory is generated for each package within that package in order to access package protected fields.
  • Type: java.lang.String
  • Since: 4.5.0
  • Required: No
  • User Property: micronaut.importfactory.targetPackage