* See: https://docs.jboss.org/tools/latest/en/hibernatetools/html_single/#d0e4821 */ -@Mojo(name = "hbm2dao", defaultPhase = GENERATE_SOURCES) +@Mojo( + name = "hbm2dao", + defaultPhase = GENERATE_SOURCES, + requiresDependencyResolution = ResolutionScope.RUNTIME) public class GenerateDaoMojo extends AbstractHbm2xMojo { /** The directory into which the DAOs will be generated. */ diff --git a/maven-plugin/src/main/java/org/hibernate/mvn/GenerateHbmMojo.java b/maven-plugin/src/main/java/org/hibernate/mvn/GenerateHbmMojo.java index 6a8581cac2..2a2b368efd 100644 --- a/maven-plugin/src/main/java/org/hibernate/mvn/GenerateHbmMojo.java +++ b/maven-plugin/src/main/java/org/hibernate/mvn/GenerateHbmMojo.java @@ -25,6 +25,7 @@ import org.apache.maven.plugins.annotations.Mojo; import org.apache.maven.plugins.annotations.Parameter; +import org.apache.maven.plugins.annotations.ResolutionScope; import org.hibernate.tool.api.metadata.MetadataDescriptor; import org.hibernate.tool.hbm2x.HibernateMappingExporter; @@ -33,7 +34,10 @@ *
* See: https://docs.jboss.org/tools/latest/en/hibernatetools/html_single/#d0e4821 */ -@Mojo(name = "generateHbm", defaultPhase = GENERATE_SOURCES) +@Mojo( + name = "generateHbm", + defaultPhase = GENERATE_SOURCES, + requiresDependencyResolution = ResolutionScope.RUNTIME) public class GenerateHbmMojo extends AbstractHbm2xMojo { /** The directory into which the DAOs will be generated. */ diff --git a/maven-plugin/src/main/java/org/hibernate/mvn/Hbm2DdlMojo.java b/maven-plugin/src/main/java/org/hibernate/mvn/Hbm2DdlMojo.java index 0e2a973b95..1eec0618d0 100644 --- a/maven-plugin/src/main/java/org/hibernate/mvn/Hbm2DdlMojo.java +++ b/maven-plugin/src/main/java/org/hibernate/mvn/Hbm2DdlMojo.java @@ -2,6 +2,7 @@ import org.apache.maven.plugins.annotations.Mojo; import org.apache.maven.plugins.annotations.Parameter; +import org.apache.maven.plugins.annotations.ResolutionScope; import org.hibernate.boot.Metadata; import org.hibernate.tool.api.metadata.MetadataDescriptor; import org.hibernate.tool.hbm2ddl.SchemaExport; @@ -18,7 +19,10 @@ *
* See https://docs.jboss.org/tools/latest/en/hibernatetools/html_single/#d0e4651 */ -@Mojo(name = "hbm2ddl", defaultPhase = GENERATE_RESOURCES) +@Mojo( + name = "hbm2ddl", + defaultPhase = GENERATE_RESOURCES, + requiresDependencyResolution = ResolutionScope.RUNTIME) public class Hbm2DdlMojo extends AbstractHbm2xMojo { /** The directory into which the DDLs will be generated. */ diff --git a/maven-plugin/src/main/java/org/hibernate/mvn/Hbm2JavaMojo.java b/maven-plugin/src/main/java/org/hibernate/mvn/Hbm2JavaMojo.java index 893ab33917..5037804569 100644 --- a/maven-plugin/src/main/java/org/hibernate/mvn/Hbm2JavaMojo.java +++ b/maven-plugin/src/main/java/org/hibernate/mvn/Hbm2JavaMojo.java @@ -2,6 +2,7 @@ import org.apache.maven.plugins.annotations.Mojo; import org.apache.maven.plugins.annotations.Parameter; +import org.apache.maven.plugins.annotations.ResolutionScope; import org.hibernate.tool.api.metadata.MetadataDescriptor; import org.hibernate.tool.hbm2x.POJOExporter; @@ -14,7 +15,10 @@ *
* See: https://docs.jboss.org/tools/latest/en/hibernatetools/html_single/#d0e4821 */ -@Mojo(name = "hbm2java", defaultPhase = GENERATE_SOURCES) +@Mojo( + name = "hbm2java", + defaultPhase = GENERATE_SOURCES, + requiresDependencyResolution = ResolutionScope.RUNTIME) public class Hbm2JavaMojo extends AbstractHbm2xMojo { /** The directory into which the JPA entities will be generated. */