org.eclipse.emf.ant.taskdefs.codegen
Class JMergerTask
java.lang.Object
org.apache.tools.ant.ProjectComponent
org.apache.tools.ant.Task
org.eclipse.emf.ant.taskdefs.EMFTask
org.eclipse.emf.ant.taskdefs.codegen.JMergerTask
- public class JMergerTask
- extends EMFTask
Exposes some functionalities available on the
JMerger
class.
This task is supposed to be executed by a Eclipse driver with the
org.eclipse.emf.ant plugin. It is neither necessary to use Ant's task
TaskDef to declare this task in a script nor to change the Ant's runtime
classpath.
The following command line will start a headless Eclipse instance and run the specified Ant script.
java -classpath eclipseDir/startup.jar org.eclipse.core.launcher.Main
-data worspaceDir
-application org.eclipse.ant.core.antRunner
-buildfile antScript
Usage examples:
<emf.JMerger mergeXMLURI="http://www.example.com/merge.xml"
sourceFile="c:/java/MyClass.java"
targetURI="http://www.example.com/target/MyNewClass.java"/>
<emf.JMerger mergeXMLFile="merge.xml"
sourceURI="http://www.example.com/source/MyClass.java"
targetFile="MyNewClass.java";
newFile="c:\MyClass.java"/>
<emf.JMerger mergeXMLFile="c:\mergefiles\merge.xml"
sourceFile="d:\old\MyClass.java"
targetFile="d:\new\MyNewClass.java";
newFile="MyMergedClass.java"/>
- Since:
- 2.1.0
Fields inherited from class org.apache.tools.ant.Task |
description, location, target, taskName, taskType, wrapper |
Fields inherited from class org.apache.tools.ant.ProjectComponent |
project |
Methods inherited from class org.apache.tools.ant.Task |
getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, maybeConfigure, perform, reconfigure, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType |
Methods inherited from class org.apache.tools.ant.ProjectComponent |
getProject, setProject |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JMergerTask
public JMergerTask()
setMergeXMLURI
public void setMergeXMLURI(String mergeXMLURI)
setMergeXMLFile
public void setMergeXMLFile(File mergeXMLFile)
setSourceURI
public void setSourceURI(String sourceURI)
setSourceFile
public void setSourceFile(File sourceFile)
setTargetURI
public void setTargetURI(String targetURI)
setTargetFile
public void setTargetFile(File targetFile)
setNewFile
public void setNewFile(File newFile)
setFacadeHelperClass
public void setFacadeHelperClass(String facadeHelperClass)
checkAttributes
protected void checkAttributes()
throws org.apache.tools.ant.BuildException
- Description copied from class:
EMFTask
- All the attribute checks should be performed in this method.
- Overrides:
checkAttributes
in class EMFTask
- Throws:
org.apache.tools.ant.BuildException
doExecute
protected void doExecute()
throws Exception
- Description copied from class:
EMFTask
- Performs the task specific code.
- Specified by:
doExecute
in class EMFTask
- Throws:
Exception
createJMerger
protected JMerger createJMerger()
invokeMerger
protected void invokeMerger(JMerger merger)
throws IOException,
org.apache.tools.ant.BuildException
- Throws:
IOException
org.apache.tools.ant.BuildException