JSP hot-swap in Maven glassfish embedded plugin

2020-07-18 07:08发布

问题:

I am trying to setup embedded glassfish maven plugin and I succeeded, but I can't make jsp files to be hot-swapped.

Here is my config:

<plugin>
    <groupId>org.glassfish</groupId>
    <artifactId>maven-embedded-glassfish-plugin</artifactId>
    <version>3.0.1</version>
    <configuration>
        <instanceRoot>${project.build.directory}</instanceRoot>
        <goalPrefix>embedded-glassfish</goalPrefix>
        <app>target/myapp.war</app>
        <port>8080</port>
        <contextRoot>myapp</contextRoot>
        <autoDelete>true</autoDelete>
    </configuration>
</plugin>

Any clues?

回答1:

Resurrection for further reference. I managed to do that by deploying an exploded war archive like this.

<app>${project.build.directory}/${project.build.finalName}</app>

To generate an exploded war use goal war:exploded.