grails-profiles / base

3 stars 12 forks source link

Grails 7: Error running domain-class in no package #112

Closed arjangch closed 1 month ago

arjangch commented 2 months ago

Description I can create a domain-calss without being in a package. However grails 7 creates a package named @artifact.package.path@ and placess class file in there. And when i run grails it return error.

Steps to Reproduce Create a domain-class without package ./grailsw create-domain-class Myemployee Then run ./gradlew bootRun

Expected Behaviour This works in Grails 5 and 6 but not in grails 7

Actual Behaviour it returns error message /grails-app/domain/@artifact.package.path@/Myemployee.groovy: 1: Unexpected input: '@artifact.package' @ line 1, column 11.

Environment Information Operating System: Mac OS Grails Version: 7 JDK Version: 22.0.2

codeconsole commented 1 month ago

You need

grails:
    codegen:
        defaultPackage: website

in application.yml

jamesfredley commented 1 month ago

This will need to get fixed on https://github.com/grails/grails-forge

jamesfredley commented 1 month ago

Moved this issue over to https://github.com/grails/grails-forge/issues/374