zengkid / SmartTomcat

The Tomcat plugin for Intellij IDEA
Apache License 2.0
125 stars 56 forks source link

Multiple Resources #83

Closed matteopic closed 2 years ago

matteopic commented 2 years ago

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

yuezk commented 2 years ago

@matteopic It has been fixed in https://github.com/zengkid/SmartTomcat/commit/28c7f27b0f2249f0ceb718760658dcb621f6a410, will release soon.

yuezk commented 2 years ago

Released in 4.3.4