From c8fa0a4be30e4e15b316bf463441e569c43bde80 Mon Sep 17 00:00:00 2001 From: Christopher Tubbs Date: Wed, 9 May 2018 16:59:52 -0400 Subject: [PATCH] Fix #261 Require Maven project to run goals --- src/main/java/net/revelc/code/formatter/FormatterMojo.java | 2 +- src/main/java/net/revelc/code/formatter/ValidateMojo.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/net/revelc/code/formatter/FormatterMojo.java b/src/main/java/net/revelc/code/formatter/FormatterMojo.java index 7a18ae8c1..88c5115a0 100644 --- a/src/main/java/net/revelc/code/formatter/FormatterMojo.java +++ b/src/main/java/net/revelc/code/formatter/FormatterMojo.java @@ -72,7 +72,7 @@ * @author Matt Blanchette * @author marvin.froeder */ -@Mojo(name = "format", defaultPhase = LifecyclePhase.PROCESS_SOURCES, requiresProject = false, threadSafe = true) +@Mojo(name = "format", defaultPhase = LifecyclePhase.PROCESS_SOURCES, requiresProject = true, threadSafe = true) public class FormatterMojo extends AbstractMojo implements ConfigurationSource { private static final String FILE_S = " file(s)"; diff --git a/src/main/java/net/revelc/code/formatter/ValidateMojo.java b/src/main/java/net/revelc/code/formatter/ValidateMojo.java index 9c53ab17a..bdf7129f5 100755 --- a/src/main/java/net/revelc/code/formatter/ValidateMojo.java +++ b/src/main/java/net/revelc/code/formatter/ValidateMojo.java @@ -32,7 +32,7 @@ * * @author marvin.froeder */ -@Mojo(name = "validate", defaultPhase = LifecyclePhase.VALIDATE, requiresProject = false, threadSafe = true) +@Mojo(name = "validate", defaultPhase = LifecyclePhase.VALIDATE, requiresProject = true, threadSafe = true) public class ValidateMojo extends FormatterMojo { @Parameter(defaultValue = "false", property = "aggregator", required = true)