1
2
3
4
5
6
7
8
9
10
11
12
13
14
15 package org.basepom.mojo.propertyhelper;
16
17 import java.io.IOException;
18
19 import com.google.common.flogger.FluentLogger;
20 import org.apache.maven.plugin.MojoExecutionException;
21 import org.apache.maven.plugins.annotations.Mojo;
22 import org.apache.maven.plugins.annotations.Parameter;
23
24
25
26
27 @Mojo(name = "get", threadSafe = true)
28 public final class GetMojo extends AbstractPropertyHelperMojo {
29
30 private static final FluentLogger LOG = FluentLogger.forEnclosingClass();
31
32
33
34
35
36 @Parameter(defaultValue = "false")
37 boolean persist = false;
38
39 @Override
40 protected void doExecute() throws MojoExecutionException, IOException {
41 LOG.atFine().log("Running property-helper:get");
42
43 createFieldDefinitions();
44 createFields();
45 createGroups();
46
47 if (persist) {
48 LOG.atFine().log("Persisting value cache");
49
50 valueCache.persist();
51 }
52 }
53 }