Skip to content

Commit 9293e6d

Browse files
authored
Update usages of ${basedir} in README for Maven (#931)
2 parents dc0db92 + 81d354e commit 9293e6d

File tree

1 file changed

+23
-22
lines changed

1 file changed

+23
-22
lines changed

plugin-maven/README.md

Lines changed: 23 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ To use it in your pom, just [add the Spotless dependency](https://search.maven.o
113113
optionally, Spotless can set copyright years by digging
114114
through git history (see "license" section below) -->
115115
<licenseHeader>
116-
<content>/* (C)$YEAR */</content> <!-- or <file>${basedir}/license-header</file> -->
116+
<content>/* (C)$YEAR */</content> <!-- or <file>${project.basedir}/license-header</file> -->
117117
</licenseHeader>
118118
</java>
119119
</configuration>
@@ -146,7 +146,7 @@ Spotless requires Maven to be running on JRE 8+.
146146

147147
<importOrder /> <!-- standard import order -->
148148
<importOrder> <!-- or a custom ordering -->
149-
<order>java,javax,org,com,com.diffplug,</order> <!-- or use <file>${basedir}/eclipse.importorder</file> -->
149+
<order>java,javax,org,com,com.diffplug,</order> <!-- or use <file>${project.basedir}/eclipse.importorder</file> -->
150150
<!-- You probably want an empty string at the end - all of the
151151
imports you didn't specify explicitly will go there. -->
152152
</importOrder>
@@ -158,7 +158,7 @@ Spotless requires Maven to be running on JRE 8+.
158158
<prettier /> <!-- has its own section below -->
159159

160160
<licenseHeader>
161-
<content>/* (C)$YEAR */</content> <!-- or <file>${basedir}/license-header</file> -->
161+
<content>/* (C)$YEAR */</content> <!-- or <file>${project.basedir}/license-header</file> -->
162162
</licenseHeader>
163163
</java>
164164
</configuration>
@@ -182,7 +182,7 @@ Spotless requires Maven to be running on JRE 8+.
182182
```xml
183183
<eclipse>
184184
<version>4.13.0</version> <!-- optional -->
185-
<file>${basedir}/eclipse-formatter.xml</file> <!-- optional -->
185+
<file>${project.basedir}/eclipse-formatter.xml</file> <!-- optional -->
186186
</eclipse>
187187
```
188188

@@ -203,15 +203,16 @@ Spotless requires Maven to be running on JRE 8+.
203203

204204
<importOrder /> <!-- standard import order -->
205205
<importOrder> <!-- or a custom ordering -->
206-
<order>java,javax,org,com,com.diffplug,</order> <!-- or use <file>${basedir}/eclipse.importorder</file> -->
206+
<order>java,javax,org,com,com.diffplug,</order> <!-- or use <file>
207+
/eclipse.importorder</file> -->
207208
<!-- You probably want an empty string at the end - all of the
208209
imports you didn't specify explicitly will go there. -->
209210
</importOrder>
210211

211212
<greclipse /> <!-- has its own section below -->
212213

213214
<licenseHeader>
214-
<content>/* (C)$YEAR */</content> <!-- or <file>${basedir}/license-header</file> -->
215+
<content>/* (C)$YEAR */</content> <!-- or <file>${project.basedir}/license-header</file> -->
215216
</licenseHeader>
216217
</java>
217218
</configuration>
@@ -224,7 +225,7 @@ Spotless requires Maven to be running on JRE 8+.
224225
```xml
225226
<greclipse>
226227
<version>4.13.0</version> <!-- optional -->
227-
<file>${basedir}/greclipse.properties</file> <!-- optional -->
228+
<file>${project.basedir}/greclipse.properties</file> <!-- optional -->
228229
</greclipse>
229230
```
230231

@@ -250,7 +251,7 @@ Groovy-Eclipse formatting errors/warnings lead per default to a build failure. T
250251
<prettier /> <!-- has its own section below -->
251252

252253
<licenseHeader>
253-
<content>/* (C)$YEAR */</content> <!-- or <file>${basedir}/license-header</file> -->
254+
<content>/* (C)$YEAR */</content> <!-- or <file>${project.basedir}/license-header</file> -->
254255
</licenseHeader>
255256
</kotlin>
256257
</configuration>
@@ -300,7 +301,7 @@ Groovy-Eclipse formatting errors/warnings lead per default to a build failure. T
300301
<scalafmt /> <!-- has its own section below -->
301302

302303
<licenseHeader>
303-
<content>/* (C)$YEAR */</content> <!-- or <file>${basedir}/license-header</file> -->
304+
<content>/* (C)$YEAR */</content> <!-- or <file>${project.basedir}/license-header</file> -->
304305
<delimiter>package </delimiter> <!--
305306
note the 'package ' argument - this is a regex which identifies the top
306307
of the file, be careful that all of your sources have a package declaration,
@@ -317,7 +318,7 @@ Groovy-Eclipse formatting errors/warnings lead per default to a build failure. T
317318
```xml
318319
<scalafmt>
319320
<version>2.0.1</version> <!-- optional -->
320-
<file>${basedir}/scalafmt.conf</file> <!-- optional -->
321+
<file>${project.basedir}/scalafmt.conf</file> <!-- optional -->
321322
</scalafmt>
322323
```
323324

@@ -339,7 +340,7 @@ Groovy-Eclipse formatting errors/warnings lead per default to a build failure. T
339340
<eclipseCdt /> <!-- has its own section below -->
340341

341342
<licenseHeader>
342-
<content>/* (C)$YEAR */</content> <!-- or <file>${basedir}/license-header</file> -->
343+
<content>/* (C)$YEAR */</content> <!-- or <file>${project.basedir}/license-header</file> -->
343344
</licenseHeader>
344345
</cpp>
345346
</configuration>
@@ -352,7 +353,7 @@ Groovy-Eclipse formatting errors/warnings lead per default to a build failure. T
352353
```xml
353354
<eclipseCdt>
354355
<version>4.13.0</version> <!-- optional -->
355-
<file>${basedir}/eclipse-cdt.xml</file> <!-- optional -->
356+
<file>${project.basedir}/eclipse-cdt.xml</file> <!-- optional -->
356357
</eclipseCdt>
357358
```
358359

@@ -371,7 +372,7 @@ Groovy-Eclipse formatting errors/warnings lead per default to a build failure. T
371372
<antlr4formatter /> <!-- has its own section below -->
372373

373374
<licenseHeader>
374-
<content>/* (C)$YEAR */</content> <!-- or <file>${basedir}/license-header</file> -->
375+
<content>/* (C)$YEAR */</content> <!-- or <file>${project.basedir}/license-header</file> -->
375376
</licenseHeader>
376377
</antlr4>
377378
</configuration>
@@ -445,7 +446,7 @@ sql.formatter.indent.size=4
445446
<prettier/> <!-- has its own section below -->
446447

447448
<licenseHeader>
448-
<content>/* (C)$YEAR */</content> <!-- or <file>${basedir}/license-header</file> -->
449+
<content>/* (C)$YEAR */</content> <!-- or <file>${project.basedir}/license-header</file> -->
449450
<delimiter>(import|const|declare|export|var) </delimiter> <!--
450451
note the '(import|const|...' argument - this is a regex which identifies the top
451452
of the file, be careful that all of your sources have a suitable top-level declaration,
@@ -472,10 +473,10 @@ The auto-discovery of config files (up the file tree) will not work when using t
472473
<convertTabsToSpaces>true</convertTabsToSpaces>
473474
</config>
474475
<!-- // or according to tsfmt-parameters: https://github.com/vvakame/typescript-formatter/blob/7764258ad42ac65071399840d1b8701868510ca7/lib/index.ts#L27L34 -->
475-
<tsconfigFile>${basedir}/tsconfig.json</tsconfigFile>
476-
<tslintFile>${basedir}/tslint.json</tslintFile>
477-
<vscodeFile>${basedir}/vscode.json</vscodeFile>
478-
<tsfmtFile>${basedir}/tsfmt.json</tsfmtFile>
476+
<tsconfigFile>${project.basedir}/tsconfig.json</tsconfigFile>
477+
<tslintFile>${project.basedir}/tslint.json</tslintFile>
478+
<vscodeFile>${project.basedir}/vscode.json</vscodeFile>
479+
<tsfmtFile>${project.basedir}/tsfmt.json</tsfmtFile>
479480
</tsfmt>
480481
```
481482

@@ -523,7 +524,7 @@ You can use prettier in any language-specific format, but usually you will be cr
523524
</property>
524525
</devDependencyProperties>
525526
<!-- Specify config file and/or inline config, the inline always trumps file -->
526-
<configFile>${basedir}/path/to/configfile</configFile>
527+
<configFile>${project.basedir}/path/to/configfile</configFile>
527528
<config>
528529
<useTabs>true</useTabs>
529530
</config>
@@ -632,8 +633,8 @@ Spotless will try to auto-discover an npm installation. If that is not working f
632633
<eclipseWtp>
633634
<type>XML</type> <!-- specify the WTP formatter type (XML, JS, ...) -->
634635
<files> <!-- specify the configuration for the selected type -->
635-
<file>${basedir}/xml.prefs</file>
636-
<file>${basedir}/additional.properties</file>
636+
<file>${project.basedir}/xml.prefs</file>
637+
<file>${project.basedir}/additional.properties</file>
637638
</files>
638639
<version>4.7.3a</version> <!-- optional -->
639640
</eclipseWtp>
@@ -704,7 +705,7 @@ Spotless can inject a license header into your files, including populating an ac
704705

705706
```xml
706707
<licenseHeader> <!-- specify either content or file, but not both -->
707-
<content>/* (C)$YEAR */</content> <!-- or <file>${basedir}/license-header</file> -->
708+
<content>/* (C)$YEAR */</content> <!-- or <file>${project.basedir}/license-header</file> -->
708709
<delimiter>#</delimiter> <!-- content until first occurrence of the delimiter regex will be interpreted as header section -->
709710
</licenseHeader>
710711
```

0 commit comments

Comments
 (0)