Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jetty-users] jetty-maven-plugin, war overlay and hot redeploy

Hi guys,

I'm trying to evaluate jetty for rapid development or project which is currently running on tomcat. My configuration looks like 

            <plugin>
                <groupId>org.eclipse.jetty</groupId>
                <artifactId>jetty-maven-plugin</artifactId>
                <version>9.2.3.v20140905</version>
                <configuration>
                    <scanIntervalSeconds>3</scanIntervalSeconds>
                    <webApp>
                        <descriptor>${project.build.directory}/${project.build.finalName}/WEB-INF/web.xml</descriptor>
                        <resourceBases>
                            <directory>${basedir}/src/main/webapp</directory>
                            <directory>${basedir}/../SharedWeb/src/main/webapp</directory>
                        </resourceBases>
                        <allowDuplicateFragmentNames>true</allowDuplicateFragmentNames>
                        <contextPath>/test</contextPath>
                    </webApp>
                </configuration>
            </plugin>

I have main war depending on SharedWeb war via war overlay mechanism. I specify resourceBases for both maven projects so changes in resources are scanned automatically and reloaded on the fly and all working fine. Also when I compile classes in main war, jetty restarts automatically, reloading the latest changes. But when I try to change any class in SharedWeb project and compile it, the class is not reloaded. I'm just wondering if there is a way to make embed jetty to reload classes from SharedWeb automatically? I understand that jetty-maven-plugin uses SharedWeb war from local maven repository, so I need to install SharedWeb artifact before I can see any changes. So I don't have high expectations, but maybe I'm missing something.

Thanks.

--
Kind regards,
Ivan

Back to the top