playframework / play-ebean

Play Ebean module
Apache License 2.0
102 stars 69 forks source link

support for sbt 1.4x #208

Closed petahathub closed 2 years ago

petahathub commented 3 years ago

Hi,

I post an issue in payitech fork of play-ebean, but probably it would be good to let you know about it too:

https://github.com/payintech/play-ebean/issues/14

Flo354 commented 3 years ago

Hello there,

This is a duplicate of: https://github.com/playframework/play-ebean/issues/201 Which was fixed with this PR: https://github.com/playframework/play-ebean/pull/203

felipebonezi commented 3 years ago

hey guys, how can I download the 6.1.0 version from maven?

petahathub commented 3 years ago

hey guys, how can I download the 6.1.0 version from maven?

I would try https://mvnrepository.com/artifact/com.typesafe.play/play-ebean -->

<dependency>
    <groupId>com.typesafe.play</groupId>
    <artifactId>play-ebean_2.13</artifactId>
    <version>6.1.0-RC2</version>
</dependency>
almothafar commented 3 years ago

@petahathub in sbt that does not work

mkurz commented 3 years ago

@almothafar You need to add

addSbtPlugin("com.typesafe.sbt" % "sbt-play-ebean" % "6.1.0-RC2")

to your project/plugins.sbt Maybe you also need to add

resolvers += Resolver.bintrayRepo("playframework", "maven")
resolvers += Resolver.bintrayRepo("playframework", "sbt-plugin-releases")

but I think that isn't necessary, not sure however

jmswenski commented 3 years ago

Made a PR to address the 1.4.x compatibility issues. 1.4.x introduced some breaking changes in the way that the incremental compiler tracks modifications to files and that figures into plugins that use those APIs to do further modifications on sources / binaries such as this one does with ebean enhancement. Hopefully we can get that merged in after we resolve the mess that Bintray made and get this project building into Sonatype.

almothafar commented 3 years ago

To be honest I'm so hopeless now for this useless plugin and hopeless to continue with sbt and play framework, the worst platform/framework that I dealt with in my whole career.

Flo354 commented 3 years ago

@almothafar you can't say that.

It is true that Play! Framework is not really updated anymore. It is true that this plugin is now abandoned by the team. But Play! Framework does the job and does it good.

I am just wondering for the future if Play! Framework will follow Play Ebean and be abandonned.

almothafar commented 3 years ago

@Flo354 for now yes, I agree with you, but Play framework recently is not so active as what it is used for, which is not the problem, I love Play framework itself, but if I can't use my libraries because of the mix of scala, sbt issues with other plugins and these breaking changes, I have 2 options, stay a few years behind or just abandoned Play framework ship for good.

I'm just really upset with how slow things are going on, yes I know it is based on contribution, I would love to contribute but I don't know scala, and my manager does not allow me to use my time to contribute to anything.

What made me take about this is the number of issues here like bintray is gone (and people fixed this issue after a critical issue happened even the sunset announced a long time ago), so I tried to use sonatype, even with this existing in sonatype but sbt can't resolve it, InteilliJ IDEA keep stuck because of this issue as sbt stuck somewhere of that error, so I have to restart IDE like 10 times last 30 minutes.

I tried resolvers += Resolver.sonatypeRepo("snapshots") and addSbtPlugin("com.typesafe.sbt" % "sbt-play-ebean" % "6.1.0-RC3") or addSbtPlugin("com.typesafe.play" % "play-ebean" % "6.1.0-RC3") or addSbtPlugin("com.typesafe.play" % "play-ebean_2.13" % "6.1.0-RC3") while it is here: https://oss.sonatype.org/content/repositories/snapshots/com/typesafe/play/play-ebean_2.13/

it just keeps failing and don't see it, errors like:

