Announcement Announcement Module
Collapse
No announcement yet.
Problem with Spring-MVC-step-by-step Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Problem with Spring-MVC-step-by-step

    Hello,

    I am following Spring-MVC-step-by-step to try the spring framework. Everything works fine until step1.9 Write a test for the controller. Here is the error when I run the Ant 'tests' task.

    D:\work\eclips_wk\springapp>D:\work\apache-ant-1.7.1\bin\ant.bat tests
    Buildfile: build.xml

    BUILD FAILED
    D:\work\eclips_wk\springapp\build.xml:1: Unexpected element "{}property" {antlibrg.apache.tools.ant}property

    Total time: 0 seconds

    Any idea on this issue? All the environment shall be OK, all the previous steps are succesful.

    Thanks in advance,

    Mike

  • #2
    Hello,
    can you add your build.xml?

    smily

    Comment


    • #3
      The build.xml I used was copied from the web as following:

      <property name="test.dir" value="test"/>

      <target name="buildtests" description="Compile test tree java files">
      <mkdir dir="${build.dir}"/>
      <javac destdir="${build.dir}" source="1.5" target="1.5" debug="true"
      deprecation="false" optimize="false" failonerror="true">
      <src path="${test.dir}"/>
      <classpath refid="master-classpath"/>
      </javac>
      </target>

      <target name="tests" depends="build, buildtests" description="Run tests">
      <junit printsummary="on"
      fork="false"
      haltonfailure="false"
      failureproperty="tests.failed"
      showoutput="true">
      <classpath refid="master-classpath"/>
      <formatter type="brief" usefile="false"/>

      <batchtest>
      <fileset dir="${build.dir}">
      <include name="**/*Tests.*"/>
      </fileset>
      </batchtest>

      </junit>

      <fail if="tests.failed">
      tests.failed=${tests.failed}
      ************************************************** *********
      ************************************************** *********
      **** One or more tests failed! Check the output ... ****
      ************************************************** *********
      ************************************************** *********
      </fail>
      </target>

      Comment


      • #4
        Hi,
        I also work off this Step_by_Step tutorial
        and I must include the "catalina-ant.jar" into the lib directory of my IDE.

        The build.xml is the same I use.

        best regards
        smliy

        Comment

        Working...
        X