SitePoint Sponsor

User Tag List

Results 1 to 10 of 10
  1. #1
    SitePoint Zealot Biju's Avatar
    Join Date
    Sep 2004
    Location
    India
    Posts
    135
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Build.xml problem

    Guys, i get a error when i try to build Ant. I am using

    Tomcat Version : 6.0
    Ant Version : 1.7.1
    Java : 1.6


    The error which i get is

    C:\myusers>ant new -Dapp.name=myusers
    Buildfile: build.xml

    BUILD FAILED
    C:\myusers\build.xml:164: taskdef class org.apache.catalina.ant.RemoveTask cannot
    t be found

    Total time: 0 seconds
    C:\myusers>
    I checked into the tomcat folder in the lib and found that RemoveTask File is present in the catalina-ant.jar


    Why is Ant not locating the jar file in my Tomcat lib? I have checked the environment variables set and it sounds clear.

    Update :

    In the build.xml file its something like this.

    <taskdef file="tomcatTasks.properties">
    <classpath>
    <pathelement path="${tomcat.home}/server/lib/catalina-ant.jar"/>
    </classpath>
    </taskdef>
    I suggest everyone to upgrade to Windows Vista.

  2. #2
    SiteP0int Weazle hooknc's Avatar
    Join Date
    Dec 2004
    Location
    Socialist Republic of Boulder
    Posts
    937
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Make sure your TOMCAT.HOME environment variable is set properly.

    Best of Luck.
    baby steps... baby steps...

  3. #3
    SitePoint Wizard
    Join Date
    Apr 2007
    Posts
    1,396
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    or you can just drop that jar right into ${ANT_HOME}/libs . Just FYI, maven is far better than ant.

  4. #4
    SitePoint Zealot Biju's Avatar
    Join Date
    Sep 2004
    Location
    India
    Posts
    135
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by hooknc View Post
    Make sure your TOMCAT.HOME environment variable is set properly.

    Best of Luck.
    Well i did set mate and even to the lib file directly. Thanx mate for your reply.

    Quote Originally Posted by sg707 View Post
    or you can just drop that jar right into ${ANT_HOME}/libs . Just FYI, maven is far better than ant.
    This worked like a charm mate. I have also thought of using maven, but ant makes me comfortable. Will you head up me why should i change to maven.

    Thanx a lot mate for your reply.
    I suggest everyone to upgrade to Windows Vista.

  5. #5
    SitePoint Zealot Biju's Avatar
    Join Date
    Sep 2004
    Location
    India
    Posts
    135
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    C:\myusers>ant deploy
    Buildfile: build.xml

    compile:
    [mkdir] Created dir: C:\myusers\build\classes
    [javac] Compiling 2 source files to C:\myusers\build\classes

    BUILD FAILED
    C:\myusers\build.xml:53: C:\myusers\${env.CATALINA_HOME}\common\lib not found.

    Total time: 0 seconds
    Now when i try to deploy it again shows this sort of error. I really like Ant, so i don't want to head up with maven.
    I suggest everyone to upgrade to Windows Vista.

  6. #6
    SitePoint Wizard
    Join Date
    Apr 2007
    Posts
    1,396
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    this looks weird to me
    C:\myusers\${env.CATALINA_HOME}\common\lib

    it should be
    ${env.CATALINA_HOME}\common\lib

  7. #7
    SitePoint Wizard
    Join Date
    Apr 2007
    Posts
    1,396
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    reason to use maven? consider ant as "C" and maven is "C++"

  8. #8
    SiteP0int Weazle hooknc's Avatar
    Join Date
    Dec 2004
    Location
    Socialist Republic of Boulder
    Posts
    937
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by sg707 View Post
    reason to use maven? consider ant as "C" and maven is "C++"
    I think that is more of a comparison then a reason really. And depending on what you're doing c might be better then c++.

    So here are the reasons I've heard of using Maven instead of Ant.

    Maven has a better concept of modules.
    Maven has a better way of handling deployment to different environment using profiles.
    Maven will resolve jar dependencies quite nicely.

    There probably are more reasons to use Maven, but I don't know them off the top of my head.

    Maven does have one huge drawback in my mind and that is its horrible online documentation. Last time I looked at Maven I couldn't even figure out how to run a Maven build. Which is too bad, because there are a lot of people that really like Maven.

    My recommendation is to go out and get a Maven book of some sort and then read though it.

    Ant is a good product, but Maven is probably better at doing environment builds.

    Best of Luck.
    baby steps... baby steps...

  9. #9
    SitePoint Member tattobit's Avatar
    Join Date
    Feb 2006
    Posts
    0
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    post you build.xml here. Looks like you have a missing reference.

  10. #10
    SitePoint Wizard
    Join Date
    Apr 2007
    Posts
    1,396
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by hooknc View Post
    I think that is more of a comparison then a reason really. And depending on what you're doing c might be better then c++.

    So here are the reasons I've heard of using Maven instead of Ant.

    Maven has a better concept of modules.
    Maven has a better way of handling deployment to different environment using profiles.
    Maven will resolve jar dependencies quite nicely.

    There probably are more reasons to use Maven, but I don't know them off the top of my head.

    Maven does have one huge drawback in my mind and that is its horrible online documentation. Last time I looked at Maven I couldn't even figure out how to run a Maven build. Which is too bad, because there are a lot of people that really like Maven.

    My recommendation is to go out and get a Maven book of some sort and then read though it.

    Ant is a good product, but Maven is probably better at doing environment builds.

    Best of Luck.
    At first, my primary reason to use Maven is for Jar version control. There were times when 2 frameworks share common "jars" and these jars had different version...... But, later found many many many many cool features of Maven

    Try the "external resource" link from maven site for Documentation, it's got more than enough.

    http://maven.apache.org/articles.html


Bookmarks

Posting Permissions

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