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">
        <classpath>
            <fileset dir="${lib.dir}/svnant" includes="**/*.jar"/>
        </classpath>
    </taskdef>

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



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}"/>
    </target>


Again, there is no problem when running in ANT.

1 comment

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>
          <condition property="hostname" value="${env.COMPUTERNAME}">
               <os family="windows" />
               <!-- perhaps i stricter test is necessary, not sure it works on older windows systems.-->
          </condition>
          <!-- what to do on Mac or other operation systems -->
          <echo message="host = ${hostname}" />
     </target>


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

0

Please sign in to leave a comment.