Intellj IDEA失去了tomcat配置

时间:2016-03-05 12:25:25

标签: tomcat intellij-idea

所以,我在OS X上,当我关闭并重新打开项目时,IDEA总是丢失我的tomcat配置。例如:

→ cat .idea/workspace.xml |grep tomcat
    <configuration default="true" type="#com.intellij.j2ee.web.tomcat.TomcatRunConfigurationFactory" factoryName="Remote" ALTERNATIVE_JRE_ENABLED="false">
    <configuration default="true" type="#com.intellij.j2ee.web.tomcat.TomcatRunConfigurationFactory" factoryName="$spring.profiles.active$" ALTERNATIVE_JRE_ENABLED="false">
    <configuration default="true" type="#com.intellij.j2ee.web.tomcat.TomcatRunConfigurationFactory" factoryName="$spring.profiles.active$" APPLICATION_SERVER_NAME="Tomcat 8.0.271" ALTERNATIVE_JRE_ENABLED="false">
    <configuration default="true" type="#com.intellij.j2ee.web.tomcat.TomcatRunConfigurationFactory" factoryName="$spring.profiles.active$" APPLICATION_SERVER_NAME="Tomcat 8.0.271" ALTERNATIVE_JRE_ENABLED="false">
    <configuration default="true" type="#com.intellij.j2ee.web.tomcat.TomcatRunConfigurationFactory" factoryName="$spring.profiles.active$" ALTERNATIVE_JRE_ENABLED="false">
    <configuration default="true" type="#com.intellij.j2ee.web.tomcat.TomcatRunConfigurationFactory" factoryName="$spring.profiles.active$" ALTERNATIVE_JRE_ENABLED="false">
    <configuration default="false" name="api" type="#com.intellij.j2ee.web.tomcat.TomcatRunConfigurationFactory" factoryName="$spring.profiles.active$" APPLICATION_SERVER_NAME="Tomcat 8.0.32" ALTERNATIVE_JRE_ENABLED="false">
    <configuration default="false" name="Unnamed" type="#com.intellij.j2ee.web.tomcat.TomcatRunConfigurationFactory" factoryName="$spring.profiles.active$" APPLICATION_SERVER_NAME="Tomcat 8.0.271" ALTERNATIVE_JRE_ENABLED="false">
    <configuration default="false" name="Unnamed" type="#com.intellij.j2ee.web.tomcat.TomcatRunConfigurationFactory" factoryName="$spring.profiles.active$" APPLICATION_SERVER_NAME="Tomcat 8.0.27" ALTERNATIVE_JRE_ENABLED="false">

现在我创建配置:

→ cat .idea/workspace.xml |grep tomcat
  <component name="RunManager" selected="Tomcat Server.my tomcat config">
    <configuration default="true" type="#com.intellij.j2ee.web.tomcat.TomcatRunConfigurationFactory" factoryName="$spring.profiles.active$" ALTERNATIVE_JRE_ENABLED="false">
    <configuration default="true" type="#com.intellij.j2ee.web.tomcat.TomcatRunConfigurationFactory" factoryName="Remote" ALTERNATIVE_JRE_ENABLED="false">
    <configuration default="false" name="my tomcat config" type="#com.intellij.j2ee.web.tomcat.TomcatRunConfigurationFactory" factoryName="$spring.profiles.active$" APPLICATION_SERVER_NAME="Tomcat 8.0.32" ALTERNATIVE_JRE_ENABLED="false">
      <item index="1" class="java.lang.String" itemvalue="Tomcat Server.my tomcat config" />
    <configuration default="true" type="#com.intellij.j2ee.web.tomcat.TomcatRunConfigurationFactory" factoryName="$spring.profiles.active$" ALTERNATIVE_JRE_ENABLED="false">
    <configuration default="true" type="#com.intellij.j2ee.web.tomcat.TomcatRunConfigurationFactory" factoryName="$spring.profiles.active$" APPLICATION_SERVER_NAME="Tomcat 8.0.271" ALTERNATIVE_JRE_ENABLED="false">
    <configuration default="true" type="#com.intellij.j2ee.web.tomcat.TomcatRunConfigurationFactory" factoryName="$spring.profiles.active$" APPLICATION_SERVER_NAME="Tomcat 8.0.271" ALTERNATIVE_JRE_ENABLED="false">
    <configuration default="true" type="#com.intellij.j2ee.web.tomcat.TomcatRunConfigurationFactory" factoryName="$spring.profiles.active$" ALTERNATIVE_JRE_ENABLED="false">
    <configuration default="true" type="#com.intellij.j2ee.web.tomcat.TomcatRunConfigurationFactory" factoryName="$spring.profiles.active$" ALTERNATIVE_JRE_ENABLED="false">
    <configuration default="false" name="api" type="#com.intellij.j2ee.web.tomcat.TomcatRunConfigurationFactory" factoryName="$spring.profiles.active$" APPLICATION_SERVER_NAME="Tomcat 8.0.32" ALTERNATIVE_JRE_ENABLED="false">
    <configuration default="false" name="Unnamed" type="#com.intellij.j2ee.web.tomcat.TomcatRunConfigurationFactory" factoryName="$spring.profiles.active$" APPLICATION_SERVER_NAME="Tomcat 8.0.271" ALTERNATIVE_JRE_ENABLED="false">
    <configuration default="false" name="Unnamed" type="#com.intellij.j2ee.web.tomcat.TomcatRunConfigurationFactory" factoryName="$spring.profiles.active$" APPLICATION_SERVER_NAME="Tomcat 8.0.27" ALTERNATIVE_JRE_ENABLED="false">

如您所见,配置已插入workspace.xml。现在当我关闭项目并重新打开它时,配置就消失了。其他配置效果很好。

我还尝试使用不同的手动下载的tomcat并部署另一个工件。任何想法接下来要尝试什么,这真的很烦人。顺便说一句,DB配置也会丢失。

谢谢,罗宾

0 个答案:

没有答案