1

Very very basic question. Is there a way to specify the package (when doing shiro-quick-start) where to place ShiroUser and ShiroRole classes at? By default they are placed at grails-app/domain/ and I want them at /grails-app/domain/com/bla/bla. Netbeans' refactoring tool is useless when trying to move those classes.

Thanks.

z-index
  • 409
  • 8
  • 14

2 Answers2

1

Well it doesn't seem possible to have it out of the box.

You might have a temporary solution that consists in:

  1. Install shiro plugin as an inplace plugin (see here) : Uninstall shiro plugin, download shiro plugin zip file and unzip it under MyProject/. . Then modify BuildConfig.groovy file and add grails.plugin.location.'shiro' = "shiro"
  2. Modifying _ShiroInternal.groovy script from shiro/scripts folder and especially line having code def artefactPath = "grails-app/domain". Here you can append a argsMap['package'] if it was specified by user command parameters
  3. Submit your patch (after test) to the plugin source code. This way you will contribute back to the community and to this amazing plugin AND you will get benefit to have your patch included in the next release (and remove the inplace plugin setup)
fabien7474
  • 16,300
  • 22
  • 96
  • 124
  • Thanks Fabien, I couldn't do the fix you suggested yet, but I consider to do it as soon as I get some things working and a bit more confortable with grails. – z-index Aug 03 '11 at 15:50
1

I think the answer to do this is:

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

I hope that helps...

plugin description and installation

mpccolorado
  • 817
  • 8
  • 16
  • Hi mpccolorado! Thanks for your answer, it seems the plugin has been updated or I didn't noticed --prefix :) I will try it. – z-index Jan 24 '13 at 16:56