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

[Java][jersey2] Add jersey injection dependencies #7240

Merged
merged 1 commit into from
Aug 21, 2020

Conversation

timgclark
Copy link
Contributor

Adds the jersey injection dependency to gradle and sbt to match
the maven dependency.

PR checklist

  • Read the contribution guidelines.
  • Pull Request title clearly describes the work in the pull request and Pull Request description provides details about how to validate the work. Missing information here may result in delayed response from the community.
  • If contributing template-only or documentation-only changes which will change sample output, build the project beforehand.
  • Run the shell script ./bin/generate-samples.shto update all Petstore samples related to your fix. This is important, as CI jobs will verify all generator outputs of your HEAD commit as it would merge with master. These must match the expectations made by your contribution. You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example ./bin/generate-samples.sh bin/configs/java*. For Windows users, please run the script in Git BASH.
  • File the PR against the correct branch: master
  • Copy the technical committee to review the pull request if your PR is targeting a particular programming language.

@timgclark timgclark force-pushed the jersey2_inject_dependencies branch 2 times, most recently from dc43c4b to 2c69293 Compare August 19, 2020 13:59
@timgclark
Copy link
Contributor Author

@wing328 can you please both review this change and confirm whether or not this CI failure is relevant?

@wing328
Copy link
Member

wing328 commented Aug 20, 2020

There are uncommitted changes:

There are uncommitted changes in working tree after execution of 'bin/ensure-up-to-date'
Perform git diff
diff --git a/samples/client/petstore/java/jersey2-java8/build.gradle b/samples/client/petstore/java/jersey2-java8/build.gradle
index ce0818364e..3c54e4331a 100644
--- a/samples/client/petstore/java/jersey2-java8/build.gradle
+++ b/samples/client/petstore/java/jersey2-java8/build.gradle
@@ -107,6 +107,7 @@ dependencies {
     compile "io.swagger:swagger-annotations:$swagger_annotations_version"
     compile "com.google.code.findbugs:jsr305:3.0.2"
     compile "org.glassfish.jersey.core:jersey-client:$jersey_version"
+    compile "org.glassfish.jersey.inject:jersey-hk2:$jersey_version"
     compile "org.glassfish.jersey.media:jersey-media-multipart:$jersey_version"
     compile "org.glassfish.jersey.media:jersey-media-json-jackson:$jersey_version"
     compile "com.fasterxml.jackson.core:jackson-core:$jackson_version"
diff --git a/samples/client/petstore/java/jersey2-java8/build.sbt b/samples/client/petstore/java/jersey2-java8/build.sbt
index 51c48785bf..bc4470d15a 100644
--- a/samples/client/petstore/java/jersey2-java8/build.sbt
+++ b/samples/client/petstore/java/jersey2-java8/build.sbt
@@ -10,9 +10,10 @@ lazy val root = (project in file(".")).
     resolvers += Resolver.mavenLocal,
     libraryDependencies ++= Seq(
       "io.swagger" % "swagger-annotations" % "1.5.22",
-      "org.glassfish.jersey.core" % "jersey-client" % "2.25.1",
-      "org.glassfish.jersey.media" % "jersey-media-multipart" % "2.25.1",
-      "org.glassfish.jersey.media" % "jersey-media-json-jackson" % "2.25.1",
+      "org.glassfish.jersey.core" % "jersey-client" % "2.27",
+      "org.glassfish.jersey.inject" % "jersey-hk2" % "2.27",
+      "org.glassfish.jersey.media" % "jersey-media-multipart" % "2.27",
+      "org.glassfish.jersey.media" % "jersey-media-json-jackson" % "2.27",
       "com.fasterxml.jackson.core" % "jackson-core" % "2.10.4" % "compile",
       "com.fasterxml.jackson.core" % "jackson-annotations" % "2.10.4" % "compile",
       "com.fasterxml.jackson.core" % "jackson-databind" % "2.10.4" % "compile",
Perform git status
On branch pull/7240
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)

	modified:   samples/client/petstore/java/jersey2-java8/build.gradle
	modified:   samples/client/petstore/java/jersey2-java8/build.sbt

no changes added to commit (use "git add" and/or "git commit -a")
Please run 'bin/utils/ensure-up-to-date' locally and commit changes (UNCOMMITTED CHANGES ERROR)

Please update the samples and let me know if you need help on that.

* Adds the jersey injection dependency to gradle and sbt to match
the maven dependency.
* Update jersey version in sbt
@timgclark
Copy link
Contributor Author

"Recompile before running ./bin/generate-samples.sh" 👍

Copy link
Member

@wing328 wing328 left a comment

Choose a reason for hiding this comment

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

LGTM

@wing328 wing328 merged commit cbdedff into OpenAPITools:master Aug 21, 2020
jimschubert added a commit that referenced this pull request Aug 23, 2020
* master: (720 commits)
  [docs] Update README badges (#7276)
  Update apiInvoker.mustache and sample file for akka-scala client for issue #7258 fix (#7259)
  [Dart] Get all enum values in a list (#7166)
  Update .gitattributes
  [ci] Set ubuntu workflow verification to autoclrf=true, safeclrf=false
  Update check-supported-versions.yaml
  [ci] Update gitattributes and allow skipping docs generation for Windows CI workflows (#7273)
  [core][bug] FILES is now path relative with no prefixes (#7271)
  Update check-supported-versions.yaml
  Update check-supported-versions.yaml (#7268)
  [Java][jersey2] Add jersey injection dependencies (#7240)
  [C][Clang Static Analyzer] Remove the useless variable when assembling URL (#7255)
  Date format dart (#6389)
  minor enhancement to java client generator (#7253)
  typescript: Fix Union Types Import Issue (#6789)
  Modifying the es5 and es6 templates for javascript to handle default values (#6649)
  [python-exp] simplify examples (#7157)
  Support for KumuluzEE microprofile runtime (#5944)
  [C#][netcore] minor improvements and bug fixes (#7244)
  Deprecate Flash (ActionScript) client generator (#7231)
  ...
jimschubert added a commit to mohamedelhabib/openapi-generator that referenced this pull request Aug 24, 2020
* master: (219 commits)
  [java] Appropriate instantiation of model with dynamic properties (OpenAPITools#6052)
  [docs] Update README badges (OpenAPITools#7276)
  Update apiInvoker.mustache and sample file for akka-scala client for issue OpenAPITools#7258 fix (OpenAPITools#7259)
  [Dart] Get all enum values in a list (OpenAPITools#7166)
  Update .gitattributes
  [ci] Set ubuntu workflow verification to autoclrf=true, safeclrf=false
  Update check-supported-versions.yaml
  [ci] Update gitattributes and allow skipping docs generation for Windows CI workflows (OpenAPITools#7273)
  [core][bug] FILES is now path relative with no prefixes (OpenAPITools#7271)
  Update check-supported-versions.yaml
  Update check-supported-versions.yaml (OpenAPITools#7268)
  [Java][jersey2] Add jersey injection dependencies (OpenAPITools#7240)
  [C][Clang Static Analyzer] Remove the useless variable when assembling URL (OpenAPITools#7255)
  Date format dart (OpenAPITools#6389)
  minor enhancement to java client generator (OpenAPITools#7253)
  typescript: Fix Union Types Import Issue (OpenAPITools#6789)
  Modifying the es5 and es6 templates for javascript to handle default values (OpenAPITools#6649)
  [python-exp] simplify examples (OpenAPITools#7157)
  Support for KumuluzEE microprofile runtime (OpenAPITools#5944)
  [C#][netcore] minor improvements and bug fixes (OpenAPITools#7244)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants