You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Artem Grebenkin <gr...@googlemail.com> on 2012/11/04 23:10:34 UTC

Ant task with org.eclipse.ant.core.antRunner

Hi folks, 

I'm new to maven and I'm looking for a possibility to execute an ant task which has been invoked through a headless eclipse like this:

java -jar /Applications/eclipse/plugins/org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar -application org.eclipse.ant.core.antRunner -nosplash -buildfile build.xml

Ant task:
<?xml version="1.0" encoding="UTF-8"?>
<project default="codegen" basedir="..">
<dirname property="antfile.dir" file="${ant.file}"/>
    
  <!-- Global properties -->
<property name="main.directory" location="${antfile.dir}/.."/>
<property name="output.directory" location="${main.directory}"/>
<property name="source.directory" value="src"/>
<property name="genJDKLevel" value="5.0"/>

<target name="codegen">

 <!-- A macrodef makes it easier to generate code for multiple models in one script. -->
<macrodef name="ecore2Java">
<attribute name="modelName"/>
<element name="settings"/>
<sequential>
<emf.Ecore2Java
model="${main.directory}/ecore2java/model/@{modelName}.ecore"
genModel="${output.directory}/emf/@{modelName}.genmodel"
modelProject="${output.directory}"
modelProjectFragmentPath="${source.directory}"
modelPluginID="@{modelName}.model"
copyright="This is my code."
jdkLevel="${genJDKLevel}">
<settings/>
</emf.Ecore2Java>
</sequential>
</macrodef>

<!-- Generating the code for the library model -->
<ecore2Java modelName="library">
<settings>
<arg line="-package http:///library.ecore org.examples Library"/>
</settings>
</ecore2Java>

</target>
</project>

So, my question is, how I can do this in maven?

Best regards,
Artem.



Re: Ant task with org.eclipse.ant.core.antRunner

Posted by Wayne Fay <wa...@gmail.com>.
> So, my question is, how I can do this in maven?

I'd write my own plugin.

Wayne

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org