Build.xml não funciona mais

Galera, meu build não funciona mais de maneira alguma. As variaveis de ambiente está de forma correta. Da o seguinte rodando pelo prompt de comando:



jboss-stop:
     [echo] JBoss - Stop:
     [exec] org.jboss.as.cli.CliInitializationException: Failed to connect to th
e controller
     [exec]     at org.jboss.as.cli.impl.CliLauncher.initCommandContext(CliLaunc
her.java:229)
     [exec]     at org.jboss.as.cli.impl.CliLauncher.main(CliLauncher.java:195)
     [exec]     at org.jboss.as.cli.CommandLineMain.main(CommandLineMain.java:34
)
     [exec]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     [exec]     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcces
sorImpl.java:39)
     [exec]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMet
hodAccessorImpl.java:25)
     [exec]     at java.lang.reflect.Method.invoke(Method.java:597)
     [exec]     at org.jboss.modules.Module.run(Module.java:260)
     [exec]     at org.jboss.modules.Main.main(Main.java:291)
     [exec] Caused by: org.jboss.as.cli.CommandLineException: The controller is
not available at localhost:9999
     [exec]     at org.jboss.as.cli.impl.CommandContextImpl.connectController(Co
mmandContextImpl.java:639)
     [exec]     at org.jboss.as.cli.impl.CommandContextImpl.connectController(Co
mmandContextImpl.java:613)
     [exec]     at org.jboss.as.cli.impl.CliLauncher.initCommandContext(CliLaunc
her.java:227)
     [exec]     ... 8 more
     [exec] Pressione qualquer tecla para continuar. . .

Eu estou usando Jboos e Ant. Segue o build.xml:


 <!DOCTYPE project>
