rharter / auto-value-gson

AutoValue Extension to add Gson De/Serializer support
Apache License 2.0
607 stars 103 forks source link

Dependency on javapoet #214

Closed chris9871 closed 5 years ago

chris9871 commented 5 years ago

During the build step, if I don't explicitly include javapoet in a maven build including auto-value-json, the build fails:

[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR : 
[INFO] -------------------------------------------------------------
[ERROR] Bad service configuration file, or exception thrown while constructing Processor object: javax.annotation.processing.Processor: Provider com.ryanharter.auto.value.gson.AutoValueGsonAdapterFactoryProcessor could not be instantiated: java.lang.NoClassDefFoundError: com/squareup/javapoet/TypeName
[INFO] 1 error
[INFO] -------------------------------------------------------------

Adding:

        <dependency>
            <groupId>com.squareup</groupId>
            <artifactId>javapoet</artifactId>
            <version>${javapoet.version}</version>
        </dependency>

works around the problem.

ZacSweers commented 5 years ago

That's strange, but unfortunately unsure what to do about it. We haven't received many other reports of this being an issue

chris9871 commented 5 years ago

Agreed! Well if no one else is reporting it, we can close it.

Alienero commented 4 years ago

I had same error. After add javapoet dependency, it works good