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:
Cloneable
public class BuildHMCScripts
extends org.apache.tools.ant.Task
Concatenates 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.
-
Field Summary
Fields inherited from class org.apache.tools.ant.Task
target, taskName, taskType, wrapperFields inherited from class org.apache.tools.ant.ProjectComponent
description, location, project -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidexecute()protected StringreadFromFile(File file) read from file and put file content into a stringvoidsetFiletype(String type) Sets the file type to process (in general js or css).protected voidwriteToFile(File file, String string) write String to fileMethods 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, setTaskTypeMethods inherited from class org.apache.tools.ant.ProjectComponent
clone, getDescription, getLocation, getProject, setDescription, setLocation, setProject
-
Constructor Details
-
BuildHMCScripts
public BuildHMCScripts()
-
-
Method Details
-
setFiletype
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
read from file and put file content into a string- Parameters:
file- the file to read- Returns:
- the file content
- Throws:
IOException- by IO ErrorFileNotFoundException- throws if file not found
-
writeToFile
write String to file- Parameters:
file- the filestring- the string- Throws:
IOException- IO Error
-