[error] (update) sbt.librarymanagement.ResolveException: Error downloading com.typesafe.play:play-ebean_2.13;sbtVersion=1.0;scalaVersion=2.12:6.1.0-RC3
[error]   Not found
[error]   Not found
[error]   not found: https://repo1.maven.org/maven2/com/typesafe/play/play-ebean_2.13_2.12_1.0/6.1.0-RC3/play-ebean_2.13-6.1.0-RC3.pom
[error]   not found: C:\Users\AlMothafar\.ivy2\local\com.typesafe.play\play-ebean_2.13\scala_2.12\sbt_1.0\6.1.0-RC3\ivys\ivy.xml
[error]   not found: https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/com.typesafe.play/play-ebean_2.13/scala_2.12/sbt_1.0/6.1.0-RC3/ivys/ivy.xml
[error]   not found: https://repo.typesafe.com/typesafe/ivy-releases/com.typesafe.play/play-ebean_2.13/scala_2.12/sbt_1.0/6.1.0-RC3/ivys/ivy.xml

also issues like #212 (before bintray go down, I converted my .properties file to .yaml and ebean accepted it so I wanted to give this a try but I ended up just wasting hours now)

Maybe I'm not correctly set configuration but there is no documentation either #211.

And even seems PayinTech (ebean sponsor for https://ebean.io/) abandoned play or ebean or both https://github.com/payintech/play-ebean/issues

lapidus79 commented 3 years ago

Made a PR to address the 1.4.x compatibility issues. 1.4.x introduced some breaking changes in the way that the incremental compiler tracks modifications to files and that figures into plugins that use those APIs to do further modifications on sources / binaries such as this one does with ebean enhancement. Hopefully we can get that merged in after we resolve the mess that Bintray made and get this project building into Sonatype.

I tried picking this code and seems to be working like a charm. Released it separately at https://github.com/lapidus79/play-ebean and published to maven with addSbtPlugin("io.github.lapidus79" % "sbt-play-ebean" % "6.2.2"). Try it out at own risk.

Hopefully the play-ebean publish flow can be fixed soon.

leccyril commented 3 years ago

Hello,

bintray was decommissionned... we are using play 2.8.2 and sbt-ebean 5.0.0 on which repo have to point ?

almothafar commented 3 years ago

I see version 6.2.0 is there in sonatype: https://oss.sonatype.org/content/repositories/snapshots/com/typesafe/play/play-ebean_2.13/

But still can't import that:

[warn] Unrecognized repository Scala Plugin Bundled Repository, ignoring it
[warn]
[warn]  Note: Some unresolved dependencies have extra attributes.  Check that these dependencies exist with the requested attributes.

[warn]          com.typesafe.play:play-ebean:6.2.0 (sbtVersion=1.0, scalaVersion=2.12)
[warn]
[warn]  Note: Unresolved dependencies path:
[error] stack trace is suppressed; run 'last update' for the full output
[error] (update) sbt.librarymanagement.ResolveException: Error downloading com.typesafe.play:play-ebean;sbtVersion=1.0;scalaVersion=2.12:6.2.0
[error]   Not found
[error]   Not found
[error]   not found: https://repo1.maven.org/maven2/com/typesafe/play/play-ebean_2.12_1.0/6.2.0/play-ebean-6.2.0.pom
[error]   not found: C:\Users\AlMothafar\.ivy2\local\com.typesafe.play\play-ebean\scala_2.12\sbt_1.0\6.2.0\ivys\ivy.xml
[error]   not found: https://oss.sonatype.org/content/repositories/snapshots/com/typesafe/play/play-ebean_2.12_1.0/6.2.0/play-ebean-6.2.0.pom
[error]   not found: https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/com.typesafe.play/play-ebean/scala_2.12/sbt_1.0/6.2.0/ivys/ivy.xml
[error]   not found: https://repo.typesafe.com/typesafe/ivy-releases/com.typesafe.play/play-ebean/scala_2.12/sbt_1.0/6.2.0/ivys/ivy.xml
Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore?
[info] welcome to sbt 1.3.13 (AdoptOpenJDK Java 11.0.5)

I got the following in my plugins.bt:

resolvers += Resolver.sonatypeRepo("snapshots")
addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.8.8")
addSbtPlugin("com.typesafe.play" % "play-ebean" % "6.2.0")

Just a note, why it is trying to get play-ebean_2.12_1.0 while I got sbt.version=1.3.13 and scalaVersion := "2.13.6", and why you don't publish to central mvn anymore? the last version is only 6.0.0 here: https://mvnrepository.com/artifact/com.typesafe.play/play-ebean

JamesWilson3 commented 3 years ago

Hi I am having the same problem and question as @almothafar with pointing to the latest / snapshot version of the eBean, and my IntelliJ also gets stuck trying to point it to Sonatype.

What is the official steps for pointing to the latest plugin properly? Is it possible to publish the plugin to maven as well?

Thank you in advance.

GithubUser8080 commented 3 years ago

@JamesWilson3 @almothafar Hi, did you happen to find any answer to these issues? Thanks

almothafar commented 3 years ago

@JamesWilson3 @almothafar Hi, did you happen to find any answer to these issues? Thanks

No, and no one responded and I don't think anybody will answer.

leccyril commented 3 years ago

Hello, SBT and ebean etc have to be retrieve on new repository jfrog

GithubUser8080 commented 3 years ago

Hello, SBT and ebean etc have to be retrieve on new repository jfrog

@leccyril Unfortunately only 6.0.0 exists there. 6.0.1 is still a release candidate, although in the README.md it is listed as a normal version

almothafar commented 3 years ago

Hello, SBT and ebean etc have to be retrieve on new repository jfrog

@leccyril Unfortunately only 6.0.0 exists there. 6.0.1 is still a release candidate, although in the README.md it is listed as a normal version

There is also 6.2.0 in Sonatype https://oss.sonatype.org/content/repositories/snapshots/com/typesafe/play/play-ebean_2.13/ but as I mentioned above, I was unable to get it

GithubUser8080 commented 3 years ago

I see, thanks. Looks like i have to use the com.payintech fork until this project is alive again. The ebean version in 6.0.0 is 2 years old

Flo354 commented 3 years ago

Repo from @lapidus79 works... But we can't rely on a single person for this. Why isn't it available officially?

lapidus79 commented 3 years ago

To my understanding the ci/cd / publishing pipeline is broken and nobody knows how to fix this

almothafar commented 3 years ago

I see, thanks. Looks like i have to use the com.payintech fork until this project is alive again. The ebean version in 6.0.0 is 2 years old

You can update ebean without the need to wait for plugin to be updated, I got something like:

val oldPlayEbeanDependencies: Seq[sbt.ModuleID] =
  Seq(
    "javax.xml.bind" % "jaxb-api" % "2.3.1",
    "javax.activation" % "activation" % "1.1.1",
    "org.glassfish.jaxb" % "jaxb-runtime" % "2.3.5"
  )

val ebeanDependencies: Seq[sbt.ModuleID] =
  Seq(
    "io.ebean" % "ebean" % "12.12.0",
    "io.ebean" % "ebean-agent" % "12.12.0",
    "io.ebean" % "ebean-ddl-generator" % "12.12.0",
    "io.ebean" % "ebean-migration" % "12.12.1"
  )

libraryDependencies ++= Seq(
  guice,
  javaJdbc,
  javaWs,
  caffeine,
  filters,
  "com.typesafe.play" %% "play-json" % "2.9.2",
... etc
) ++ ebeanDependencies ++ oldPlayEbeanDependencies

if you wonder what oldPlayEbeanDependencies is about, try to remove it to see if it is going to work with you or not, I'm using these lines with com.payintech fork, not with this official play one.

mkurz commented 2 years ago

Hi everyone, I am happy to chip in and fix play-ebean, however that won't happen in december. If you want to support me, please consider donating to our collective: https://www.playframework.com/sponsors

mkurz commented 2 years ago

play-ebean 6.2.0-RC4 released, please have a look at the release notes how to upgrade: https://github.com/playframework/play-ebean/releases/tag/6.2.0-RC4. Please test and let us know if it works for you, thanks!