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
Using 0.13.0 with the supplied Maven configuration seems to not work right now. I have a MCVE up at https://github.com/mhlz/ktlint-issue (but it really is just using the example configuration).
Running mvn antrun:run@ktlint results in this output:
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building test 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-antrun-plugin:1.7:run (ktlint) @ test ---
[INFO] Executing tasks
ktlint:
[ktlint] Exception in thread "main" java.lang.IllegalStateException: locator.getService(RepositorySystem::class.java) must not be null
[ktlint] at com.github.shyiko.ktlint.internal.MavenDependencyResolver.<init>(MavenDependencyResolver.kt:35)
[ktlint] at com.github.shyiko.ktlint.Main.buildDependencyResolver(Main.kt:513)
[ktlint] at com.github.shyiko.ktlint.Main.access$buildDependencyResolver(Main.kt:56)
[ktlint] at com.github.shyiko.ktlint.Main$main$dependencyResolver$2.invoke(Main.kt:241)
[ktlint] at com.github.shyiko.ktlint.Main$main$dependencyResolver$2.invoke(Main.kt:56)
[ktlint] at kotlin.SynchronizedLazyImpl.getValue(Lazy.kt:130)
[ktlint] at com.github.shyiko.ktlint.Main.main(Main.kt:252)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.959 s
[INFO] Finished at: 2017-11-30T11:59:37+01:00
[INFO] Final Memory: 8M/245M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.7:run (ktlint) on project test: An Ant BuildException has occured: Java returned: 1
[ERROR] around Ant part ...<java fork="true" classname="com.github.shyiko.ktlint.Main" taskname="ktlint" failonerror="true" dir="/Users/mhlz/ktlint-issue" classpathref="maven.plugin.classpath">... @ 4:169 in /Users/mhlz/ktlint-issue/target/antrun/build-ktlint.xml
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
The text was updated successfully, but these errors were encountered:
Using 0.13.0 with the supplied Maven configuration seems to not work right now. I have a MCVE up at https://github.com/mhlz/ktlint-issue (but it really is just using the example configuration).
Running
mvn antrun:run@ktlint
results in this output:The text was updated successfully, but these errors were encountered: