Skip to content

Commit c2680b4

Browse files
author
Stanley Shyiko
committed
Updated mvn exec instructions
1 parent 911fe3e commit c2680b4

File tree

3 files changed

+12
-8
lines changed

3 files changed

+12
-8
lines changed

README.md

+1-8
Original file line numberDiff line numberDiff line change
@@ -408,14 +408,7 @@ import package.* // ktlint-disable
408408
409409
```sh
410410
git clone https://github.com/shyiko/ktlint && cd ktlint
411-
./mvnw # shows how to build, test, etc. project
412-
```
413-
#### Running ktlint from local build
414-
415-
This will build ktlint and run it with any args you want to include.
416-
417-
```sh
418-
gradle run --args="--color"
411+
./mvnw # shows how to build, test, run, etc. project
419412
```
420413

421414
#### Access to the latest `master` snapshot

ktlint/pom.xml

+8
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,14 @@
225225
</execution>
226226
</executions>
227227
</plugin>
228+
<plugin>
229+
<groupId>org.codehaus.mojo</groupId>
230+
<artifactId>exec-maven-plugin</artifactId>
231+
<version>1.6.0</version>
232+
<configuration>
233+
<mainClass>com.github.shyiko.ktlint.Main</mainClass>
234+
</configuration>
235+
</plugin>
228236
</plugins>
229237
</build>
230238

pom.xml

+3
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,9 @@
174174
# test (&amp; check code style)
175175
./mvnw clean verify
176176

177+
# run
178+
./mvnw -pl ktlint compile exec:java -Dexec.args="--help"
179+
177180
# publish a new version
178181
./mvnw versions:set -DnewVersion=&lt;version&gt;
179182
./mvnw -Ddeploy=maven-central

0 commit comments

Comments
 (0)