[hibernate-issues] [Hibernate-JIRA] Commented: (HV-457) Simplify annotation processor setup in IDEs by providing a shaded jar

Gunnar Morling (JIRA) noreply at atlassian.com
Mon Mar 21 14:30:08 EDT 2011


    [ http://opensource.atlassian.com/projects/hibernate/browse/HV-457?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=41809#action_41809 ] 

Gunnar Morling commented on HV-457:
-----------------------------------

Cool. Shading the dependencies has one down-side though, which I hadn't considered originally. 

Everything is fine as long as the AP is put to the processor path. But if the AP is part of the actual project classpath itself (which is supported by javac) then the BV API and HV core classes would be contained twice in the classpath (once as part of the original dependencies of the project, once shaded in the AP module). That's not a real problem (as long as the versions match), but it's not good style either.

I see two alternatives:

* Follow the shading approach, and recommend users to put the AP to the processor path and not the project classpath (which is better anyway)
* Reduce the AP's dependencies. I think HV core was not needed before HV-436, an maybe we could come around it there, too. That way only two JARs, the AP and validation-api.jar, would be needed on the processor path. Of course also the shading approach would benefit from reducing the number of shaded JARs.

> Simplify annotation processor setup in IDEs by providing a shaded jar
> ---------------------------------------------------------------------
>
>                 Key: HV-457
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-457
>             Project: Hibernate Validator
>          Issue Type: Improvement
>          Components: annotation-processor
>            Reporter: Kevin Pollet
>
> When configuring the annotation processor in IDEs it's classpath has to be specified. In IDEs like Netbeans or IntelliJ the annotation processor can use the project classpath. But it's better if the classpath of project and annotation processor are isolated.
> In that case people shall setup manually the annotation processor classpath which has to contain at least HV and BV dependency. As Gunnar said it would be usefull to simplify the annotation processor configuration in IDEs by providing a shaded jar.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the hibernate-issues mailing list