Closed mseele closed 3 years ago
Not very familiar with using maven, seems your build is not resolving dependencies. This works fine in basically every Gradle project so not sure there's anything we can do here. Seems you'll need to troubleshoot your build issue
Just for documentation reasons: I got time to look into this a little deeper. Seems like i ran into this maven bug: https://issues.apache.org/jira/browse/MCOMPILER-272
Only the transitive dependencies of the first entry are resolved so far. Moving path auto-value-gson-extension
up will resolve the issue.
I experienced an issue with the maven configuration of auto-value-gson-extension using @GenerateTypeAdapter. Please see my demo Repository here: https://github.com/mseele/auto-value-gson-test
When i run
mvn clean compile
with the current setup, noTest_GsonTypeAdapter
is created.I deep dive into the issue by debugging via
mvnDebug clean compile
and found out thatcom.google.auto.value.processor.AutoValueProcessor.init(ProcessingEnvironment)
throws the following error:(but unfortunately is not output in the console)
Adding
to the
<annotationProcessorPaths>
triggers the next exception (now visible on the console):Fatal error compiling: java.lang.NoClassDefFoundError: com.ryanharter.auto.value.gson.GenerateTypeAdapter
After adding
everything works.
Please see https://github.com/mseele/auto-value-gson-test/blob/master/pom.xml. The current version triggers the error. I've commented out the two items that need to be there to make it work.