Package de.hybris.ant.taskdefs.compiling
Class BuildHMCScripts
- java.lang.Object
-
- org.apache.tools.ant.ProjectComponent
-
- org.apache.tools.ant.Task
-
- de.hybris.ant.taskdefs.compiling.BuildHMCScripts
-
- All Implemented Interfaces:
java.lang.Cloneable
public class BuildHMCScripts extends org.apache.tools.ant.TaskConcatenates all files with file ending *.[filetype] of all extensions with hmc module located at hmc/web/webroot/ext/[extension]/[filetype] folder (directories will be processed before files and always in alphabetical order) to one large hmc.[filetype] file at hmc/web/webroot/[filetype] at hmc extension. For the hmc extension itself, the files has to be located at hmc/web/webroot/[filetype]/src.
-
-
Constructor Summary
Constructors Constructor Description BuildHMCScripts()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidexecute()protected java.lang.StringreadFromFile(java.io.File file)read from file and put file content into a stringvoidsetFiletype(java.lang.String type)Sets the file type to process (in general js or css).protected voidwriteToFile(java.io.File file, java.lang.String string)write String to file-
Methods inherited from class org.apache.tools.ant.Task
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
-
-
-
-
Method Detail
-
setFiletype
public void setFiletype(java.lang.String type)
Sets the file type to process (in general js or css).- Parameters:
type- type to process
-
execute
public void execute() throws org.apache.tools.ant.BuildException- Overrides:
executein classorg.apache.tools.ant.Task- Throws:
org.apache.tools.ant.BuildException
-
readFromFile
protected java.lang.String readFromFile(java.io.File file) throws java.io.IOException, java.io.FileNotFoundExceptionread from file and put file content into a string- Parameters:
file- the file to read- Returns:
- the file content
- Throws:
java.io.IOException- by IO Errorjava.io.FileNotFoundException- throws if file not found
-
writeToFile
protected void writeToFile(java.io.File file, java.lang.String string) throws java.io.IOExceptionwrite String to file- Parameters:
file- the filestring- the string- Throws:
java.io.IOException- IO Error
-
-