Skip to content

Commit 738f8ad

Browse files
nedtwnedtw
authored andcommitted
Merge branch 'master' into main
2 parents 07191e0 + 9293e6d commit 738f8ad

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
@@ -116,7 +116,7 @@ To use it in your pom, just [add the Spotless dependency](https://search.maven.o
116116
optionally, Spotless can set copyright years by digging
117117
through git history (see "license" section below) -->
118118
<licenseHeader>
119-
<content>/* (C)$YEAR */</content> <!-- or <file>${basedir}/license-header</file> -->
119+
<content>/* (C)$YEAR */</content> <!-- or <file>${project.basedir}/license-header</file> -->
120120
</licenseHeader>
121121
</java>
122122
</configuration>
@@ -178,7 +178,7 @@ any other maven phase (i.e. compile) then it can be configured as below;
178178

179179
<importOrder /> <!-- standard import order -->
180180
<importOrder> <!-- or a custom ordering -->
181-
<order>java,javax,org,com,com.diffplug,</order> <!-- or use <file>${basedir}/eclipse.importorder</file> -->
181+
<order>java,javax,org,com,com.diffplug,</order> <!-- or use <file>${project.basedir}/eclipse.importorder</file> -->
182182
<!-- You probably want an empty string at the end - all of the
183183
imports you didn't specify explicitly will go there. -->
184184
</importOrder>
@@ -190,7 +190,7 @@ any other maven phase (i.e. compile) then it can be configured as below;
190190
<prettier /> <!-- has its own section below -->
191191

192192
<licenseHeader>
193-
<content>/* (C)$YEAR */</content> <!-- or <file>${basedir}/license-header</file> -->
193+
<content>/* (C)$YEAR */</content> <!-- or <file>${project.basedir}/license-header</file> -->
194194
</licenseHeader>
195195
</java>
196196
</configuration>
@@ -215,7 +215,7 @@ any other maven phase (i.e. compile) then it can be configured as below;
215215
```xml
216216
<eclipse>
217217
<version>4.13.0</version> <!-- optional -->
218-
<file>${basedir}/eclipse-formatter.xml</file> <!-- optional -->
218+
<file>${project.basedir}/eclipse-formatter.xml</file> <!-- optional -->
219219
</eclipse>
220220
```
221221

@@ -236,15 +236,16 @@ any other maven phase (i.e. compile) then it can be configured as below;
236236

237237
<importOrder /> <!-- standard import order -->
238238
<importOrder> <!-- or a custom ordering -->
239-
<order>java,javax,org,com,com.diffplug,</order> <!-- or use <file>${basedir}/eclipse.importorder</file> -->
239+
<order>java,javax,org,com,com.diffplug,</order> <!-- or use <file>
240+
/eclipse.importorder</file> -->
240241
<!-- You probably want an empty string at the end - all of the
241242
imports you didn't specify explicitly will go there. -->
242243
</importOrder>
243244

244245
<greclipse /> <!-- has its own section below -->
245246

246247
<licenseHeader>
247-
<content>/* (C)$YEAR */</content> <!-- or <file>${basedir}/license-header</file> -->
248+
<content>/* (C)$YEAR */</content> <!-- or <file>${project.basedir}/license-header</file> -->
248249
</licenseHeader>
249250
</java>
250251
</configuration>
@@ -257,7 +258,7 @@ any other maven phase (i.e. compile) then it can be configured as below;
257258
```xml
258259
<greclipse>
259260
<version>4.13.0</version> <!-- optional -->
260-
<file>${basedir}/greclipse.properties</file> <!-- optional -->
261+
<file>${project.basedir}/greclipse.properties</file> <!-- optional -->
261262
</greclipse>
262263
```
263264

@@ -284,7 +285,7 @@ Groovy-Eclipse formatting errors/warnings lead per default to a build failure. T
284285
<prettier /> <!-- has its own section below -->
285286

286287
<licenseHeader>
287-
<content>/* (C)$YEAR */</content> <!-- or <file>${basedir}/license-header</file> -->
288+
<content>/* (C)$YEAR */</content> <!-- or <file>${project.basedir}/license-header</file> -->
288289
</licenseHeader>
289290
</kotlin>
290291
</configuration>
@@ -344,7 +345,7 @@ Groovy-Eclipse formatting errors/warnings lead per default to a build failure. T
344345
<scalafmt /> <!-- has its own section below -->
345346

346347
<licenseHeader>
347-
<content>/* (C)$YEAR */</content> <!-- or <file>${basedir}/license-header</file> -->
348+
<content>/* (C)$YEAR */</content> <!-- or <file>${project.basedir}/license-header</file> -->
348349
<delimiter>package </delimiter> <!--
349350
note the 'package ' argument - this is a regex which identifies the top
350351
of the file, be careful that all of your sources have a package declaration,
@@ -361,7 +362,7 @@ Groovy-Eclipse formatting errors/warnings lead per default to a build failure. T
361362
```xml
362363
<scalafmt>
363364
<version>2.0.1</version> <!-- optional -->
364-
<file>${basedir}/scalafmt.conf</file> <!-- optional -->
365+
<file>${project.basedir}/scalafmt.conf</file> <!-- optional -->
365366
</scalafmt>
366367
```
367368

@@ -383,7 +384,7 @@ Groovy-Eclipse formatting errors/warnings lead per default to a build failure. T
383384
<eclipseCdt /> <!-- has its own section below -->
384385

385386
<licenseHeader>
386-
<content>/* (C)$YEAR */</content> <!-- or <file>${basedir}/license-header</file> -->
387+
<content>/* (C)$YEAR */</content> <!-- or <file>${project.basedir}/license-header</file> -->
387388
</licenseHeader>
388389
</cpp>
389390
</configuration>
@@ -396,7 +397,7 @@ Groovy-Eclipse formatting errors/warnings lead per default to a build failure. T
396397
```xml
397398
<eclipseCdt>
398399
<version>4.13.0</version> <!-- optional -->
399-
<file>${basedir}/eclipse-cdt.xml</file> <!-- optional -->
400+
<file>${project.basedir}/eclipse-cdt.xml</file> <!-- optional -->
400401
</eclipseCdt>
401402
```
402403

@@ -451,7 +452,7 @@ Groovy-Eclipse formatting errors/warnings lead per default to a build failure. T
451452
<antlr4formatter /> <!-- has its own section below -->
452453

453454
<licenseHeader>
454-
<content>/* (C)$YEAR */</content> <!-- or <file>${basedir}/license-header</file> -->
455+
<content>/* (C)$YEAR */</content> <!-- or <file>${project.basedir}/license-header</file> -->
455456
</licenseHeader>
456457
</antlr4>
457458
</configuration>
@@ -525,7 +526,7 @@ sql.formatter.indent.size=4
525526
<prettier/> <!-- has its own section below -->
526527

527528
<licenseHeader>
528-
<content>/* (C)$YEAR */</content> <!-- or <file>${basedir}/license-header</file> -->
529+
<content>/* (C)$YEAR */</content> <!-- or <file>${project.basedir}/license-header</file> -->
529530
<delimiter>(import|const|declare|export|var) </delimiter> <!--
530531
note the '(import|const|...' argument - this is a regex which identifies the top
531532
of the file, be careful that all of your sources have a suitable top-level declaration,
@@ -552,10 +553,10 @@ The auto-discovery of config files (up the file tree) will not work when using t
552553
<convertTabsToSpaces>true</convertTabsToSpaces>
553554
</config>
554555
<!-- // or according to tsfmt-parameters: https://github.com/vvakame/typescript-formatter/blob/7764258ad42ac65071399840d1b8701868510ca7/lib/index.ts#L27L34 -->
555-
<tsconfigFile>${basedir}/tsconfig.json</tsconfigFile>
556-
<tslintFile>${basedir}/tslint.json</tslintFile>
557-
<vscodeFile>${basedir}/vscode.json</vscodeFile>
558-
<tsfmtFile>${basedir}/tsfmt.json</tsfmtFile>
556+
<tsconfigFile>${project.basedir}/tsconfig.json</tsconfigFile>
557+
<tslintFile>${project.basedir}/tslint.json</tslintFile>
558+
<vscodeFile>${project.basedir}/vscode.json</vscodeFile>
559+
<tsfmtFile>${project.basedir}/tsfmt.json</tsfmtFile>
559560
</tsfmt>
560561
```
561562

@@ -596,7 +597,7 @@ You can use prettier in any language-specific format, but usually you will be cr
596597
</property>
597598
</devDependencyProperties>
598599
<!-- Specify config file and/or inline config, the inline always trumps file -->
599-
<configFile>${basedir}/path/to/configfile</configFile>
600+
<configFile>${project.basedir}/path/to/configfile</configFile>
600601
<config>
601602
<useTabs>true</useTabs>
602603
</config>
@@ -715,8 +716,8 @@ Alternatively you can supply spotless with a location of the `.npmrc` file to us
715716
<eclipseWtp>
716717
<type>XML</type> <!-- specify the WTP formatter type (XML, JS, ...) -->
717718
<files> <!-- specify the configuration for the selected type -->
718-
<file>${basedir}/xml.prefs</file>
719-
<file>${basedir}/additional.properties</file>
719+
<file>${project.basedir}/xml.prefs</file>
720+
<file>${project.basedir}/additional.properties</file>
720721
</files>
721722
<version>4.13.0</version> <!-- optional -->
722723
</eclipseWtp>
@@ -787,7 +788,7 @@ Spotless can inject a license header into your files, including populating an ac
787788

788789
```xml
789790
<licenseHeader> <!-- specify either content or file, but not both -->
790-
<content>/* (C)$YEAR */</content> <!-- or <file>${basedir}/license-header</file> -->
791+
<content>/* (C)$YEAR */</content> <!-- or <file>${project.basedir}/license-header</file> -->
791792
<delimiter>#</delimiter> <!-- content until first occurrence of the delimiter regex will be interpreted as header section -->
792793
</licenseHeader>
793794
```

0 commit comments

Comments
 (0)