-
-
Notifications
You must be signed in to change notification settings - Fork 8.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Web fragments (attempt #2) #10227
base: master
Are you sure you want to change the base?
Web fragments (attempt #2) #10227
Conversation
…` under core (jenkinsci#10185)" (jenkinsci#10225) This reverts commit 6109053.
* Remove core classes from extra classpath, as when running `mvn -pl war jetty:run` it automatically gets added.
<!-- Allows resources to be reloaded, and enable nicer console logging. --> | ||
<extraClasspath>${project.basedir}/../core/src/main/resources,${project.basedir}/../core/target/classes,${project.build.directory}/support-log-formatter.jar</extraClasspath> | ||
<!-- Enable nicer console logging. --> | ||
<extraClasspath>${project.build.directory}/support-log-formatter.jar</extraClasspath> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While investigating some warnings during the startup, I realised that the jetty-maven-plugin already include core classes and resources from the module itself and not from the local maven repository (as long as mvn -pl war jetty:run
is used).
Which means these extra classpath entries shouldn't be necessary to get live updates through hot reload.
Unfortunately, hot reload currently fails with
java.nio.file.ClosedFileSystemException
at jdk.nio.zipfs.ZipFileSystem.ensureOpen (ZipFileSystem.java:1635)
at jdk.nio.zipfs.ZipFileSystem.exists (ZipFileSystem.java:657)
at jdk.nio.zipfs.ZipPath.exists (ZipPath.java:905)
at jdk.nio.zipfs.ZipFileSystemProvider.exists (ZipFileSystemProvider.java:197)
at java.nio.file.Files.exists (Files.java:2515)
at org.eclipse.jetty.util.resource.PathResource.exists (PathResource.java:187)
at org.eclipse.jetty.ee9.webapp.WebAppClassLoader.addClassPath (WebAppClassLoader.java:225)
at org.eclipse.jetty.ee9.webapp.WebAppClassLoader.<init> (WebAppClassLoader.java:192)
at org.eclipse.jetty.ee9.webapp.WebAppContext.configureClassLoader (WebAppContext.java:504)
at org.eclipse.jetty.ee9.webapp.WebAppContext.preConfigure (WebAppContext.java:477)
at org.eclipse.jetty.ee9.webapp.WebAppContext.doStart (WebAppContext.java:527)
at org.eclipse.jetty.ee9.maven.plugin.MavenWebAppContext.doStart (MavenWebAppContext.java:313)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start (AbstractLifeCycle.java:93)
at org.eclipse.jetty.ee9.maven.plugin.JettyEmbedder.redeployWebApp (JettyEmbedder.java:64)
at org.eclipse.jetty.ee9.maven.plugin.JettyRunMojo.restartWebApp (JettyRunMojo.java:362)
at org.eclipse.jetty.ee9.maven.plugin.JettyRunMojo$2.consoleEvent (JettyRunMojo.java:198)
at org.eclipse.jetty.maven.ConsoleReader.signalEvent (ConsoleReader.java:64)
at org.eclipse.jetty.maven.ConsoleReader.run (ConsoleReader.java:57)
at java.lang.Thread.run (Thread.java:1583)
that seems to be caused by a JDK bug? (see jetty/jetty.project#11548)
web.xml
toweb-fragment.xml
under core ([JENKINS-75174] Move existingweb.xml
toweb-fragment.xml
under core #10185)" (Revert "[JENKINS-75174] Move existingweb.xml
toweb-fragment.xml
under core (#10185)" #10225)Tested with
mvn -pl war jetty:run
.For running plugins with
mvn hpi:run
, jenkinsci/maven-hpi-plugin#710 is necessary and should be referred through the plugin parent pom before this gets merged.See JENKINS-XXXXX.
Testing done
Proposed changelog entries
Proposed upgrade guidelines
N/A
Submitter checklist
Desired reviewers
@mention
Before the changes are marked as
ready-for-merge
:Maintainer checklist