-
-
Save Programmercito/c3c72514cf8c2d5509c31c1ea6794bbb to your computer and use it in GitHub Desktop.
Buscando comando en un proyecto Java con ANT
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<target name="prueba"> | |
<echo>************************* COMENZANDO BUSQUEDA DE COMANDOS NO PERMITIDOS ****************************</echo> | |
<delete file="prohibiciones.found"/> | |
<property name="cabecera" value="ARCHIVO DE ENCONTRADOS"/> | |
<echo file="prohibiciones.found">${cabecera}</echo> | |
<loadfile property="file" srcfile="prohibidos.list"/> | |
<for param="line" list="${file}" delimiter="${line.separator}"> | |
<sequential> | |
<echo>REVISANDO: @{line}</echo> | |
<concat append="true" destFile="prohibiciones.found" > | |
<fileset dir="../../"> | |
<include name="**/*.*"/> | |
<exclude name="**/prohibiciones.found"/> | |
<exclude name="**/prohibidos.list"/> | |
<exclude name="**/*.jar"/> | |
</fileset> | |
<filterchain> | |
<linecontainsregexp > | |
<regexp pattern="@{line}"/> | |
</linecontainsregexp> | |
</filterchain> | |
</concat> | |
</sequential> | |
</for> | |
<echo>************************* ENCONTRADOS ****************************</echo> | |
<loadfile property="encontrados" srcFile="prohibiciones.found" /> | |
<if><equals arg1="${encontrados}" arg2="${cabecera}"/> | |
<then><echo>vacio</echo></then> | |
<else><echo>no vacio</echo></else> | |
</if> | |
<echo>${encontrados}</echo> | |
<echo>************************* TERMINA BUSCANDO *******************************</echo> | |
</target> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment