I am using griffon 2.7.0
Most of our classes are written in groovy
I compile the project with the groovy-eclipse compiler
I use maven
Classes annotated with @ArtifactProviderFor and @ServiceProviderFor are not getting metadata written to files in the META-INF directory, and I do not understand why.
I can see classes such as org.kordamp.gipsy.transform.service.ServicePersistence writing the metadata files to a temp location, but ultimately those files do not appear in META-INF.
Does anyone have any ideas why this is not happening?
Possibly related question: my ApplicationModule class is not found by DefaultApplicationBootstrapper.loadModules() even though it is properly annotated. Do the metadata files play a role in finding modules?
ØIs annotation processing configured as explained at …
Yes. I am using IntelliJ, and I have annotation processing configured as in the tutorial
I have discovered that projects compiled with the groovy-eclipse compiler will not create the metadata files in the maven target/classes directory. Instead, they are
written to a temp directory. So, based on what I saw in the source code for class org.kordamp.gipsy.transform.AbstractFilePersistence, I am setting the following system property: org.kordamp.gipsy.DEFAULT_TARGET_DIR. I am using properties-maven-plugin to do so:
I don’t understand why my choice of compiler would have this effect, but when I switched the compiler used by one of the griffon sample projects from gmaven to groovy-eclipse,
I got the same result.
Also, fyi, regarding my additional question concerning the discovery of my ApplicationModule class, once I got the metadata files written to the correct directory the
ApplicationModule was able to be found.
This e-mail, including attachments, may include confidential and/or
proprietary information, and may be used only by the person or entity
to which it is addressed. If the reader of this e-mail is not the intended
recipient or his or her authorized agent, the reader is hereby notified
that any dissemination, distribution or copying of this e-mail is
prohibited. If you have received this e-mail in error, please notify the
sender by replying to this message and delete this e-mail immediately.
OK. Good to know you were able to get one step ahead.
I'm curious, what benefits do you get from using the groovy-compiler with Intellij/Maven? AFAIK this version of the compiler is a couple of versions behind the standard Groovy compiler.
Also, the automatic generation of metadata files using Jipsy and griffon-core-compiler transformations is optional. you can generate those files manually and place them in the right location; please do this if the tools refuse to work once more.
Seehttp://griffon-framework.org/tutorials/6_minimalistic_build.html for more info on a simplified build.