Skip to content

Commit c95b079

Browse files
committed
be able to update server.xml under project
1 parent 2262625 commit c95b079

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
<!-- Keep a Changelog guide -> https://keepachangelog.com -->
22
# SmartTomcat Changelog
33

4+
## [4.7.3]
5+
6+
- be able to update the server.xml under the <project>/.smarttomcat/<module>/conf.
7+
48
## [4.7.2]
59

610
- Add option to disable run configuration from context.

gradle.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ org.gradle.jvmargs=-Dfile.encoding=UTF-8 -Duser.language=en -Duser.country=US
22

33
pluginName = SmartTomcat
44
pluginGroup = com.poratu.idea.plugins.tomcat
5-
pluginVersion = 4.7.2
5+
pluginVersion = 4.7.3
66

77
pluginSinceBuild = 193.5233.102
88
pluginUntilBuild=

src/main/java/com/poratu/idea/plugins/tomcat/conf/TomcatCommandLineState.java

+8-1
Original file line numberDiff line numberDiff line change
@@ -118,11 +118,18 @@ protected JavaParameters createJavaParameters() {
118118
String extraClassPath = configuration.getExtraClassPath();
119119
Map<String, String> envOptions = configuration.getEnvOptions();
120120

121+
//copy to project folder, and then user is able to update server.xml under the project.
122+
Path projectConfPath = Paths.get(project.getBasePath(), ".smarttomcat", module.getName(), "conf");
123+
if (!projectConfPath.toFile().exists()) {
124+
FileUtil.createDirectory(projectConfPath.toFile());
125+
FileUtil.copyDir(tomcatInstallationPath.resolve("conf").toFile(), projectConfPath.toFile());
126+
}
127+
121128
// Copy the Tomcat configuration files to the working directory
122129
Path confPath = catalinaBase.resolve("conf");
123130
FileUtil.delete(confPath);
124131
FileUtil.createDirectory(confPath.toFile());
125-
FileUtil.copyDir(tomcatInstallationPath.resolve("conf").toFile(), confPath.toFile());
132+
FileUtil.copyDir(projectConfPath.toFile(), confPath.toFile());
126133
// create the temp folder
127134
FileUtil.createDirectory(catalinaBase.resolve("temp").toFile());
128135

0 commit comments

Comments
 (0)