Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can we write maven2 plugin in Scala?

I try to write a simple maven2 plugin in Scala just like in Java, but fail. It seams that the specific javadoc takes no effect in Scala environment. Is is unable to write maven2 plugin in Scala, since the official maven-scala-plugin is also written in Java ?

like image 300
爱国者 Avatar asked Oct 08 '22 19:10

爱国者


1 Answers

Josh Suereth has a couple of blog posts describing how to write Maven plugins (with Maven's awful Javadoc annotations) in Scala.

It's an impressive bit of work, but complicated, and when I've written Maven plugins in Scala I've taken the much simpler approach of having a very thin Java class (with not much more than the private fields and their Javadoc annotations) that extends a Scala class where all the real code lives. It's not very elegant, but it works and is reasonably straightforward.

like image 99
Travis Brown Avatar answered Oct 11 '22 07:10

Travis Brown