<project name="siscot" default="empacotar" basedir="../">
	<description>Sistema de Cotação de Produtos do Mercado Produtor de Juazeiro-BA</description>
	
	<!-- definicao de variaveis globais -->
	<property environment="env" />
	<property name="project.distname" value="siscot" />
	<property name="webroot.dir" value="${basedir}/WebContent" />
	<property name="webinf.dir" value="${webroot.dir}/WEB-INF" />
	<property name="dist" location="dist" />
	<property name="library.dir" value="${basedir}/WebContent/WEB-INF/lib" />
	<property name="selenium.dir" value="${basedir}/lib/selenium-2.21.0" />
	<property name="junit.dir" value="${basedir}/lib/junit4.9" />
	<property name="jboss.ejb.cliente.dir" value="${basedir}/lib/jboss-client-7.1.0.Final" />
	<property name="classes.dir" value="${basedir}/WebContent/WEB-INF/classes" />
	<property name="src.dir" value="${basedir}/src" />
	<property name="database.dir" value="${basedir}/docs/database" />
	<property name="jboss.home" value="${env.JBOSS_HOME}" />
	<property name="deploy.dir" value="deploy" />
	<property name="build.dir" value="build" />
	<property name="testes.data.dir" location="${basedir}/testes"/>
	<property name="testes.ejb.data.dir" location="${basedir}/testes/ejb"/>
	<property name="testes.ejb.report.dir" location="${testes.ejb.data.dir}/reports"/>
	<property name="testes.interface.data.dir" location="${basedir}/testes/interface"/>
	<property name="testes.interface.report.dir" location="${testes.interface.data.dir}/reports"/>
	<property name="postgres.dir" value="${env.POSTGRES_HOME}" />
	
	<!-- classpath demojee6 -->
	<path id="project.classpath">
		<fileset dir="${jboss.home}/">
			<include name="**/*.jar" />
		</fileset>
		<fileset dir="${library.dir}">
			<include name="**/*.jar" />
		</fileset>
		<fileset dir="${jboss.ejb.cliente.dir}">
			<include name="**/*.jar" />
		</fileset>
		<fileset dir="${selenium.dir}">
			<include name="**/*.jar" />
		</fileset>			
		<pathelement path ="${webinf.dir}/classes"/>
        <pathelement path ="${classpath.external}"/>
        <pathelement path ="${classpath}"/>
	</path>
	
	<target name="init">
		<echo level="info" message="Cria diretorio classes." />
		<delete dir="${classes.dir}" />
		<mkdir dir="${classes.dir}" />
	</target>

	<target name="prepare">
		<tstamp />
	</target>

	<target name="clean">
		<echo level="info" message="Cria diretorio classes." />
		<delete dir="${classes.dir}" />
		<mkdir dir="${classes.dir}" />
	</target>

	<target name="resources">
		<copy todir="${webinf.dir}/classes" includeEmptyDirs="no">
			<fileset dir="src/main">
				<patternset>
					<include name="**/*.conf" />
					<include name="**/*.properties" />
					<include name="**/*.xml" />
				</patternset>
			</fileset>
			<fileset dir="src/test">
				<patternset>
					<include name="**/*.conf" />
					<include name="**/*.properties" />
					<include name="**/*.xml" />
				</patternset>
			</fileset>
		</copy>
	</target>

	<target name="compile" depends="clean,prepare">
		<echo message="${ant.project.name}: ${ant.file}" />
		<javac srcdir="src" destdir="${webinf.dir}/classes">
			<classpath refid="project.classpath" />
		</javac>		
	</target>

	<target name="war" depends="compile,resources">
		<mkdir dir="${build.dir}" />
		<delete dir="${deploy.dir}" />
		<mkdir dir="${deploy.dir}" />
		<war basedir="${webroot.dir}" warfile="${build.dir}/${project.distname}.war" webxml="${webinf.dir}/web.xml">
			<exclude name="WEB-INF/${build.dir}/**" />
			<exclude name="WEB-INF/src/**" />
			<exclude name="WEB-INF/web.xml" />
		</war>
		<copy file="${library.dir}/postgresql-8.4-702.jdbc4.jar" todir="${deploy.dir}"/>
	</target>
	
	<target name="deploy" depends="application">
		<antcall target="jboss-stop"/>
		
		<antcall target="carga"/>
		
		<delete dir="${jboss.home}/standalone/tmp"/>
		<mkdir dir="${jboss.home}/standalone/tmp" />
		
		<copy file="${jboss.home}/standalone/deployments/README.txt" todir="${jboss.home}/standalone/tmp"/>
		
		<delete dir="${jboss.home}/standalone/deployments"/>
		<mkdir dir="${jboss.home}/standalone/deployments"/>
		
		<copy file="${jboss.home}/standalone/tmp/README.txt" todir="${jboss.home}/standalone/deployments"/>
		<copy file="${deploy.dir}/${project.distname}.war" todir="${jboss.home}/standalone/deployments"/>
		<copy file="${library.dir}/postgresql-8.4-702.jdbc4.jar" todir="${jboss.home}/standalone/deployments"/>
		<chmod file="${jboss.home}/standalone/deployments/${project.distname}.war" perm="755"/>
		<delete file="${jboss.home}/standalone/tmp/README.txt"/>
		
		<antcall target="jboss-start"/>		
	</target>
	
	<target name="testes">
		<delete dir="${testes.data.dir}"/>
		<delete dir="${testes.ejb.report.dir}"/>
		<delete dir="${testes.ejb.data.dir}"/>
		<delete dir="${testes.interface.report.dir}"/>
		<delete dir="${testes.interface.data.dir}"/>
		
		<mkdir dir="${testes.data.dir}"/>
		<mkdir dir="${testes.ejb.data.dir}"/>
		<mkdir dir="${testes.ejb.report.dir}"/>
		<mkdir dir="${testes.interface.data.dir}"/>
		<mkdir dir="${testes.interface.report.dir}"/>
		
		<antcall target="deploy"/>
		
		<!--  echo level="info">Executando testes EJB do sistema:</echo>
		<junit printsummary="false" fork="no" failureproperty="yes" dir="${basedir}">			
			<classpath refid="project.classpath"/>
		  	<formatter type="plain"/>
		  	<formatter type="xml"/>
			<test todir="${testes.ejb.data.dir}"
				  name="br.embrapa.cnptia.demojee6.test.service.ServiceBeanSuiteTests"/>
		</junit-->
		
		<antcall target="carga"/>
		
    	<echo level="info">Executando testes de interface do sistema:</echo>
		<junit printsummary="false" fork="no" failureproperty="yes" dir="${basedir}">			
			<classpath refid="project.classpath"/>
		  	<formatter type="plain"/>
		  	<formatter type="xml"/>
			<test todir="${testes.interface.data.dir}"
				  name="br.embrapa.cnptia.demojee6.test.selenium.SeleniumBeanSuiteTests"/>
		</junit>
		
		<!-- junitreport todir="${testes.ejb.data.dir}">
			<fileset dir="${testes.ejb.data.dir}">
				<include name="TEST-*.xml"/>
			</fileset>
			<report format="frames" todir="${testes.ejb.report.dir}"/>
		</junitreport-->
		
		<junitreport todir="${testes.interface.data.dir}">
			<fileset dir="${testes.interface.data.dir}">
				<include name="TEST-*.xml"/>
			</fileset>
			<report format="frames" todir="${testes.interface.report.dir}"/>
		</junitreport>
		
		<antcall target="carga"/>
	</target>
	
	<target name="carga">
		<!--  chmod file="${database.dir}/carga.sh" perm="755"/>
		<chmod file="${database.dir}/demojee6.pgpass" perm="0600"/>
		<echo level="info">Executando script de carga:</echo>
		<exec executable="sh">
			<arg value="${database.dir}/carga.sh"/>
		</exec-->
		<exec dir="${postgres.dir}/bin" executable="psql.exe" input="${database.dir}\dump.sql">
		    <arg line="-h localhost -U siscot -d siscot"/>
		    <!--  arg value="${database.dir}/clean-database.sh"/-->		      
			<!-- arg line="standalone.bat &amp;"/-->  
		</exec>
	</target>
	
	<target name="clean-database">
		<exec dir="${postgres.dir}/bin" executable="psql.exe" input="${database.dir}\clean-database.sql">
		    <arg line="-h localhost -U siscot -d siscot"/>
		    <!--  arg value="${database.dir}/clean-database.sh"/-->		      
			<!-- arg line="standalone.bat &amp;"/-->  
		</exec>
		<!--  chmod file="${database.dir}/clean-database.sh" perm="755"/>
		<chmod file="${database.dir}/demojee6.pgpass" perm="0600"/>
		<echo level="info">Executando script de carga:</echo>
		<exec executable="sh">
			<arg value="${database.dir}/clean-database.sh"/>
		</exec-->
	</target>
	
	<target name="jboss-start"> 
		<echo level="info">JBoss - Start:</echo>
		<exec dir="${jboss.home}/bin" executable="cmd">
		    <arg value="/c ${jboss.home}/bin/standalone.bat"/>		      
			<!-- arg line="standalone.bat &amp;"/-->  
		</exec>  
		<sleep seconds="15"/>
	</target>
	
	<target name="jboss-stop">  
		<echo level="info">JBoss - Stop:</echo>
		<exec dir="${jboss.home}/bin" executable="cmd">  
			<arg value="/c ${jboss.home}/bin/jboss-cli.bat --connect command=:shutdown"/>			  
		</exec>  
		<sleep seconds="5"/>
	</target>
	
	<target name="jboss-reload">  
		<antcall target="jboss-stop"/>
		<antcall target="jboss-start"/>		
	</target>
	
	<target name="application" depends="war">
		<delete file="${deploy.dir}/${project.distname}.war" />
		<copy file="${build.dir}/${project.distname}.war" todir="${deploy.dir}" />
	</target>
	
	<target depends="application" name="empacotar">
		<echo level="info">Empacotando o projeto.</echo>		
		<delete file="${basedir}/siscot.tar.gz"/>
		<tar destfile="${basedir}/siscot.tar.gz" compression="gzip" longfile="gnu">
			<tarfileset dir="${basedir}" excludes=".svn/**, 
												   build/**, 
												   deploy/**, 
												   demojee6.tar.gz" 
										 prefix="siscot"/>			
			
		</tar>
	</target>
</project>

Preciso de uma ajuda urgente, desde já agradeço.

Resolvi. Era a configuração do banco que estava errada. O usuario pedia senha, e ficava parado um tempão. Ai coloquei um usuario sem senha e funcionou. :smiley: