As we know, Tomcat use Ant build tool. But we can't use ant task in tomcat source code root directory build.xml file create intellij idea project.So how to convert tomcat source code to Intellij idea project?
Asked
Active
Viewed 2,158 times
0
-
You don't need to build Tomcat in order to debug it, attaching sources to the library should be enough. If you need a project in IntelliJ IDEA, you will have to set up it manually. – CrazyCoder May 10 '17 at 13:22
3 Answers
4
- Download source code from https://github.com/apache/tomcat
- Install latest version of apache-ant, and execute command as below:
cd tomcat/
ant -buildfile build.xml ide-intellij
- Open project using Intellij-idea
Qy Zuo
- 2,294
- 21
- 21
1
Open Project Structure -> Modules -> Dependencies. Then import tomcat 7 lib . Then run in debug mode. Then you can select tomcat-src code to debug.
巧克力
- 61
- 2
- 3
0
As I know, Ant and Tomcat are from the same author. And this link introduces a way to build source code and convert it to a eclipse project. And the Junit test could be built and ran successfully. And the official site doesn't introduce a way to convert it to a idea project but just one word The same general approach should work for most IDEs; it has been reported to work in IntelliJ IDEA, for example.
jingb
- 3
- 1
-
import Tomcat source as ant project in intellij idea I get some errors,and generate eclipse project use ant and then import this eclipse project in intellij idea I get some errors too. – Ryanqy Feb 19 '19 at 11:14
-
I have also search so many times but all failed…… Cause there are still some plugins in eclipse are better than idea, such as MAT. I think we still have to use it in some occasion in a long time…… – jingb Feb 20 '19 at 09:23