custom targets and eclipse

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>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top