NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

Ant target won't execute.

 
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Platform Users
View previous topic :: View next topic  
Author Message
kdobkowski



Joined: 06 Feb 2017
Posts: 8
Location: Scotland

PostPosted: Mon Mar 06, 2017 2:12 pm    Post subject: Ant target won't execute. Reply with quote

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:

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?
Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Platform Users All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo