Gradle deprecated annotation processor warnings for lombok

Change the lombok dependency type from compile to annotationProcessor, so your dependencies section in your build.gradle file should look like: dependencies { compileOnly(‘org.projectlombok:lombok:1.16.20’) annotationProcessor ‘org.projectlombok:lombok:1.16.20’ // compile ‘org.projectlombok:lombok:1.16.20’ <– this no longer works! // other dependencies… }

How to write automated unit tests for java annotation processor?

This is an old question, but it seems that the state of annotation processor testing hadn’t gotten any better, so we released Compile Testing today. The best docs are in package-info.java, but the general idea is that there is a fluent API for testing compilation output when run with an annotation processor. For example, ASSERT.about(javaSource()) … Read more

Maven 3 – How to add annotation processor dependency?

The annotationProcessorPaths option can be used in recent versions of the Maven compiler plug-in: <pluginManagement> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.6.1</version> <configuration> <annotationProcessorPaths> <annotationProcessorPath> <groupId>org.hibernate</groupId> <artifactId>hibernate-jpamodelgen</artifactId> <version>5.2.6.Final</version> </annotationProcessorPath> </annotationProcessorPaths> </configuration> </plugin> </plugins> </pluginManagement> That way the processor is separated from the actual project dependencies. This option is also picked up by the Eclipse M2E plug-in if … Read more

How can I add a generated Source Folder to my Source Path in Gradle?

What others answered overwrites my original directories, so I found a workaround – if you don’t want to overwrite the original directory list, you can do it like this: sourceSets.main.java.srcDirs += myDir sourceSets.main.kotlin.srcDirs += myDir The key is to use += here. It’s essentially the same as stating it like this: sourceSets { main { … Read more

How to generate the JPA entity Metamodel?

It would be awesome if someone also knows the steps for setting this up in Eclipse (I assume it’s as simple as setting up an annotation processor, but you never know) Yes it is. Here are the implementations and instructions for the various JPA 2.0 implementations: EclipseLink org.eclipse.persistence.internal.jpa.modelgen.CanonicalModelProcessor Hibernate org.hibernate.jpamodelgen.JPAMetaModelEntityProcessor http://in.relation.to/2009/11/09/hibernate-static-metamodel-generator-annotation-processor OpenJPA org.apache.openjpa.persistence.meta.AnnotationProcessor6 http://openjpa.apache.org/builds/2.4.1/apache-openjpa/docs/ch13s04.html DataNucleus … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)