hal / elemento

Builder API and other goodies for Elemental2
https://hal-console.gitbook.io/elemento/
Apache License 2.0
93 stars 24 forks source link

Provide annotation processor as the separate maven artifact. #41

Closed foal closed 6 years ago

foal commented 6 years ago

Now GWT project depends on annotation processor and vice versa 'maven-compiler-plugin' has GWT related classes in 'annotationProcessorPaths'

ibaca commented 6 years ago

Anyways, GWT does not include the jar in the final output, as it just compiles out as HTML/CSS/JS so... although this might be a good practice in general, in this case, add nothing, especially bc the processor dependencies are shaded so it cannot conflict with other dependencies.

foal commented 6 years ago

It is just suggestion. Now it isn't a real issue, but later it may be a cause of some unpredictable issues in dependency management, so better to think about it.

hpehl commented 6 years ago

@foal I don't fully understand the issue. Can you explain what exactly is wrong?

foal commented 6 years ago

Now the annotation processor is in the same project with GWT related classes. Due that the elemento-template jar (and all transitive dependencies) is participating in two different process - code generation and GWT compilation. The second point - it is not clear that jar has to be included in APT classtath (JDK -processorpath option). To resolve it I will need to check out the sources and found out the module that contains an annotation processor.

hpehl commented 6 years ago

IIUC you want to split maven module elemento-template?

The former would be part of the GWT compilation whereas the latter is only necessary for code generation. This would make it also more obvious which JAR needs to be on the APT classpath.

foal commented 6 years ago

Exactly