What is the difference between $TOMCAT_HOME$ and $IDEA_RUN:TOMCAT_HOME$?
Our shared run configuration is constantly changing between
<STARTUP> <option name="SCRIPT" value="$TOMCAT_HOME$/bin/catalina.sh" /> </STARTUP>
and
<STARTUP> <option name="SCRIPT" value="%IDEA_RUN:TOMCAT_HOME%/bin/catalina.sh" /> </STARTUP>
This is annoying because we get changes in VCS, which aren't neccassery.
What is the difference between the path variable and the prefix with IDEA_RUN? How can we avoide these changes?
Please sign in to leave a comment.
$TOMCAT_HOME$ refers to a user-defined path variable (File | Settings | Path Variables). %IDEA_RUN:TOMCAT_HOME% is used internally by IDEA to store
paths to startup scripts relatively to Tomcat home.
Why do you need 'TOMCAT_HOME' path variable? Tomcat server configuration is stored on the global level and referenced from projects by its name so
this variable seems to be useless. You can remove this variable to workaround the problem until it is fixed.
--
Nikolay Chashnikov
Software Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
The problem is, that if we remove the path variable we get entries in the run configurations like this:
If another developer uses another directory structure to store his Tomcat, it will change constantly. That was the reason for the introduction of the path variable.
What shall we change to make this more robust against VCS changes?
Thank you.
Does "$PROJECT_DIR$/../tomcat.git" path equal to the path specified in 'Tomcat Home' field in the Tomcat Server settings for the server selected in
the run configuration?
--
Nikolay Chashnikov
Software Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
Yes, it does:
What is specified in 'Startup Script' field on 'Startup/Connection' tab of the Tomcat run configuration? If that path contains '/../' try to rewrite
the path without it.
--
Nikolay Chashnikov
Software Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
"Use default" is activated:
Nikolay,
do you have any other ideas how we can fix this problem? It is very annoying for the developers in the team, that the files changes so often. Shall I create a YouTrack issue for this?
Thank you
Hmm, if 'Use default' checkbox is selected path to the startup script should not be saved at all. To workaround the problem you can unselect 'Use
default' checkbox, clear 'Startup script' field and select 'Use default' again. After that 'script' option will be cleared in the run configuration
xml file.
--
Nikolay Chashnikov
Software Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
Hi Nikolay,
thank you for your answer. Although your suggested steps removed the TOMCAT_HOME variables, we now have another problem:
Everytime we modify something in the Tomcat Run Configuration a new space character will be inserted into the XML file as seen in the screenshot. The amount of spaces are growing continuously.
I already tried:
Nothing helped, everytime I modify the run configuration, there will be spaces added to xml.
We will fix the problem with spaces, thank you. Until it is fixed you can try the following workaround:
1) Uncheck 'Use default'.
2) Specify path to any existing file under the project home folder in 'Startup script' field.
3) Check 'Use default'.
After that the 'script' element in the configuration xml file will be filled with the specified path collapsed using $PROJECT_DIR$ so it won't be
changed when you open the project on a different computer.
--
Nikolay Chashnikov
Software Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
Nice idea to workaround the problem. ;)
Did you create a YouTrack issue for the spacing problem, so that I can follow the progress?
btw: reopening the run configuration and unchecking "use default" a new trailing space is added to the path to the file in the project dir. Maybe the problem are the parameters " run" and " stop" which are added to catalina.sh.
The problem with growing spaces is already fixed and the fix will be included in the next IDEA 11.1.2 build. I've created an issue about saving path
to the script when 'Use default' option is selected (http://youtrack.jetbrains.com/issue/IDEA-86026), but I don't think that we will fix it in IDEA
11.1.x because it will change existing run configurations.
--
Nikolay Chashnikov
Software Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
Yes, the additional space is indeed added in the editor. However it shouldn't be stored in the xml file.
--
Nikolay Chashnikov
Software Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"