com.github.jlgrock.javascriptframework.jsdocs
Class JsDocUtil

java.lang.Object
  extended by com.github.jlgrock.javascriptframework.jsdocs.JsDocUtil

public class JsDocUtil
extends Object


Field Summary
protected static String ERROR_INIT_VM
          Error message when VM could not be started using invoker.
 
Constructor Summary
JsDocUtil()
           
 
Method Summary
protected static void invokeMaven(org.apache.maven.plugin.logging.Log log, File localRepositoryDir, File projectFile, List<String> goals, Properties properties, File invokerLog)
          Invoke Maven for the given project file with a list of goals and properties, the output will be in the invokerlog file.
protected static String readFile(File javaFile, String encoding)
          Read the given file and return the content or null if an IOException occurs.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ERROR_INIT_VM

protected static final String ERROR_INIT_VM
Error message when VM could not be started using invoker.

See Also:
Constant Field Values
Constructor Detail

JsDocUtil

public JsDocUtil()
Method Detail

invokeMaven

protected static void invokeMaven(org.apache.maven.plugin.logging.Log log,
                                  File localRepositoryDir,
                                  File projectFile,
                                  List<String> goals,
                                  Properties properties,
                                  File invokerLog)
                           throws org.apache.maven.shared.invoker.MavenInvocationException
Invoke Maven for the given project file with a list of goals and properties, the output will be in the invokerlog file.
Note: the Maven Home should be defined in the maven.home Java system property or defined in M2_HOME system env variables.

Parameters:
log - a logger could be null.
localRepositoryDir - the localRepository not null.
projectFile - a not null project file.
goals - a not null goals list.
properties - the properties for the goals, could be null.
invokerLog - the log file where the invoker will be written, if null using System.out.
Throws:
org.apache.maven.shared.invoker.MavenInvocationException - if any
Since:
2.6

readFile

protected static String readFile(File javaFile,
                                 String encoding)
Read the given file and return the content or null if an IOException occurs.

Parameters:
javaFile - not null
encoding - could be null
Returns:
the content with unified line separator of the given javaFile using the given encoding.
Since:
2.6.1
See Also:
FileUtils.fileRead(File, String)


Copyright © 2012. All Rights Reserved.