Building Tomcat from sources with Ant and Idea.

Answered

My task is to create convenient Idea project for building, debugging and running Apache Tomcat sources.

I have downloaded the sources and built Tomcat with Ant script provided from command-line. Now I want to create normal Idea project for this and build and debug it from Idea.

I have created project from source files and added build.xml to Ant Tools.

I cannot understand how can I setup Run Configuration for running and debugging my project. What should I specify in "Working Directory" and "Use Classpath of Module".

I have specified my projects's folder as Working Directory and as Classpath of Module, but when I try to run it I get
Exception in thread "main" java.lang.ClassNotFoundException: org.apache.catalina.startup.Bootstrap

That class is compiled and located in {my.project.folder}/output folder.

So what should I do to run Ant project in Idea?

2 comments
Comment actions Permalink

I need answers for the same, can anyone post a good answer for this question. ??

0
Comment actions Permalink

>What should I specify in "Working Directory" and "Use Classpath of Module". 

Working directory is the working directory that IDE will use when executing the process created by the Run/Debug Configuration process. E.g. if it is an Ant task Run/Debug Configuration, set it to the same directory that you use when executing Ant task from command line.

Use Classpath of Module option tells IDE to use the java classpath from the module specified. It is built from all the dependencies for this module. But this option does not exist for the Ant Run/Debug Configuration task.

0

Please sign in to leave a comment.