Maven Embedded Glassfishプラグイン - 一時ディレクトリを設定する方法は?
-
01-10-2019 - |
質問
Maven Embedded Glassfishプラグインを使用していますが、うまく機能しますが、残念ながらメインプロジェクトディレクトリに一時ディレクトリが作成されます。ターゲットを使用して、プロジェクトをクリーニングするたびに、組み込みディレクトリも拭き取られるようにしたいと思います。
そのための設定はありますか?
ウォルター
解決
アップデート: OPによると、必要なパラメーターは実際には instanceRoot
, 、 いいえ installRoot
.
使用できると思います installRoot
instanceRoot
これのパラメーター。に設定します target
ディレクトリ:
<plugin>
<groupId>org.glassfish</groupId>
<artifactId>maven-embedded-glassfish-plugin</artifactId>
<version>3.0</version>
<configuration>
<instanceRoot>${project.build.directory}</instanceRoot>
<goalPrefix>glassfish</goalPrefix>
<app>target/test.war</app>
<port>8080</port>
<contextRoot>test</contextRoot>
</configuration>
<executions>
<execution>
<phase>install</phase>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
他のヒント
実際、これを行う正しい方法は、 腹立たしく、部分的に文書化されていない glassfish.embedded.tmpdir
System
プロパティ、およびのすべての使用法を排除します BootstrapProperties#setInstallRoot(String)
また BootstrapProperties#setInstanceRoot(String)
方法。
所属していません StackOverflow