Results 1 to 6 of 6

Thread: spring step-by-step - eclipse - Problem at chapter 6

  1. #1
    Join Date
    Feb 2008
    Posts
    3

    Default spring step-by-step - eclipse - Problem at chapter 6

    Problem in my build.xml
    "Task could not be defined within the Ant Editor context"
    Code:
    <taskdef name="install" classname="org.apache.catalina.ant.InstallTask">
            <classpath refid="catalina-ant-classpath"/>

    I dont understand how to find/add org.apache.catalina.ant.InstallTask

    who can help me?
    Last edited by j4mbot; Feb 3rd, 2008 at 03:40 PM.

  2. #2

    Default

    include
    <path id="catalina-ant-classpath">
    <fileset dir="path-to-your-Tomcat/lib"
    <include name="catalina-ant.jar"/>
    </fileset>
    </path>

    and set
    <taskdef name="install" ...
    classpath refid="catalina-ant-path"
    </taskdef>

    Richard

  3. #3
    Join Date
    Feb 2008
    Posts
    3

    Default

    This is what i already have.

    Code:
        
    ...
         <path id="catalina-ant-classpath">
            <!-- We need the Catalina jars for Tomcat -->
            <!--  * for other app servers - check the docs -->
            <fileset dir="${appserver.lib}">
                <include name="catalina-ant.jar"/>
            </fileset>
        </path>
    
        <taskdef name="install" classname="org.apache.catalina.ant.InstallTask">
            <classpath refid="catalina-ant-classpath"/>
        </taskdef>
    ...

    in build.properties i have

    Code:
    # Ant properties for building the springapp
    
    appserver.home=${user.home}/Programme/run/apache-tomcat-6.0.14
    # for Tomcat 5 use $appserver.home}/server/lib
    # for Tomcat 6 use $appserver.home}/lib
    appserver.lib=${appserver.home}/lib
    
    deploy.path=${appserver.home}/webapps
    ...

  4. #4
    Join Date
    Oct 2008
    Posts
    1

    Default Problem in Spring Project

    even i am facing the same errror. how muchever i try i am not able to solve it .
    if anybody can plz help me out of this problem, i have given all the codes that is mention after that to I am get the following error :
    "
    Buildfile: build.xml

    BUILD FAILED
    C:\eclipse\workspace\springapp\build.xml:85: C:\eclipse\workspace\springapp\${c:
    \apache-tomcat-6.0.16}\lib not found. "

  5. #5
    Join Date
    Apr 2009
    Posts
    1

    Default

    I am having the same problem. I think it has to do with making minor modifications in the build.properties file.

    What changes do I need to make to the file below?

    I am using Apache-tomcat-6.0.18, while the example refers to 6.0.14. On a related note, my Apache is installed on c:\documents and settings\...\My Documents\apache-tomcat-6.0.18.

    #******************************************
    # Ant properties for building the springapp

    appserver.home=${user.home}/apache-tomcat-6.0.14
    # for Tomcat 5 use $appserver.home}/server/lib
    # for Tomcat 6 use $appserver.home}/lib
    appserver.lib=${appserver.home}/lib

    deploy.path=${appserver.home}/webapps

    ......

    #******************************************

    This it the exact error I am getting at the Ant Build stage:

    $ant
    Buildfile: build.xml

    BUILD FAILED
    Premature end of file.

    Total time: 0 seconds
    C:\Documents and Settings\eywong\workspace\springapp>ant -verbose
    Apache Ant version 1.7.1 compiled on June 27 2008
    Buildfile: build.xml
    Detected Java version: 1.5 in: C:\ibm\SDP70\jdk\jre
    Detected OS: Windows XP
    parsing buildfile C:\Documents and Settings\eywong\workspace\springapp\build.xml
    with URI = file:/C:/Documents%20and%20Settings/eywong/workspace/springapp/build
    .xml

    BUILD FAILED
    Premature end of file.
    at org.apache.tools.ant.helper.ProjectHelper2.parse(P rojectHelper2.java:
    222)
    ........

    Thanks
    Edward
    Last edited by EYWONG; Apr 9th, 2009 at 01:17 PM. Reason: Adding more information

  6. #6

    Default

    I had the same problem. I colud resolve it by completing properly this path

    appserver.home=${user.home}/apache-tomcat-6.0.14 in "build.properties" file.
    I put my apache path. In my case, this line is

    appserver.home=${user.home}/bin/apache-tomcat-6.0.20.

    Because in my home folder, I have an other folder called "bin", and there i have my tomcat 6.0.20.

    Bye

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •