Package info.freelibrary.maven
Class CPUandMemoryMojo
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- info.freelibrary.maven.CPUandMemoryMojo
-
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled
,org.apache.maven.plugin.Mojo
@Mojo(name="set-cpumem-properties", defaultPhase=INITIALIZE) public class CPUandMemoryMojo extends org.apache.maven.plugin.AbstractMojo
Sets Maven project properties with values for system.cores, system.free.memory, and system.total.memory; memory values are set with unit of measurement appended (e.g., 200m, 3g, 5000k).To manually run the plugin: `mvn info.freelibrary:freelib-utils:[VERSION]:set-cpumem-properties` (supplying whatever version is appropriate). Usually, though, the plugin would just be configured to run as a part of the Maven lifecycle.
-
-
Field Summary
Fields Modifier and Type Field Description static String
SYSTEM_CORES
A constant label for number of system cores.static String
SYSTEM_FREE_MEMORY
A constant label for system's free memory.static String
SYSTEM_TOTAL_MEMORY
A constant label for system's total memory.
-
Constructor Summary
Constructors Constructor Description CPUandMemoryMojo()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
execute()
-
-
-
Field Detail
-
SYSTEM_CORES
public static final String SYSTEM_CORES
A constant label for number of system cores.- See Also:
- Constant Field Values
-
SYSTEM_FREE_MEMORY
public static final String SYSTEM_FREE_MEMORY
A constant label for system's free memory.- See Also:
- Constant Field Values
-
SYSTEM_TOTAL_MEMORY
public static final String SYSTEM_TOTAL_MEMORY
A constant label for system's total memory.- See Also:
- Constant Field Values
-
-