M
Magnus Warker
Hi group,
I want to add custom targets to my project, e. g. creating a jar or
something like that.
First, I exported an ant build file build.xml. Then I added a new build file
mybuild.xml which contains some special targets, which depend on targets of
the first one ("init", "build").
Within eclipse I get an error for targets in mybuild.xml:
Target "init" does not exist in this project.
How can I resolve this error? Although the build works, it is not nice that
eclipse marks this file as bad.
Then, I have two "Builders": Java Builder and my own one. The first one
contains all targets except my own ones. But my own build file also
contains the targets for compiling the sources. Isn't it defined twice? Is
this the right way for the things I want to do?
Thank you for any hints!
Magnus
mybuild.xml:
<?eclipse.ant.import ?>
<project basedir="." default="help" name="help">
<target name="jar" depends="init,build" description="Generates the JAR
file">
<mkdir dir="lib"/>
<jar jarfile="lib/${ant.project.name}.jar" basedir="cls">
<manifest>
<attribute name="Main-Class" value="vai.Application"/>
</manifest>
</jar>
</target>
</project>
I want to add custom targets to my project, e. g. creating a jar or
something like that.
First, I exported an ant build file build.xml. Then I added a new build file
mybuild.xml which contains some special targets, which depend on targets of
the first one ("init", "build").
Within eclipse I get an error for targets in mybuild.xml:
Target "init" does not exist in this project.
How can I resolve this error? Although the build works, it is not nice that
eclipse marks this file as bad.
Then, I have two "Builders": Java Builder and my own one. The first one
contains all targets except my own ones. But my own build file also
contains the targets for compiling the sources. Isn't it defined twice? Is
this the right way for the things I want to do?
Thank you for any hints!
Magnus
mybuild.xml:
<?eclipse.ant.import ?>
<project basedir="." default="help" name="help">
<target name="jar" depends="init,build" description="Generates the JAR
file">
<mkdir dir="lib"/>
<jar jarfile="lib/${ant.project.name}.jar" basedir="cls">
<manifest>
<attribute name="Main-Class" value="vai.Application"/>
</manifest>
</jar>
</target>
</project>