Update: According to the OP, the needed parameter is actually instanceRoot
, not installRoot
.
I think that you can use the installRoot
instanceRoot
parameter for this. Set it to the target
directory:
<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>