From daf9488c0db5509cb837eed31b59c0829cfc24c1 Mon Sep 17 00:00:00 2001 From: Martin Petrov Date: Mon, 20 Dec 2021 12:56:26 -0800 Subject: [PATCH] Fix main class in pom file. (#264) Summary: Building with `mvn install` currently results in a jar with a missing main class, as `main` was moved to core/src/main/java/com/facebook/ktfmt/cli/Main.kt Pull Request resolved: https://github.com/facebookincubator/ktfmt/pull/264 Test Plan: Imported from GitHub, without a `Test Plan:` line. Before this change, trying to run the built jar fails: ``` % $JAVA_HOME/bin/java -jar ~/.m2/repository/com/facebook/ktfmt/0.31-SNAPSHOT/ktfmt-0.31-SNAPSHOT-jar-with-dependencies.jar Error: Could not find or load main class com.facebook.ktfmt.MainKt ``` After this fix, the JAR loads fine: ``` % $JAVA_HOME/bin/java -jar ~/.m2/repository/com/facebook/ktfmt/0.31-SNAPSHOT/ktfmt-0.31-SNAPSHOT-jar-with-dependencies.jar Usage: ktfmt [--dropbox-style | --google-style | --kotlinlang-style] File1.kt File2.kt ... ``` Updated the [wiki](https://www.internalfb.com/intern/wiki/Ktfmt_(aka_facebook-kotlin-format)/Testing_Changes/) to include this check. Reviewed By: hick209 Differential Revision: D33240462 Pulled By: davidtorosyan fbshipit-source-id: cb5687e8e33e8b00709a2a79c17af27e51cd61bb --- core/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/pom.xml b/core/pom.xml index 125b8625..0a71ad26 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -19,7 +19,7 @@ 1.5.0 true 1.8 - com.facebook.ktfmt.MainKt + com.facebook.ktfmt.cli.Main