Since Grails has full integration with Java, you can use any Java library for this purpose. I Googled it, and I got that answer Java Library for Brazilian Electronic Invoice (Nfe)
There are several alternatives. The easiest way for you to incorporate them into your project is to see if they are available in some Maven repository, and then include them in your Grails project using Buildconfig.groovy (Grails 2) or build.Radle (Grails 3).
I haven’t worked yet with electronic invoice, so I can’t tell you which of the options available in the link above is the most appropriate. I also found this repository, has been updated frequently, so it is also worth taking a look: https://github.com/Samuel-Oliveira/Java_NFe
It is already available in a Maven repository, so it will be easy for you to put in your project. If you have any questions about how to incorporate a library into the Grails project, ask me here to help you, I just need to know what version of Grails you’re using. Hugs.
Thanks @Bruno for the reply. I had already seen the jNFE, Jenifer and Caelum-Stella libraries. These projects stopped in version 2.0 of Nfe, today we are in version 3.10 and has already been released version 4.0 in the Sefaz homologation environment. This repository really is up to date: https://github.com/Samuel-Oliveira/Java_NFe I also found this other: https://github.com/wmixvideo/nfe
– Reinaldo
if you can help me I appreciate it. I am using version 2.5.3 of Grails.
– Reinaldo
To add a dependency on Grails 3.X. X, you have to add dependencies to the build.Radle block like this: Compile "com.github.wmixvideo:nfe:2.0.2" Ai will already have access to the link library you commented on. In the case of accessing the Java_nfe library, you will need to add two lines. The first is the repository, inside the repositories: Maven { url "http://www.autocomsistemas.com.br:8081/Nexus/content/repositories/Autocom/" } Then the library, similar to the previous (dependencies block): Compile "br.com.samuelweb:java-nfe:3.10.8"
– Bruno
I ran a test on Grails 3.3.0 as @Bruno mentioned. No build.Gradle added the line with the repository: Maven { url "http://www.autocomsistemas.com.br:8081/Nexus/content/repositories/Autocom/" In dependencies, I added the line: Compile "br.com.samuelweb:java-nfe:3.10.8" - I did a Sefaz RJ Status test, it worked!
– Reinaldo