Skip to content
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

Expose org.eclipse.jetty:jetty-servlet in bom. #651

Merged
merged 2 commits into from
Mar 7, 2024
Merged

Conversation

wetted
Copy link
Contributor

@wetted wetted commented Mar 4, 2024

No description provided.

@@ -48,7 +49,7 @@ kotlin-reflect = { module = 'org.jetbrains.kotlin:kotlin-reflect' }

tomcat-embed-core = { module = 'org.apache.tomcat.embed:tomcat-embed-core', version.ref = 'tomcat' }
undertow-servlet = { module = 'io.undertow:undertow-servlet', version.ref = 'undertow' }
jetty = { module = 'org.eclipse.jetty:jetty-servlet', version.ref = 'jetty' }
managed-jetty = { module = 'org.eclipse.jetty:jetty-servlet', version.ref = 'managed-jetty' }
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need to make this managed?

In the other linked PRs to this one, it's jetty-server not jetty-servlet

So could we just expose the version?

I don't know

Copy link
Contributor

Choose a reason for hiding this comment

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

I think @timyates is right. @wetted change this PR to expose only the version.

Copy link
Contributor

@sdelamo sdelamo left a comment

Choose a reason for hiding this comment

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

I think @timyates is right. @wetted change this PR to expose only the version.

@timyates
Copy link
Contributor

timyates commented Mar 5, 2024

Actually...thinking about it, I'm wrong...

There's no way in aws to hava a catalog entry for jetty-server with the version from here...

@wetted
Copy link
Contributor Author

wetted commented Mar 5, 2024

Actually...thinking about it, I'm wrong...

There's no way in aws to hava a catalog entry for jetty-server with the version from here...

@sdelamo @timyates I think there's enough back and forth here that I don't understand what we should be doing.

@timyates
Copy link
Contributor

timyates commented Mar 6, 2024

@sdelamo @wetted How's this 44d2cf5

So here we expose a version and a BOM for jetty...

We can then (in AWS for example) change the libs.versions.toml thusly:

diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml
index cdc245337..0ce4aa60c 100644
--- a/gradle/libs.versions.toml
+++ b/gradle/libs.versions.toml
@@ -7,7 +7,6 @@ spock = "2.3-groovy-4.0"

 bouncycastle = '1.70'
 fileupload = '0.0.6'
-jetty = '11.0.20'
 logback-json-classic = '0.1.5'

 micronaut-discovery = "4.2.0"
@@ -88,7 +87,7 @@ bouncycastle-provider = { module = 'org.bouncycastle:bcprov-jdk15on', version.re
 fileupload = { module = 'org.javadelight:delight-fileupload', version.ref = 'fileupload' }
 graal-sdk = { module = 'org.graalvm.sdk:graal-sdk', version.ref = 'graal' }
 jackson-afterburner = { module = 'com.fasterxml.jackson.module:jackson-module-afterburner' }
-jetty-server = { module = 'org.eclipse.jetty:jetty-server', version.ref = 'jetty' }
+jetty-server = { module = 'org.eclipse.jetty:jetty-server' }
 jcl-over-slf4j = { module = 'org.slf4j:jcl-over-slf4j', version.ref = 'slf4j' }
 junit-jupiter-engine = { module = 'org.junit.jupiter:junit-jupiter-engine' }
 junit-jupiter-api = { module = 'org.junit.jupiter:junit-jupiter-api' }

(so we don't declare a Jetty version in there), and then we would need to update the build files with platform dependencies

diff --git a/function-aws-api-proxy-test/build.gradle.kts b/function-aws-api-proxy-test/build.gradle.kts
index 05ef65887..1432c7bef 100644
--- a/function-aws-api-proxy-test/build.gradle.kts
+++ b/function-aws-api-proxy-test/build.gradle.kts
@@ -5,6 +5,7 @@ plugins {
 dependencies {
     api(mn.micronaut.http.server)
     api(projects.micronautFunctionAwsApiProxy)
+    implementation(platform(mnServlet.boms.jetty))
     implementation(libs.jetty.server)
     testImplementation(mn.micronaut.http.client)
     testImplementation(mn.micronaut.jackson.databind)

I think this is where we wanted to end up?

Copy link

sonarqubecloud bot commented Mar 6, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

@wetted wetted requested a review from sdelamo March 6, 2024 15:12
@wetted
Copy link
Contributor Author

wetted commented Mar 6, 2024

@sdelamo @wetted How's this 44d2cf5

So here we expose a version and a BOM for jetty...

We can then (in AWS for example) change the libs.versions.toml thusly:
...

I think this is where we wanted to end up?

Yeah, I think that looks good. Thanks.

@sdelamo sdelamo merged commit 1c409fb into master Mar 7, 2024
15 checks passed
@sdelamo sdelamo deleted the managed-jetty branch March 7, 2024 15:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
relates-to: build label for issues related to the build file or CI
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants