-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Please provide multiple jars #62
Comments
Andi, Thank you for this. Actually we had an extra JAR file that just contained the annotation types when PB was built with Ant. Do you know how to tell Maven to create that archive also? |
Sorry, I don't know maven well enough ... |
I found some description about how to create additional JAR files with a subset of classes at http://stackoverflow.com/questions/8209132/can-maven-assembly-plugin-picking-the-specify-java-package/8209544#8209544. So creating and uploading that annotation jar to sonatype and maven central should work. And I think you could 'reference' it from your module by using the 'classifier' attribute. I'll try to check that out this WE. |
added a pull request (#63) containing the maven-jar-plugin.
|
Hey Michi,
I have just tried to enhance your "sample" with gradle (see https://github.com/aaschmid/pojobuilder).
The problem if you don't separate the
pojobuilder.jar
such that one is just containing the @GeneratePojoBuilder and all the other code annotations, and one contain the required dependencies and classes for annotation processing, is following:If you compile the code automatically the annotation processing is done and you will get
*Builder.java
and*Builder.class
in youroutput
directory (to reproduce just executegradle build
on https://github.com/aaschmid/pojobuilder.Furthermore, I would like to refactor your example that it generates and uses the generate POJO builders just in test "scope" because IMHO is that a more realistic use case and a better sample. If one also wants to use the generate POJO builders in "main" scope he/she can execute the
generatePojobuilder
just beforecompileJava
.The text was updated successfully, but these errors were encountered: