Skip to content

Move EE test resources to jetty-core/jetty-ee/jetty-ee-test-resources #13154

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

Open
wants to merge 17 commits into
base: jetty-12.1.x
Choose a base branch
from

Conversation

gregw
Copy link
Contributor

@gregw gregw commented May 19, 2025

renamed jetty-ee to jetty-ee/jetty-ee-webapp
create jetty-ee/jetty-ee-test-resources

renamed jetty-ee to jetty-ee/jetty-ee-webapp
create jetty-ee/jetty-ee-test-resources
@gregw gregw requested review from janbartel and olamy May 19, 2025 21:43
@joakime
Copy link
Contributor

joakime commented May 19, 2025

Going to move the recent common annotations stuff to this new tree too?

@gregw
Copy link
Contributor Author

gregw commented May 19, 2025

Going to move the recent common annotations stuff to this new tree too?

The jetty-annotations module is not really ee related. It is a stand alone util and could be used with anything that parses annotations.

@gregw
Copy link
Contributor Author

gregw commented May 26, 2025

@janbartel @olamy oh please please please review this quickly. It has taken me 2 weeks to get a clean build, so please review before it breaks again :)

@@ -1,60 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting change.
Wonder if we should update the rest of the poms to match this new XSD location?

@olamy what's the recommended location now?

Copy link
Member

@olamy olamy May 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yup that's correct but better using https https://maven.apache.org/xsd/maven-4.0.0.xsd

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll leave this as is (intellij did it) and we can change them all in another PR and also see if we can make IDEA do https

Copy link
Contributor

@joakime joakime left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lots of good changes here.
My comments are mostly things that can be done in a followup PR (if they sound like a good idea).

@@ -183,7 +183,7 @@ public void websocketProvidedByServer() throws Exception
assertThat(response.getStatus(), is(HttpStatus.OK_200));

// The ContextClassLoader in the WebSocketClients onOpen was the WebAppClassloader.
assertThat(response.getContentAsString(), containsString("ContextClassLoader: oeje.WebAppClassLoader"));
assertThat(response.getContentAsString(), containsString("ContextClassLoader: oejew.WebAppClassLoader"));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couldn't these kinds of assertions be changed to use TypeUtil to avoid this kind of change?

Suggested change
assertThat(response.getContentAsString(), containsString("ContextClassLoader: oejew.WebAppClassLoader"));
assertThat(response.getContentAsString(), containsString("ContextClassLoader: " + TypeUtil.toShortName(WebAppClassLoader.class));

<argLine>@{argLine} ${jetty.surefire.argLine} --add-reads org.eclipse.jetty.ee.webapp=org.eclipse.jetty.logging</argLine>
<excludes>
<!-- This class modifies internal JVM statics, and causes problems in parallel testing -->
<exclude>org.eclipse.jetty.ee.webapp.WebAppClassLoaderUrlStreamTest</exclude>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

didn;t work using @Isolated?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the same thing that exists in 12.0.x, in the same technique.

https://github.com/jetty/jetty.project/blob/jetty-12.0.x/jetty-ee10/jetty-ee10-webapp/pom.xml#L99-L101

Can this be improved? Sure, does it need to be fixed here, now, and in this PR? no.

@@ -0,0 +1,3 @@
#!/bin/sh

git diff origin/jetty-12.1.x -- jetty-ee11 | sed -e 's/ee11/ee10/g' -e 's/EE11/EE10/g' | git apply
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do we need this script in git?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The same reason the opposite direction scripts (ee10 to ee11) exist in git.
This isn't a new concept.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whenever merging 12.0.x forward to 12.1.x, the other script has been used to move changes from ee10 to ee11. Now that we are increasingly doing changes directly to ee11, it is good to have the ability to merge the other direction

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

4 participants