Skip to content
This repository was archived by the owner on Oct 16, 2024. It is now read-only.

Commit 5baf61a

Browse files
authored
#436 README: configuring Maven for compatibility with IntelliJ
2 parents cedcf72 + 694d847 commit 5baf61a

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

README.md

+30
Original file line numberDiff line numberDiff line change
@@ -743,9 +743,39 @@ Run **Build > Rebuild Project**, then right-click the new `generated` folder
743743
(this may have a different name if you have changed the **Production sources
744744
directory** setting) and select **Mark Directory As > Generated Sources Root**.
745745

746+
747+
If you are using Maven to build your project within IntelliJ, you can alternatively
748+
configure the POM in a way that enables IntelliJ to automatically detect annotation
749+
processors when the POM is reloaded:
750+
751+
```
752+
<plugin>
753+
<artifactId>maven-compiler-plugin</artifactId>
754+
<configuration>
755+
<annotationProcessors>
756+
<annotationProcessor>org.inferred.freebuilder.processor.Processor</annotationProcessor>
757+
</annotationProcessors>
758+
<annotationProcessorPaths>
759+
<path>
760+
<groupId>org.inferred</groupId>
761+
<artifactId>freebuilder</artifactId>
762+
<version>2.6.2</version>
763+
</path>
764+
</annotationProcessorPaths>
765+
</configuration>
766+
</plugin>
767+
```
768+
769+
Click **Reload All Maven Projects** in the Maven tool window to force a reload if you have not configured IntelliJ
770+
for automatic reloading. The Annotation processor should appear in **Build, Execution, Deployment > Compiler > Annotation
771+
Processors** automatically, with all needed settings applied.
772+
773+
In case you need to use more than one annotation processor, you'll find an example at https://github.com/inferred/FreeBuilder/issues/435 .
774+
746775
[IntelliJ 14.0.3 documentation]: http://www.jetbrains.com/idea/webhelp/configuring-annotation-processing.html
747776
[Auto Issue #106]: https://github.com/google/auto/issues/106
748777

778+
749779
Release notes
750780
-------------
751781

0 commit comments

Comments
 (0)