Skip to content

Commit e33e8d0

Browse files
authored
Merge pull request #399 from apache/refactoring/398-Mark-Maven-plugins-as-thread-safe
Issue #398: Mark Maven plugins as thread-safe
2 parents 4f0776c + bcebe24 commit e33e8d0

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

PearPackagingMavenPlugin/src/main/java/org/apache/uima/pear/tools/PearPackagingMojo.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
*/
1919
package org.apache.uima.pear.tools;
2020

21+
import static org.apache.maven.plugins.annotations.LifecyclePhase.PACKAGE;
22+
2123
import java.io.File;
2224
import java.io.FileFilter;
2325
import java.io.IOException;
@@ -30,7 +32,6 @@
3032
import org.apache.maven.plugin.AbstractMojo;
3133
import org.apache.maven.plugin.MojoExecutionException;
3234
import org.apache.maven.plugin.logging.Log;
33-
import org.apache.maven.plugins.annotations.LifecyclePhase;
3435
import org.apache.maven.plugins.annotations.Mojo;
3536
import org.apache.maven.plugins.annotations.Parameter;
3637
import org.apache.maven.project.MavenProject;
@@ -42,7 +43,7 @@
4243
* UIMA nature is gathered and added to the PEAR package. Additionally the generated jar file from
4344
* the Maven build is added with the according classpath information.
4445
*/
45-
@Mojo(name = "package", defaultPhase = LifecyclePhase.PACKAGE)
46+
@Mojo(name = "package", defaultPhase = PACKAGE, threadSafe = true)
4647
public class PearPackagingMojo extends AbstractMojo {
4748

4849
/**

jcasgen-maven-plugin/src/main/java/org/apache/uima/tools/jcasgen/maven/JCasGenMojo.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
package org.apache.uima.tools.jcasgen.maven;
2020

2121
import static java.util.Arrays.asList;
22+
import static org.apache.maven.plugins.annotations.LifecyclePhase.PROCESS_RESOURCES;
23+
import static org.apache.maven.plugins.annotations.ResolutionScope.COMPILE;
2224

2325
import java.io.File;
2426
import java.io.FileOutputStream;
@@ -39,10 +41,8 @@
3941
import org.apache.maven.plugin.MojoExecutionException;
4042
import org.apache.maven.plugin.MojoFailureException;
4143
import org.apache.maven.plugins.annotations.Component;
42-
import org.apache.maven.plugins.annotations.LifecyclePhase;
4344
import org.apache.maven.plugins.annotations.Mojo;
4445
import org.apache.maven.plugins.annotations.Parameter;
45-
import org.apache.maven.plugins.annotations.ResolutionScope;
4646
import org.apache.maven.project.MavenProject;
4747
import org.apache.uima.UIMAFramework;
4848
import org.apache.uima.resource.ResourceManager;
@@ -67,7 +67,7 @@
6767
* descriptor files to already be at the appropriate places on the classpath, and the
6868
* generate-resources phase runs before resources are copied.
6969
*/
70-
@Mojo(name = "generate", defaultPhase = LifecyclePhase.PROCESS_RESOURCES, requiresDependencyResolution = ResolutionScope.COMPILE)
70+
@Mojo(name = "generate", defaultPhase = PROCESS_RESOURCES, requiresDependencyResolution = COMPILE, threadSafe = true)
7171
public class JCasGenMojo extends AbstractMojo {
7272

7373
@Parameter(defaultValue = "${project}", readonly = true)

0 commit comments

Comments
 (0)