Skip to content

Commit

Permalink
be able to update server.xml under project
Browse files Browse the repository at this point in the history
  • Loading branch information
zengkid committed Jun 28, 2024
1 parent 2262625 commit c95b079
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
<!-- Keep a Changelog guide -> https://keepachangelog.com -->
# SmartTomcat Changelog

## [4.7.3]

- be able to update the server.xml under the <project>/.smarttomcat/<module>/conf.

## [4.7.2]

- Add option to disable run configuration from context.
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ org.gradle.jvmargs=-Dfile.encoding=UTF-8 -Duser.language=en -Duser.country=US

pluginName = SmartTomcat
pluginGroup = com.poratu.idea.plugins.tomcat
pluginVersion = 4.7.2
pluginVersion = 4.7.3

pluginSinceBuild = 193.5233.102
pluginUntilBuild=
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,11 +118,18 @@ protected JavaParameters createJavaParameters() {
String extraClassPath = configuration.getExtraClassPath();
Map<String, String> envOptions = configuration.getEnvOptions();

//copy to project folder, and then user is able to update server.xml under the project.
Path projectConfPath = Paths.get(project.getBasePath(), ".smarttomcat", module.getName(), "conf");
if (!projectConfPath.toFile().exists()) {
FileUtil.createDirectory(projectConfPath.toFile());
FileUtil.copyDir(tomcatInstallationPath.resolve("conf").toFile(), projectConfPath.toFile());
}

// Copy the Tomcat configuration files to the working directory
Path confPath = catalinaBase.resolve("conf");
FileUtil.delete(confPath);
FileUtil.createDirectory(confPath.toFile());
FileUtil.copyDir(tomcatInstallationPath.resolve("conf").toFile(), confPath.toFile());
FileUtil.copyDir(projectConfPath.toFile(), confPath.toFile());
// create the temp folder
FileUtil.createDirectory(catalinaBase.resolve("temp").toFile());

Expand Down

0 comments on commit c95b079

Please sign in to comment.