Skip to content

Commit 70ba6ea

Browse files
committed
Add section to readme how to enable m2e support
1 parent d0460d7 commit 70ba6ea

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

plugin-maven/README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1696,6 +1696,26 @@ cmd> mvn spotless:apply -DspotlessFiles=my/file/pattern.java,more/generic/.*-pat
16961696

16971697
The patterns are matched using `String#matches(String)` against the absolute file path.
16981698

1699+
## Does Spotless support incremental builds in Eclipse
1700+
1701+
Spotless comes with [m2e](https://eclipse.dev/m2e/) support. However by default its execution is skipped by default in incremental builds. To enable it use the following parameter.
1702+
1703+
```
1704+
<configuration>
1705+
<enableForIncrementalBuild>true</enableForIncrementalBuild><!-- this is false by default -->
1706+
</configuration>
1707+
```
1708+
1709+
In addition Eclipse problem markers are being emitted. By default they have the severity `WARNING`.
1710+
You can adjust this with
1711+
1712+
```
1713+
<configuration>
1714+
<incrementalBuildMessageSeverity>ERROR</incrementalBuildMessageSeverity><!-- WARNING or ERROR -->
1715+
</configuration>
1716+
```
1717+
Note that for Incremental build support the goals have to be bound to a phase prior to `test`.
1718+
16991719
<a name="examples"></a>
17001720

17011721
## Example configurations (from real-world projects)

0 commit comments

Comments
 (0)