2

私はMavenEmbeddedGlassfishプラグインを使用しており、それはうまく機能しますが、残念ながら、メインプロジェクトディレクトリに一時ディレクトリが作成されます。プロジェクトをクリーンアップするたびに、埋め込まれたディレクトリもワイプされるように、ターゲットを使用したいと思います。

そのための設定はありますか?

ウォルター

4

2 に答える 2

3

更新: OPによると、必要なパラメーターは実際instanceRootにはであり、ではありませんinstallRoot

このためのパラメータを使用できると思います。次のディレクトリに設定します。installRoot instanceRoottarget

<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>
于 2010-04-25T18:16:36.673 に答える
0

実際、これを行う正しい方法は、腹立たしく部分的に文書化されていない プロパティを使用し、またはメソッドglassfish.embedded.tmpdir Systemのすべての使用を排除することです。BootstrapProperties#setInstallRoot(String)BootstrapProperties#setInstanceRoot(String)

于 2012-08-14T21:08:03.297 に答える