I currently use the jetty maven plugin to deploy my war files.
Something like :-
<plugin>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>9.3.7.v20160115</version>
<configuration>
<scanIntervalSeconds>10</scanIntervalSeconds>
<webApp>
<contextPath>/test</contextPath>
</webApp>
<contextHandlers>
<contextHandler implementation="org.eclipse.jetty.maven.plugin.JettyWebAppContext">
<war>${project.basedir}../../B.war</war>
<contextPath>/B</contextPath>
</contextHandler>
<contextHandler implementation="org.eclipse.jetty.maven.plugin.JettyWebAppContext">
<war>${project.basedir}../../C.war</war>
<contextPath>/C</contextPath>
</contextHandler>
</contextHandlers>
</configuration>
</plugin>
When I do mvn:jetty run, folders like jetty-localhost.somedomain.com-8080-someApp.war-_someApp-any-931174362474622988.dir get created under the temp directory of my user. Such folders are created every time I build and run my app and it consumes a lot of space and I have to manually delete temp directories each time my pc becomes slow.
Is there a way I could tell jetty to use a particular directory every time so that the older temp folders get replaced.
在进行战争配置时,我们可以使用标签<tempDirectory></tempDirectory>
提及temp目录,如下所示:
<contextHandler implementation="org.eclipse.jetty.webapp.WebAppContext"> <war>warNamw</war> <contextPath>contextPath</contextPath> <tempDirectory>giveTheTempPath</tempDirectory> </contextHandler>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.