我正在使用新的cfbuilder并使用ANT将我的代码推送到我的开发服务器。不断出现的一个问题是,当我对beans.xml文件进行更改时,ant构建会在beans.xml文件上抛出异常。
这是我得到的异常:
BUILD FAILED
C:\workingcopies\bpmMag\config\beans.xml:3: Unexpected element "{}beans" {antlib:org.apache.tools.ant}beans这是我的构建文件:
<?xml version="1.0" encoding="UTF-8"?>
<project name="build" default="" basedir=".">
<description>
A description of what this build file does
</description>
<!-- Location of working Copy -->
<property name="workingCopy" value="C:\workingcopies\bpmMag" />
<!-- Location of testing server -->
<property name="testServer" value="Z:\www\dev7.devstation\htdocs" />
<!-- Test Target -->
<target name="test">
<copy todir="${testServer}">
<fileset dir="${workingCopy}">
<exclude name="coldspring/**"/>
<exclude name="**/*.project"/>
<exclude name="settings.xml"/>
<exclude name=".settings/**"/>
<exclude name="build.xml"/>
</fileset>
</copy>
</target>
这是我的beans.xml
<?xml version="1.0" encoding="UTF-8"?>
<beans>
<!-- Advice Beans -->
<bean id="AdviceDAO" class="com.model.advice.dao.AdviceDAO">
<constructor-arg name="dsn"><value>${dsn}</value></constructor-arg>
</bean>
<bean id="AdviceGateway" class="com.model.advice.gateway.AdviceGW">
<constructor-arg name="dsn"><value>${dsn}</value></constructor-arg>
</bean>
<bean id="AdviceService" class="com.model.advice.service.AdviceSV">
<constructor-arg name="adviceDAO">
<ref bean="adviceDAO"/>
</constructor-arg>
<constructor-arg name="adviceGateway">
<ref bean="adviceGateway"/>
</constructor-arg>
</bean>
</beans>发布于 2009-12-03 21:38:34
这是您的整个构建文件吗?因为它缺少项目结束标记
我复制了您的beans.xml和build.xml,添加了结束项目标记,设置了一组模拟目录,并按预期工作(即没有{} beans...错误)
https://stackoverflow.com/questions/1835051
复制相似问题