ShiroUser Grails Package Specification

Very simple question. Is there a way to specify the package (on quick start) where to place the ShiroUser and ShiroRole classes? By default, they are hosted in grails-app / domain /, and I want them in / grails -app / domain / com / bla / bla. Netbeans refactoring tool is useless when trying to move these classes.

Thanks.

+1
source share
2 answers

Well, it seems like it's impossible to do out of the box.

You may have a workaround consisting of:

  • Install the siro plugin as the inplace plugin (see here ): Uninstall the siro plugin, download the zip file of the zip plugin and unzip it under MyProject/. . Then modify the BuildConfig.groovy file and add grails.plugin.location.'shiro' = "shiro"
  • Modification of _ShiroInternal.groovy script from the shiro/scripts folder and especially the line with the code def artefactPath = "grails-app/domain" . Here you can add argsMap['package'] if it was specified by the parameters of user commands
  • Submit your patch (after the test) to the source code of the plugin . Thus, you will contribute to the community and this amazing plugin. And you will get the advantage that your patch is included in the next version (and remove the inplace plugin setting).
+1
source

I think the answer to this is:

 grails shiro-quick-start **--prefix=org.example.mypackage.** 

I hope this helps ...

plugin description and installation

+1
source

All Articles