Ant target won't execute.

"kdobkowski" <[email protected]>
Newsgroups gmane.comp.java.netbeans.modules.openide.devel
Message-ID <[email protected]>
So I have been trying to alter my Ant build script but can't figure out how to properly execute a target.

Here is an example of my build.xml script&#058;


Code:

<?xml version="1.0" encoding="UTF-8"?>
<project name="X" default="netbeans" basedir=".">
    <description>Builds, tests, and runs the project X.</description>
    
    <import file="nbproject/build-impl.xml"/>  
    
    <target name="-pre-init" unless="netbeans">
        <property name="project.name" value="X" />

        <tstamp>
            <format property="NOW" pattern="1.0.yyMMddHHmm" />
        </tstamp>

        <manifest file="MANIFEST.MF">
            <attribute name="OpenIDE-Module" value="${project.name}" />  
            <attribute name="OpenIDE-Module-Specification-Version" value="${NOW}" />
        </manifest>
    </target>

</project>



So the above target called "-pre-init" won't run after I build the module. But if I remove the <target ..></target> then the script runs fine.  I'm pretty sure that removing the <target> tag is not a good practice, so I'm wondering how to trigger this target on build action. I tried writing the target definition as


Code:
 <target name="-pre-init" depends="netbeans"> ... </target> 



but nothing happened. [Rolling Eyes] 

Any idea on how to trigger this target when I build the module?
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.