grails / gorm-hibernate5

GORM for Hibernate 5
Apache License 2.0
62 stars 68 forks source link

7.1.0.M3 Release is not published #251

Closed arixmkii closed 3 years ago

arixmkii commented 3 years ago

So, all builds with Grails 4.1.0.M3 will fail with

> Could not resolve all artifacts for configuration ':classpath'.
   > Could not resolve org.grails.plugins:hibernate5:7.1.0.M3.
     Required by:
         project :
      > Could not resolve org.grails.plugins:hibernate5:7.1.0.M3.
transentia commented 3 years ago

Can confirm.

Downloaded grails-4.1.0.M3.zip, then:

PS C:\Users\Bob\Desktop\grails-4.1.0.M3\bin> & .\grails.bat create-app fred
| Application created at C:\Users\Bob\Desktop\grails-4.1.0.M3\bin\fred
PS C:\Users\Bob\Desktop\grails-4.1.0.M3\bin> cd fred
PS C:\Users\Bob\Desktop\grails-4.1.0.M3\bin\fred> & .\grailsw.bat run-app
| Resolving Dependencies. Please wait...

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'fred'.
> Could not resolve all files for configuration ':runtimeClasspath'.
   > Could not resolve org.grails.plugins:hibernate5:7.1.0.M3.
     Required by:
         project :
      > Could not resolve org.grails.plugins:hibernate5:7.1.0.M3.
         > Could not get resource 'https://oss.jfrog.org/oss-snapshot-local/org/grails/plugins/hibernate5/7.1.0.M3/hibernate5-7.1.0.M3.pom'.
            > Could not GET 'https://oss.jfrog.org/oss-snapshot-local/org/grails/plugins/hibernate5/7.1.0.M3/hibernate5-7.1.0.M3.pom'. Received status code 409 from server:

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

CONFIGURE FAILED in 16s
| Error Error initializing classpath: Could not GET 'https://oss.jfrog.org/oss-snapshot-local/org/grails/plugins/hibernate5/7.1.0.M3/hibernate5-7.1.0.M3.pom'. Received status code 409 from server:  (Use --stacktrace to see the full trace)
PS C:\Users\Bob\Desktop\grails-4.1.0.M3\bin\fred>

Looked around jfrog, didn't find the requisite files.

puneetbehl commented 3 years ago

Yes, the version 7.1.0.M3 was not released earlier due to some issues. But, it should be fixed now.

arixmkii commented 3 years ago

@puneetbehl Something is wrong with the build I think

> Could not resolve all artifacts for configuration ':classpath'.
   > Could not find io.micronaut:micronaut-inject-groovy:.
     Required by:
         project : > org.grails.plugins:hibernate5:7.1.0.M3

It can't understand which version of micronaut-inject-groovy to take.

puneetbehl commented 3 years ago

Please share a sample application. I am able to resolve the correct version. See the following output:

testapp $ ./grailsw --version
| Grails Version: 4.1.0.M3
| JVM Version: 11.0.9.1
testapp $ ./gradlew -q dependencyInsight --configuration compileClasspath --dependency micronaut-inject-groovy
io.micronaut:micronaut-inject-groovy:2.2.1 (selected by rule)
   variant "apiElements" [
      org.gradle.category            = library
      org.gradle.dependency.bundling = external
      org.gradle.jvm.version         = 8 (compatible with: 11)
      org.gradle.libraryelements     = jar (compatible with: classes+resources)
      org.gradle.usage               = java-api
      org.gradle.status              = release (not requested)
   ]

io.micronaut:micronaut-inject-groovy -> 2.2.1
\--- compileClasspath

A web-based, searchable dependency report is available by adding the --scan option.
puneetbehl commented 3 years ago

The reason you noticed the error earlier was because Grails 4.1.0.M3 is released with BOM point to GORM Hibernate5 7.1.0.M3 which was not released earlier.

Please note that the same error would happen with GORM MongoDB and Neo4j. I am in process of releasing the same.

arixmkii commented 3 years ago

I will check the app and if I can reproduce it with any reasonable sample. Thank you for your work.

puneetbehl commented 3 years ago

Here is a sample application

https://github.com/puneetbehl/testapp-4.1.0.M3/

arixmkii commented 3 years ago

@puneetbehl I checked your app. You have M2 in classpath here https://github.com/puneetbehl/testapp-4.1.0.M3/blob/main/build.gradle#L8

If you change it to M3, you will get the same error I have.

transentia commented 3 years ago

In my real project, I found I could completely remove:

    classpath "org.grails.plugins:hibernate5:7.1.0.M2"

from the buildscript.dependencies section with no effect on the project. Can't see why the build needs this(?)

Otherwise, M3 is working for me. Thanks.

puneetbehl commented 3 years ago

The classpath section is there for the Gradle scrips like schemaExport. I found the problem and will push a fix soon. Meanwhile, I created another issue (#253) to track the problem with 7.1.0.M3 in the classpath.

Thanks!