Intellij tomcat本地运行配置 - 幕后会发生什么? [英] Intellij tomcat local run configuration - what happens behind the scenes?
问题描述
我一直在使用tomcat运行配置没有任何问题 - 它做得非常好。然而,我有点不喜欢它没有记录在任何地方(或者是它?)这个魔法实际上是如何发生的。
我想它会以某种方式使目标目录中的工件创建tomcat引用应用程序(如果使用maven)。我还注意到,当使用manager-gui应用程序时,没有部署其他应用程序,所以它不能使用tomcat / webapps目录。
我很好奇的是:
- 如何启动tomcat指向tomcat home之外的应用程序?
- 它是否使用我的app部署我的应用程序{project_dir} / target / {appName}?
- manager-gui app在哪里?
- 日志和配置文件在哪里?我是使用IntelliJ IDEA 15.0.3,Tomcat 8.0.15和JDK 1.8.0_31
这是摘录自
C:\Program Files(x86)\ JetBrains\IntelliJ IDEA 15.0.2\bin\\ idea.properties
:#-------------- -------------------------------------------------- -----
#如果要自定义IDE系统文件夹的路径,请取消注释此选项。确保使用正斜杠。
#--------------------------------------------- ------------------------
#idea.system.path = $ {user.home} /.IntelliJIdea / system
idea.system.path = D:/ dev / IntelliJ-Settings / system
In
文件
- >设置...
- >构建,执行,部署
- >应用程序服务器
我已经定义了这个:(查看Tomcat基目录
)
D:\ catalina-base -idea
包含IntelliJ的全局Tomcat配置。
当我使用IntelliJ运行配置部署我的webapp时,Web应用程序将部署到
D:\dev \IntelliJ-Settings \ system \ tomcat
(参见idea.properties
)。
上面解释了问题1.
Questi在2:afaik,
目标
仅用于构建,而不是用于部署。
问题3:没有
中的经理应用程序:D:\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\问题4:日志在
D:\dev\IntelliJ-Settings \ system \ tomcat \webapps \yourApp
中。全局Tomcat配置位于D:\ catalina-base-idea
。
您可以配置Tomcat对于IntelliJ,它使用8080以外的端口。因此,您可以同时启动标准的Tomcat和IntelliJ Tomact。
I've been using tomcat run configuration without any problems - it does a excellent job. However I kind of don't like the fact that it is not documented anywhere (or is it?) how this magic actually happens.
I suppose it somehow makes tomcat reference app created from artifact within target directory (if using maven). I also noticed that when using manager-gui app there are no other applications deployed so it must not use tomcat/webapps dir.
What I am curious is:
- How does it start tomcat to point at the application outside tomcat home?
- Does it deploy my app using {project_dir}/target/{appName}?
- Where is the manager-gui app?
- Where are the logs and conf files?
解决方案I'm using IntelliJ IDEA 15.0.3, Tomcat 8.0.15 and JDK 1.8.0_31
This is an excerpt from
C:\Program Files (x86)\JetBrains\IntelliJ IDEA 15.0.2\bin\idea.properties
:#--------------------------------------------------------------------- # Uncomment this option if you want to customize path to IDE system folder. Make sure you're using forward slashes. #--------------------------------------------------------------------- # idea.system.path=${user.home}/.IntelliJIdea/system idea.system.path=D:/dev/IntelliJ-Settings/system
In
File
-->Settings...
-->Build, Execution, Deployment
-->Application Servers
I've defined this: (look atTomcat base directory
)D:\catalina-base-idea
contains the global Tomcat configuration for IntelliJ.When I deploy my webapp using IntelliJ run configuration, the web app will be deployed to
D:\dev\IntelliJ-Settings\system\tomcat
(seeidea.properties
).The above explains question 1.
Question 2: afaik,
target
is only used for building, not for deploying.Question 3: there is no manager app within
D:\dev\IntelliJ-Settings\system\tomcat\webapps
Question 4: logs are within
D:\dev\IntelliJ-Settings\system\tomcat\webapps\yourApp
. The global Tomcat config is located inD:\catalina-base-idea
.You can configure the Tomcat for IntelliJ so that it uses a port other than 8080. So you can start your standard Tomcat and IntelliJ Tomact at the same time.
这篇关于Intellij tomcat本地运行配置 - 幕后会发生什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!