IDEA Marks Valid ANT Code as red

Why is the taskdef and svn task in this ANT snippet highlighted in red in IDEA?

It runs perfectly well in ANT.

    <!--SVN Revision Number-->
    <taskdef resource="org/tigris/subversion/svnant/svnantlib.xml">
            <fileset dir="${lib.dir}/svnant" includes="**/*.jar"/>

    <property name="svn.revision" value="" />
        <status path="${basedir}" revisionProperty="svn.revision"/>

The errors are "failed to load type" (taskdef) and "cannot resolve symbol" (svn).

Also, why is dest.env marked as red in the echo below "Property dest.env is unknown")

    <target name="-prompt-for-config" unless="dest.env">
        <input message="Please enter the environment you want to build to:" addproperty="dest.env" validargs="GOLD,SILVER,BRONZE"/>
        <echo message="${dest.env}"/>

Again, there is no problem when running in ANT.

1 comment
Comment actions Permalink

What is wrong with this too?

     <!-- GET THE HOSTNAME -->
     <!-- platform independent -->
     <target name="gethostname" description="Stores the current machines hostname in a property named 'hostname'">
          <condition property="hostname" value="${env.HOSTNAME}">
               <os family="unix" />
          <condition property="hostname" value="${env.COMPUTERNAME}">
               <os family="windows" />
               <!-- perhaps i stricter test is necessary, not sure it works on older windows systems.-->
          <!-- what to do on Mac or other operation systems -->
          <echo message="host = ${hostname}" />

${env.HOSTNAME}, ${env.COMPUTERNAME} and ${hostname} all get marked red


Please sign in to leave a comment.