|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object eu.lindenbaum.maven.util.MojoUtils
public final class MojoUtils
Containing utilities related to maven-erlang-plugin specific Mojo
s.
Constructor Summary | |
---|---|
MojoUtils()
|
Method Summary | |
---|---|
static void |
emitBackendLogInfo(org.apache.maven.plugin.logging.Log log,
File backendLog)
Emits an info that backend node output is available in the given file if existing. |
static Map<String,String> |
getApplicationReplacements(Properties p)
Returns a mapping of string replacements for application projects. |
static List<File> |
getEunitTestSet(Collection<File> tests,
Collection<File> excludes)
Filters a given list of compiled test files and returns a list of files that must be run (using eunit) to cover all modules that could possibly contain tests. |
static boolean |
isWindows()
Returns whether the executing JVM is running under Microsoft Windows or not. |
static boolean |
newerFilesThan(File reference,
Collection<File> dirs)
Returns whether there are erlang source/header files in a specific directory (recursive) having a newer modification time than a given reference file. |
static Collection<String> |
parseDialyzerOutput(String[] output,
Collection<File> sources)
Parses the output of the DialyzerScript and converts it to a
beautified Collection of strings to be logged. |
static void |
startBackend(org.apache.maven.plugin.logging.Log log,
String cmd,
String nodeName,
String nodeCookie,
File cwd,
File backendLog)
Attaches the plugin to a backend erlang node. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MojoUtils()
Method Detail |
---|
public static boolean isWindows() throws org.apache.maven.plugin.MojoExecutionException
true
on Microsoft Windows systems, false
otherwise
org.apache.maven.plugin.MojoExecutionException
- in case the 'os.name' property is not setpublic static void startBackend(org.apache.maven.plugin.logging.Log log, String cmd, String nodeName, String nodeCookie, File cwd, File backendLog) throws org.apache.maven.plugin.MojoExecutionException
log
- logger to usecmd
- path to the erl
commandnodeName
- name of the backend to connect tonodeCookie
- cookie of the backend to connect tocwd
- the backend node's current working directorybackendLog
- file to write the ouput from the backend nodes to
org.apache.maven.plugin.MojoExecutionException
public static boolean newerFilesThan(File reference, Collection<File> dirs)
reference
- the file taken as reference time (modified)dirs
- input directories to check
public static Collection<String> parseDialyzerOutput(String[] output, Collection<File> sources)
DialyzerScript
and converts it to a
beautified Collection
of strings to be logged.
output
- the dialyzers warning outputsources
- a complete collection of source files dialyzer was run on
public static List<File> getEunitTestSet(Collection<File> tests, Collection<File> excludes)
_tests.beam
from the list whenever another module is contained
without this suffix (the according test will be run by eunit
automatically). The input list will not be modified.
tests
- list of test modules to find the tests to execute for.excludes
- list of infrastructure modules that should be excluded from
test execution
null
list of test modulespublic static Map<String,String> getApplicationReplacements(Properties p) throws org.apache.maven.plugin.MojoExecutionException
MavenUtils#getProjectReplacements(org.apache.maven.project.MavenProject)
and the following additional mappings:
p
- the build properties
null
Map
of string mappings
org.apache.maven.plugin.MojoExecutionException
- when failing to get module attributespublic static void emitBackendLogInfo(org.apache.maven.plugin.logging.Log log, File backendLog)
log
- logger to usebackendLog
- referring to the backend log file.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |