You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/site/markdown/how-to.md
+21-25Lines changed: 21 additions & 25 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,12 +17,12 @@
17
17
18
18
## Overview
19
19
20
-
Cache configuration provides you additional control over incremental Maven behavior. Follow it step by step to
21
-
understand how it works and figure out your optimal config
20
+
Cache configuration provides you additional control over the build-cache extension behavior. Follow it step-by-step to
21
+
understand how it works, and figure out an optimal config
22
22
23
23
### Minimal config
24
24
25
-
Absolutely minimal config
25
+
Minimal config
26
26
27
27
```xml
28
28
<?xml version="1.0" encoding="UTF-8" ?>
@@ -58,7 +58,7 @@ Just add `<remote>` section under `<configuration>`
58
58
59
59
### Adding more file types to input
60
60
61
-
Add all the projectspecific source code files in `<glob>`. Scala in this case:
61
+
Add all the project-specific source code files in `<glob>`. Scala, in this case:
62
62
63
63
```xml
64
64
<input>
@@ -70,8 +70,7 @@ Add all the project specific source code files in `<glob>`. Scala in this case:
70
70
71
71
### Adding source directory for bespoke project layouts
72
72
73
-
In most of the cases incremental Maven will recognize directories automatically by build introspection. If not, you can
74
-
add additional directories with `<include>`. Also you can filter out undesirable dirs and files by using exclude tag
73
+
In most cases, the build-cache extension automatically recognizes directories by introspecting the build. When it is not enough, adding additional directories with `<include>` is possible. Also, you can filter out undesirable dirs and files by using exclude tag.
75
74
76
75
```xml
77
76
<input>
@@ -87,7 +86,7 @@ add additional directories with `<include>`. Also you can filter out undesirable
87
86
</input>
88
87
```
89
88
90
-
### Plugin property is env specific and yields different cache key in different environments
89
+
### Plugin property is environment-specific and yields different cache keys in different environments
91
90
92
91
Consider to exclude env specific properties:
93
92
@@ -108,11 +107,11 @@ Consider to exclude env specific properties:
108
107
</input>
109
108
```
110
109
111
-
Implications - builds with different `argLine` will have identical key. Validate that is semantically valid.
110
+
Implications - builds with different `argLine` will have an identical key. Validate that it is acceptable in terms of artifact equivalency.
112
111
113
-
### Plugin property points to directory where only subset of files is relevant
112
+
### Plugin property points to a directory where only a subset of files is relevant
114
113
115
-
If plugin configuration property points to `somedir` it will be scanned with default glob. You can tweak it with custom
114
+
If the plugin configuration property points to `somedir`, it will be scanned with the default glob. You can tweak it with custom
116
115
processing rule
117
116
118
117
```xml
@@ -133,9 +132,9 @@ processing rule
133
132
</input>
134
133
```
135
134
136
-
### Local repository is not updated because `install` is cached
135
+
### Local repository is not updated because the `install` phase is cached
### I occasionally cached build with `-DskipTests=true` and tests do not run now
163
+
### I occasionally cached build with `-DskipTests=true`, and tests do not run now
165
164
166
-
If you add command line flags to your build, they do not participate in effective pom - Maven defers final value
167
-
resolution to plugin runtime. To invalidate build if filed value is different in runtime, add reconciliation section
165
+
If you add command line flags to your build, they do not participate in effective pom - Maven defers the final value
166
+
resolution to plugin runtime. To invalidate the build if the filed value is different in runtime, add a reconciliation section
168
167
to `executionControl`:
169
168
170
169
```xml
@@ -194,27 +193,24 @@ to `executionControl`:
194
193
</cache>
195
194
```
196
195
197
-
Please notice `skipValue` attribute. It denotes value which forces skipped execution.
198
-
Read `propertyName="skipTests" skipValue="true"` as if property skipTests has value true, plugin will skip execution If
199
-
you declare such value incremental Maven will reuse appropriate full-build though technically they are different, but
200
-
because full-build is better it is safe to reuse
196
+
Please notice the `skipValue` attribute. It captures the value that makes the plugin skip execution. Think of `skipProperty` as follows: if the build started with `-DskipTests=true`, restoring results from a build with completed tests is safe because the local run does not require completed tests. The same logic applies to any other plugin, not just Surefire.
201
197
202
198
### How to renormalize line endings in working copy after committing .gitattributes (git 2.16+)
203
199
204
-
Ensure you've committed (and ideally pushed everything) - no changes in working copy. After that:
200
+
Ensure you've committed (and ideally pushed everything) - no changes in the working copy. After that:
205
201
206
202
```shell
207
-
# Rewrite objects and update index
203
+
# Rewrite objects and update the index
208
204
git add --renormalize .
209
205
# Commit changes
210
-
git commit -m "Normalizing line endings"
211
-
# Remove working copy paths from git cache
206
+
git commit -m "Normalizing line endings."
207
+
# Remove working copy paths from the git cache
212
208
git rm --cached -r .
213
209
# Refresh with new line endings
214
210
git reset --hard
215
211
```
216
212
217
-
### I want to cache interim build and override it later with final version
213
+
### I want to cache the interim build and override it later with the final version
218
214
219
-
Solution: set `-Dmaven.build.cache.remote.save.final=true` to nodes which produce final builds. Such builds will not be overridden
215
+
Solution: set `-Dmaven.build.cache.remote.save.final=true` to nodes that produce final builds. Such builds will not be overridden
0 commit comments