Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0

...

If you make changes to a plugin, you will generally need to shut down the server, update the plugin, and start the server again.

Show If
modeedit

However, you can eliminate restating the server in the following cases:

To enable TeamCity development mode, pass the "teamcity.development.mode=true" internal property. Using the option you will:

  • Enforce application server to quicker recompile changed .jsp classes
  • Disable JS and CSS resources merging/caching

The following hints can help you eliminate the restart in the certain cases:

  • if you do not change code affecting plugin initialization and change only body of the methods, you can attach to the server process with a debugger and

...

  • use Java hotswap to reload the changed classes from your IDE without web server restart. Note that the standard hotswap does not allow you to change method signatures.
  • if you make a change in some resource (jsp, js, images) you can copy the resources to webapps/ROOT/plugins/<plugin-name> directory to allow Tomcat to reload them.

    ...

    You can speed up Tomcat reloading logic by setting JspServlet development mode to true in the tomcat/conf/web.xml file.

    Wiki Markup
    {hidden-data}should work without unpacking - from plugin zip file{hidden-data}
  • change in build agent part of plugin will initiate build agents upgrade.

To enable TeamCity development mode, pass the If you replace a deployed plugin .zip file with changed class files while TeamCity server is running, this can lead to NoClassDefFound errors.
To avoid this, set "teamcity.development.modeshadowCopyClasses=true" JVM option. Using the option you will:

  • Enforce application server to quicker recompile changed .jsp classes
  • Disable JS and CSS resources merging/caching

Also, to check minor changes in the code without server restart, you can start the server with debug, connect debugging session to the application and use Java hotswap to reload the changed classes from your IDE. Note that the standard hotswap does not allow you to change method signatures.internal property. This will result in:

  • creating ".teamcity_shadow" directory for each plugin .jar file;
  • avoid .jar files update on plugin archive change.

Wiki Markup
{hidden-data}
Если ты обновляешь жары плагина (или зип) с целью поменять ресурсы - тебе приходится также поменять жар, который используется класслоадером. Довольно с большой вероятностью это приводит к ошибкам класслоадеров при рендеринге жсп плагина - падает NoClassDefFound и подобные ошибки.
Так вот, включение этой проперти позволяет избегать таких ошибок. 
Мне это позволило подменять ресурсы плагина и не рестартовать сервер довольно часто. 

Я думаю, это может быть полезно для тех, кто хочет разрабатывать веб-интерфейс. Да, может быть стоит включать этот режим в дев-може всегда. 
{hidden-data}



See also:

Panel
bgColor#FFFFFF
borderStyledashed

Extending TeamCity: Developing TeamCity Plugins | Plugins Packaging