I was going going to use some JPA Entities in various apps, so I placed them in a separate JAR and added dependencies in pom where needed. In order to allow persistence provider to "see" the entities classes I had to clearly list them in the persistence.xml (I'm using EclipseLink). And what is more interesting, I had to list all custom converters there as well:
<class>my.app.persistence.Entity</class>
<class>my.app.persistence.MapToJsonConverter</class>
<class>my.app.persistence.UuidConverter</class>
That's fine, but the question is, if there is a more elegant way to make classes visible for the persistence provider if they come via Maven dependency? I tried the "jar-file" property:
<jar-file>my-app-persistence.jar</jar-file>
But it didn't work because EclipseLink was looking for the my-app-persistence.jar file in the target folder of the main app (while it was in the local Maven repo).