蚂蚁+冷泉

发布于 2024-08-13 16:19:07 字数 2078 浏览 4 评论 0原文

我正在使用新的 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>

I am working with the new cfbuilder and using ANT to push my code to my dev server. One issue that keeps cropping up is when I make changes to my beans.xml file my ant build throws an exception on my beans.xml file.

This is the exception that I get:

BUILD FAILED
C:\workingcopies\bpmMag\config\beans.xml:3: Unexpected element "{}beans" {antlib:org.apache.tools.ant}beans

Here is my build file:

<?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>

Here is my 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>

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

极度宠爱 2024-08-20 16:19:07

这是你的整个构建文件吗?因为它缺少结束项目标签,所以

我复制了 beans.xml 和 build.xml,添加了结束项目标签,设置了一组模拟目录,并且它按我的预期工作(即没有 {} beans.... 错误)

Is that your entire build file? Because it's missing the closing project tag

I copied your beans.xml and build.xml, added the end project tag, set up a simulation set of directories, and it worked as expected for me (i.e. no {} beans.... error)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文