OpenAPITools / sbt-openapi-generator

Other
26 stars 34 forks source link

Getting an error when trying to run the `simple` project #42

Open congwenma opened 2 years ago

congwenma commented 2 years ago

sbt [info] welcome to sbt 1.6.2 (Amazon.com Inc. Java 18.0.1) [info] loading global plugins from /Users/myuser/.sbt/1.0/plugins java.lang.Exception: The system property 'plugin.version' is not defined. at $09e901f3bb9bfda1e449$.$sbtdef(/Users/myuser/dev/sandbox/sbt-openapi-generator/src/sbt-test/sbt-openapi-generator/simple/project/plugin.sbt:7) at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104) at java.base/java.lang.reflect.Method.invoke(Method.java:577) at sbt.compiler.Eval$.getValue(Eval.scala:601) at sbt.compiler.Eval.$anonfun$eval$1(Eval.scala:133) at sbt.internal.EvaluateConfigurations$.$anonfun$evaluateDslEntry$1(EvaluateConfigurations.scala:249) at sbt.internal.EvaluateConfigurations$.$anonfun$evaluateSbtFile$6(EvaluateConfigurations.scala:172) at scala.collection.immutable.List.map(List.scala:297) at sbt.internal.EvaluateConfigurations$.$anonfun$evaluateSbtFile$4(EvaluateConfigurations.scala:172) at sbt.internal.Load$.loadSettingsFile$1(Load.scala:1121) at sbt.internal.Load$.$anonfun$discoverProjects$2(Load.scala:1130) at scala.collection.MapLike.getOrElse(MapLike.scala:131) at scala.collection.MapLike.getOrElse$(MapLike.scala:129) at scala.collection.AbstractMap.getOrElse(Map.scala:65)

wing328 commented 2 years ago

Sorry no idea. You may want to try a different java version (e.g. JDK 11)

Moromir commented 5 months ago

Hello, any news on this ? (I got the same issue with JDK 11.)

wing328 commented 5 months ago

would https://stackoverflow.com/questions/53713255/test-sbt-plugin help?

Moromir commented 5 months ago

Thx for your fast reply. The StackOverflow post helped me to figure out a solution. (I'm on Linux as well.)

What I did was simply commenting the exception and hardcoding the version: // throw new Exception("The system property 'plugin.version' is not defined.") addSbtPlugin("org.openapitools" % "sbt-openapi-generator" % "7.5.0")