I have an existing maven project wich already defines its own src/main/webapp/META-INF/context.xml file.
In that file is already defined the <Resources>...</Resources> element.
When I start the Tomcat (my version is 8.5), the server.xml file handled by the plugin is rewritten with two <Resources>...</Resources> elements: the one of the maven project and the one generated by the plugin.
Tomcat starts without any error but the instruction declared in the maven project is ignored.
I think would be better try to detect the existance of that element, and if it exists append the <PreResources> and <PostResources> inside that element.
Intellij & SmartTomcat Version (Help -> About copy & paste below)
IntelliJ IDEA 2022.1.2 (Community Edition)
Build #IC-221.5787.30, built on May 31, 2022
Runtime version: 11.0.15+10-b2043.56 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Windows 10 10.0
GC: G1 Young Generation, G1 Old Generation
Memory: 2024M
Cores: 8
Non-Bundled Plugins:
idea.plugin.protoeditor (221.5787.13)
com.poratu.idea.plugins.tomcat (4.2.0)
camtwoTomcatRunner (1.7)
Docker (221.5787.15)
I have an existing maven project wich already defines its own
src/main/webapp/META-INF/context.xml
file. In that file is already defined the<Resources>...</Resources>
element. When I start the Tomcat (my version is 8.5), the server.xml file handled by the plugin is rewritten with two<Resources>...</Resources>
elements: the one of the maven project and the one generated by the plugin.Tomcat starts without any error but the instruction declared in the maven project is ignored.
I think would be better try to detect the existance of that element, and if it exists append the
<PreResources>
and<PostResources>
inside that element.Intellij & SmartTomcat Version (Help -> About copy & paste below) IntelliJ IDEA 2022.1.2 (Community Edition) Build #IC-221.5787.30, built on May 31, 2022 Runtime version: 11.0.15+10-b2043.56 amd64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o. Windows 10 10.0 GC: G1 Young Generation, G1 Old Generation Memory: 2024M Cores: 8 Non-Bundled Plugins: idea.plugin.protoeditor (221.5787.13) com.poratu.idea.plugins.tomcat (4.2.0) camtwoTomcatRunner (1.7) Docker (221.5787.15)
Kotlin: 221-1.6.21-release-337-IJ5787.30