You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by co...@apache.org on 2026/10/09 15:00:28 UTC
(cxf-build-utils) branch coheigea/annotations created (now 6ff1570)
This is an automated email from the ASF dual-hosted git repository.
coheigea pushed a change to branch coheigea/annotations
in repository https://gitbox.apache.org/repos/asf/cxf-build-utils.git
at 6ff1570 Use Maven plugin annotations in xml2fastinfoset plugin
This branch includes the following new commits:
new 6ff1570 Use Maven plugin annotations in xml2fastinfoset plugin
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
(cxf-build-utils) 01/01: Use Maven plugin annotations in xml2fastinfoset plugin
Posted by co...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
coheigea pushed a commit to branch coheigea/annotations
in repository https://gitbox.apache.org/repos/asf/cxf-build-utils.git
commit 6ff157071befc37cb7475c85aa709737f45487c2
Author: Colm O hEigeartaigh <co...@apache.org>
AuthorDate: Fri Oct 9 15:58:23 2026 +0100
Use Maven plugin annotations in xml2fastinfoset plugin
---
xml2fastinfoset-plugin/pom.xml | 6 ++++
.../XML2FastInfosetCompilerMojo.java | 36 ++++++++--------------
2 files changed, 19 insertions(+), 23 deletions(-)
diff --git a/xml2fastinfoset-plugin/pom.xml b/xml2fastinfoset-plugin/pom.xml
index 61887bf..b1634ab 100644
--- a/xml2fastinfoset-plugin/pom.xml
+++ b/xml2fastinfoset-plugin/pom.xml
@@ -61,6 +61,12 @@
<version>3.10.0</version>
<scope>provided</scope>
</dependency>
+ <dependency>
+ <groupId>org.apache.maven.plugin-tools</groupId>
+ <artifactId>maven-plugin-annotations</artifactId>
+ <version>3.16.0</version>
+ <scope>provided</scope>
+ </dependency>
<dependency>
<groupId>org.sonatype.plexus</groupId>
diff --git a/xml2fastinfoset-plugin/src/main/java/org/apache/cxf/maven_plugin/xml2fastinfoset/XML2FastInfosetCompilerMojo.java b/xml2fastinfoset-plugin/src/main/java/org/apache/cxf/maven_plugin/xml2fastinfoset/XML2FastInfosetCompilerMojo.java
index dcbdc7d..ca06243 100644
--- a/xml2fastinfoset-plugin/src/main/java/org/apache/cxf/maven_plugin/xml2fastinfoset/XML2FastInfosetCompilerMojo.java
+++ b/xml2fastinfoset-plugin/src/main/java/org/apache/cxf/maven_plugin/xml2fastinfoset/XML2FastInfosetCompilerMojo.java
@@ -45,66 +45,56 @@ import com.sun.xml.fastinfoset.sax.SAXDocumentSerializer;
import org.apache.maven.model.Resource;
import org.apache.maven.plugin.AbstractMojo;
import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugins.annotations.Component;
+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;
import org.codehaus.plexus.util.DirectoryScanner;
import org.codehaus.plexus.util.Scanner;
/**
* Compile XML resources to FastInfoset XML resources.
- *
- * @goal xml2fastinfoset
- * @phase process-resources
- * @threadSafe
*/
+@Mojo(name = "xml2fastinfoset", defaultPhase = LifecyclePhase.PROCESS_RESOURCES, threadSafe = true)
public class XML2FastInfosetCompilerMojo extends AbstractMojo {
private static final String[] EMPTY_STRING_ARRAY = {};
private static final String[] DEFAULT_INCLUDES = {"**/*.xml"};
/**
* The Maven project containing the XML files to be compiled.
- *
- * @parameter default-value="${project}"
- * @required
- * @readonly
*/
+ @Parameter(defaultValue = "${project}", required = true, readonly = true)
private MavenProject project;
/**
* The resource directories containing the XML files to be compiled.
- *
- * @parameter default-value="${project.resources}"
- * @required
- * @readonly
*/
+ @Parameter(defaultValue = "${project.resources}", required = true, readonly = true)
private List resources;
/**
* A list of inclusion filters.
- *
- * @parameter
*/
+ @Parameter
private Set includes = new HashSet();
/**
* A list of exclusion filters.
- *
- * @parameter
*/
+ @Parameter
private Set excludes = new HashSet();
/**
* The directory for the results.
- *
- * @parameter default-value="${project.build.outputDirectory}"
- * @required
*/
+ @Parameter(defaultValue = "${project.build.outputDirectory}", required = true)
private File outputDirectory;
- /**
+ /**
* Build context
- *
- * @component
- **/
+ */
+ @Component
protected BuildContext buildContext;
@SuppressWarnings("unchecked")