Skip to content

Commit

Permalink
Merge pull request #62 from Kevin-Lee/task/61/change-cli-options
Browse files Browse the repository at this point in the history
Close #61 - Change CLI options
  • Loading branch information
kevin-lee authored Dec 9, 2019
2 parents 9849eeb + d119fc0 commit fe1c8d0
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions cli/src/main/scala/maven2sbt/cli/Maven2SbtApp.scala
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,20 @@ object Maven2SbtApp extends MainIO[Maven2SbtArgs] {

val rawCmd: Command[Maven2SbtArgs] =
((Maven2SbtArgs |*| (
flag[String](long("scalaVersion"), metavar("<version>"))
.map(ScalaVersion)
flag[String](
both('s', "scala-version"), metavar("<version>") |+| description("Scala version")
).map(ScalaVersion)
, flag[String](
both('o', "out")
, metavar("<output-file>") |+| description("output sbt config file (default: build.sbt)")
, metavar("<file>") |+| description("output sbt config file (default: build.sbt)")
).default("build.sbt").map(new File(_))
, switch(
long("overwrite")
, description("Overwrite if the output file already exists.")
).map(Overwrite.fromBoolean)
, argument[String](metavar("<pom-path>"))
.map(new File(_))
, argument[String](
metavar("<pom-path>") |+| description("Path to the pom file.")
).map(new File(_))
)) <* version(Maven2SbtBuildInfo.version)) ~ "Maven2Sbt" ~~ "A tool to convert Maven pom.xml into sbt build.sbt"

val cmd: Command[Maven2SbtArgs] =
Expand Down

0 comments on commit fe1c8d0

Please sign in to comment.