question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Integration with others annotation processors

See original GitHub issue

Hi,

I am trying using it on a conceptual project but I am facing some issues since we have others annotation processors (Lombok, MapStruct and Immutables). I have tried many combinations the only one that export the classes properly is using the querydsl-maven-plugin but, some configurations does not work properly, mas last configuration was:

<plugin>
	<groupId>com.querydsl</groupId>
	<artifactId>querydsl-maven-plugin</artifactId>
	<version>4.3.1</version>
	<configuration>
		<namePrefix>""</namePrefix>
		<nameSuffix>Specification</nameSuffix>
		<targetFolder>target/generated-sources/annotations</targetFolder>
		<packages>
			<package>xx.yyyy.zzz</package>
		</packages>
	</configuration>
	<executions>
		<execution>
			<phase>process-classes</phase>
			<goals>
				<goal>jpa-export</goal>
			</goals>
		</execution>
	</executions>
</plugin>

<plugin>
	<groupId>org.apache.maven.plugins</groupId>
	<artifactId>maven-compiler-plugin</artifactId>
	<version>3.8.1</version>
	<configuration>
		<useIncrementalCompilation>false</useIncrementalCompilation>
		<annotationProcessorPaths>
			<annotationProcessorPath>
				<groupId>org.immutables</groupId>
				<artifactId>value</artifactId>
				<version>2.8.8</version>
			</annotationProcessorPath>
			<annotationProcessorPath>
				<groupId>org.projectlombok</groupId>
				<artifactId>lombok</artifactId>
				<version>1.18.12</version>
			</annotationProcessorPath>
			<annotationProcessorPath>
				<groupId>org.mapstruct</groupId>
				<artifactId>mapstruct-processor</artifactId>
				<version>1.4.0.CR1</version>
			</annotationProcessorPath>
		</annotationProcessorPaths>
	</configuration>
</plugin>

But, even I define the namePrefix and nameSufix the plugin continue generating names by default Qxxx not xxSpecification .

Best,

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:14 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
HJK181commented, Nov 2, 2020

Yes, it works for me. Added a working example to my project.

1reaction
HJK181commented, Nov 2, 2020
Read more comments on GitHub >

github_iconTop Results From Across the Web

Configure annotation processors | IntelliJ IDEA Documentation
The annotation processor can validate, generate, and modify your code based on the annotations, which help you significantly reduce the amount ...
Read more >
java - Integrate annotation processor into the same project
One way is two have two modules in the same project. One module would define annotations and processor. Another would have it as...
Read more >
Code Generation using Annotation Processors in the Java ...
Although there are other ways to integrate annotation processors with Maven builds, we recommend the approach described here.
Read more >
Annotation processors in Gradle with the annotationProcessor ...
Annotation processing is a Java compilation option which has been around since Java 5. It enables the generation of additional files during ...
Read more >
Using annotation processor in IDE - Immutables
Obtain annotation processors from the project classpath and specify output directories. After you do this, classes will be generated on each project build....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found