allow building with the upcoming maven-plugin-tools 4.x OBS-URL: https://build.opensuse.org/request/show/1258298 OBS-URL: https://build.opensuse.org/package/show/Java:packages/hawtbuf?expand=0&rev=12
77 lines
2.5 KiB
Diff
77 lines
2.5 KiB
Diff
--- hawtbuf-hawtbuf-project-1.11/hawtbuf-protoc/src/main/java/org/fusesource/hawtbuf/proto/compiler/ProtoMojo.java 2025-03-27 09:43:28.956064165 +0100
|
|
+++ hawtbuf-hawtbuf-project-1.11/hawtbuf-protoc/src/main/java/org/fusesource/hawtbuf/proto/compiler/ProtoMojo.java 2025-03-27 10:06:16.462083181 +0100
|
|
@@ -24,60 +24,63 @@
|
|
|
|
import org.apache.maven.plugin.AbstractMojo;
|
|
import org.apache.maven.plugin.MojoExecutionException;
|
|
+import org.apache.maven.plugins.annotations.LifecyclePhase;
|
|
+import org.apache.maven.plugins.annotations.Mojo;
|
|
+import org.apache.maven.plugins.annotations.Parameter;
|
|
import org.apache.maven.project.MavenProject;
|
|
|
|
/**
|
|
* A Maven Mojo so that the Proto compiler can be used with maven.
|
|
*
|
|
- * @goal compile
|
|
- * @phase process-sources
|
|
*/
|
|
+@Mojo( name = "compile",
|
|
+ defaultPhase = LifecyclePhase.PROCESS_SOURCES )
|
|
public class ProtoMojo extends AbstractMojo {
|
|
|
|
/**
|
|
* The maven project.
|
|
*
|
|
- * @parameter expression="${project}"
|
|
- * @required
|
|
- * @readonly
|
|
*/
|
|
+ @Parameter( property = "project",
|
|
+ required = true,
|
|
+ readonly = true )
|
|
protected MavenProject project;
|
|
|
|
/**
|
|
* The directory where the proto files (<code>*.proto</code>) are
|
|
* located.
|
|
*
|
|
- * @parameter default-value="${basedir}/src/main/proto"
|
|
*/
|
|
+ @Parameter( defaultValue = "${basedir}/src/main/proto" )
|
|
private File mainSourceDirectory;
|
|
|
|
/**
|
|
* The directory where the output files will be located.
|
|
*
|
|
- * @parameter default-value="${project.build.directory}/generated-sources/proto"
|
|
*/
|
|
+ @Parameter( defaultValue = "${project.build.directory}/generated-sources/proto" )
|
|
private File mainOutputDirectory;
|
|
|
|
/**
|
|
* The directory where the proto files (<code>*.proto</code>) are
|
|
* located.
|
|
*
|
|
- * @parameter default-value="${basedir}/src/test/proto"
|
|
*/
|
|
+ @Parameter( defaultValue = "${basedir}/src/test/proto" )
|
|
private File testSourceDirectory;
|
|
|
|
/**
|
|
* The directory where the output files will be located.
|
|
*
|
|
- * @parameter default-value="${project.build.directory}/test-generated-sources/proto"
|
|
*/
|
|
+ @Parameter( defaultValue = "${project.build.directory}/test-generated-sources/proto" )
|
|
private File testOutputDirectory;
|
|
|
|
/**
|
|
* The type of generator to run.
|
|
*
|
|
- * @parameter default-value="default"
|
|
*/
|
|
+ @Parameter( defaultValue = "default" )
|
|
private String type;
|
|
|
|
public void execute() throws MojoExecutionException {
|