requiresDependencyResolution must bet set in plugin.xml to include maven dependencies in enhancement classpath

Description

In HHH-10145, a change was made intending to include maven dependencies in enhancement classpath.

However, the plugin descriptor (plugin.xml) was not changed. Maven requires the plugin descriptor to include:

1 <requiresDependencyResolution>compile+runtime</requiresDependencyResolution>

or else it doesn't resolve dependencies before invoking the mojo so mavenProject.getArtifacts() always returns an empty array.

If Maven was used to build hibernate-enhance-maven-plugin, then maven-plugin-annotations would keep plugin.xml in sync wit the annotations... however, that's not the case here, so care must be taken to keep plugin.xml and the @Mojo annotation on the MavenEnhancePlugin in sync.

Environment

None

Status

Assignee

Unassigned

Reporter

Craig Andrews

Fix versions

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

backportDecision

None

Components

Affects versions

5.2.5

Priority

Major