From 90c5bafeb1a1a0e5ffafd7209f2144b42f9d47a2 Mon Sep 17 00:00:00 2001 From: Tim Whittington Date: Fri, 12 May 2023 12:19:06 +1200 Subject: [PATCH] Mark all mojos threadsafe. --- src/main/java/org/codehaus/mojo/license/AddThirdPartyMojo.java | 2 +- .../codehaus/mojo/license/AggregatorThirdPartyReportMojo.java | 3 ++- .../java/org/codehaus/mojo/license/CommentStyleListMojo.java | 2 +- .../java/org/codehaus/mojo/license/DownloadLicensesMojo.java | 2 +- src/main/java/org/codehaus/mojo/license/LicenseListMojo.java | 2 +- .../codehaus/mojo/license/LicensesXmlInsertVersionsMojo.java | 2 +- .../java/org/codehaus/mojo/license/ThirdPartyReportMojo.java | 2 +- .../org/codehaus/mojo/license/UpdateProjectLicenseMojo.java | 2 +- 8 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/main/java/org/codehaus/mojo/license/AddThirdPartyMojo.java b/src/main/java/org/codehaus/mojo/license/AddThirdPartyMojo.java index 1e5bec0d5..091bc3068 100644 --- a/src/main/java/org/codehaus/mojo/license/AddThirdPartyMojo.java +++ b/src/main/java/org/codehaus/mojo/license/AddThirdPartyMojo.java @@ -67,7 +67,7 @@ */ // CHECKSTYLE_ON: LineLength @Mojo( name = "add-third-party", requiresDependencyResolution = ResolutionScope.TEST, - defaultPhase = LifecyclePhase.GENERATE_RESOURCES ) + defaultPhase = LifecyclePhase.GENERATE_RESOURCES, threadSafe = true ) public class AddThirdPartyMojo extends AbstractAddThirdPartyMojo implements MavenProjectDependenciesConfigurator { private static final Logger LOG = LoggerFactory.getLogger( AddThirdPartyMojo.class ); diff --git a/src/main/java/org/codehaus/mojo/license/AggregatorThirdPartyReportMojo.java b/src/main/java/org/codehaus/mojo/license/AggregatorThirdPartyReportMojo.java index dbbfa1223..208538043 100644 --- a/src/main/java/org/codehaus/mojo/license/AggregatorThirdPartyReportMojo.java +++ b/src/main/java/org/codehaus/mojo/license/AggregatorThirdPartyReportMojo.java @@ -49,7 +49,8 @@ * @author Tony Chemit - dev@tchemit.fr * @since 1.10 */ -@Mojo( name = "aggregate-third-party-report", aggregator = true, requiresDependencyResolution = ResolutionScope.TEST ) +@Mojo( name = "aggregate-third-party-report", aggregator = true, + requiresDependencyResolution = ResolutionScope.TEST, threadSafe = true ) public class AggregatorThirdPartyReportMojo extends AbstractThirdPartyReportMojo { diff --git a/src/main/java/org/codehaus/mojo/license/CommentStyleListMojo.java b/src/main/java/org/codehaus/mojo/license/CommentStyleListMojo.java index 1d9414104..7c21f8369 100644 --- a/src/main/java/org/codehaus/mojo/license/CommentStyleListMojo.java +++ b/src/main/java/org/codehaus/mojo/license/CommentStyleListMojo.java @@ -43,7 +43,7 @@ * @author tchemit dev@tchemit.fr * @since 1.0 */ -@Mojo( name = "comment-style-list", requiresProject = false, requiresDirectInvocation = true ) +@Mojo( name = "comment-style-list", requiresProject = false, requiresDirectInvocation = true, threadSafe = true ) public class CommentStyleListMojo extends AbstractLicenseMojo { diff --git a/src/main/java/org/codehaus/mojo/license/DownloadLicensesMojo.java b/src/main/java/org/codehaus/mojo/license/DownloadLicensesMojo.java index b0a6bebed..20929fde9 100644 --- a/src/main/java/org/codehaus/mojo/license/DownloadLicensesMojo.java +++ b/src/main/java/org/codehaus/mojo/license/DownloadLicensesMojo.java @@ -53,7 +53,7 @@ * @since 1.0 */ @Mojo( name = "download-licenses", requiresDependencyResolution = ResolutionScope.TEST, - defaultPhase = LifecyclePhase.PACKAGE ) + defaultPhase = LifecyclePhase.PACKAGE, threadSafe = true ) public class DownloadLicensesMojo extends AbstractDownloadLicensesMojo { diff --git a/src/main/java/org/codehaus/mojo/license/LicenseListMojo.java b/src/main/java/org/codehaus/mojo/license/LicenseListMojo.java index f5e2d6ab6..2d5c28359 100644 --- a/src/main/java/org/codehaus/mojo/license/LicenseListMojo.java +++ b/src/main/java/org/codehaus/mojo/license/LicenseListMojo.java @@ -42,7 +42,7 @@ * @author tchemit dev@tchemit.fr * @since 1.0 */ -@Mojo( name = "license-list", requiresProject = false, requiresDirectInvocation = true ) +@Mojo( name = "license-list", requiresProject = false, requiresDirectInvocation = true, threadSafe = true ) public class LicenseListMojo extends AbstractLicenseMojo { diff --git a/src/main/java/org/codehaus/mojo/license/LicensesXmlInsertVersionsMojo.java b/src/main/java/org/codehaus/mojo/license/LicensesXmlInsertVersionsMojo.java index fddcb50e9..7798b2ea5 100644 --- a/src/main/java/org/codehaus/mojo/license/LicensesXmlInsertVersionsMojo.java +++ b/src/main/java/org/codehaus/mojo/license/LicensesXmlInsertVersionsMojo.java @@ -52,7 +52,7 @@ * @since 1.19 */ @Mojo( name = "licenses-xml-insert-versions", requiresDependencyResolution = ResolutionScope.TEST, - defaultPhase = LifecyclePhase.PACKAGE ) + defaultPhase = LifecyclePhase.PACKAGE, threadSafe = true ) public class LicensesXmlInsertVersionsMojo extends AbstractLicensesXmlMojo { diff --git a/src/main/java/org/codehaus/mojo/license/ThirdPartyReportMojo.java b/src/main/java/org/codehaus/mojo/license/ThirdPartyReportMojo.java index 81f2cd4da..f4ad15d1f 100644 --- a/src/main/java/org/codehaus/mojo/license/ThirdPartyReportMojo.java +++ b/src/main/java/org/codehaus/mojo/license/ThirdPartyReportMojo.java @@ -41,7 +41,7 @@ * @author tchemit dev@tchemit.fr * @since 1.1 */ -@Mojo( name = "third-party-report", requiresDependencyResolution = ResolutionScope.TEST ) +@Mojo( name = "third-party-report", requiresDependencyResolution = ResolutionScope.TEST, threadSafe = true ) public class ThirdPartyReportMojo extends AbstractThirdPartyReportMojo { diff --git a/src/main/java/org/codehaus/mojo/license/UpdateProjectLicenseMojo.java b/src/main/java/org/codehaus/mojo/license/UpdateProjectLicenseMojo.java index 0390e20e2..ce162200d 100644 --- a/src/main/java/org/codehaus/mojo/license/UpdateProjectLicenseMojo.java +++ b/src/main/java/org/codehaus/mojo/license/UpdateProjectLicenseMojo.java @@ -43,7 +43,7 @@ * @author tchemit dev@tchemit.fr * @since 1.0 */ -@Mojo( name = "update-project-license", defaultPhase = LifecyclePhase.GENERATE_RESOURCES ) +@Mojo( name = "update-project-license", defaultPhase = LifecyclePhase.GENERATE_RESOURCES, threadSafe = true ) public class UpdateProjectLicenseMojo extends AbstractLicenseNameMojo {