timowest / scalagen

Java to Scala transformation
Apache License 2.0
217 stars 32 forks source link

Jar for Scala 2.9 and 2.10 #49

Closed dnadolny closed 11 years ago

dnadolny commented 11 years ago

Right now, scalagen is only compiled for Scala 2.9. I'm working on a Scala IDE plugin backed by scalagen, but in order to have it available for both Scala IDE targets I need a version of the scalagen jar compiled for Scala 2.10 (as well as 2.9).

It would be ideal if scalagen was published to a maven repository for both versions, using the sbt naming convention. To do it manually, in the pom.xml you would change the scala.version property to 2.10.1 and change the artifactId to scalagen_2.10.1 and publish that, and again for 2.9.3 (or 2.9.1 if there's a reason to stick with that). See http://mvnrepository.com/artifact/com.typesafe.akka for an example of this.

timowest commented 11 years ago

Is it possible to do this easily in Maven? Using classifiers seems easier. Manual cross deployment is not an option.

dnadolny commented 11 years ago

It seems possible to do it with classifiers, where the classifier name is the scala versions (combined with specifying the scala.version property on the command line or via profile).

timowest commented 11 years ago

Feel free to patch it. A classifier based solution is ok for me.

dnadolny commented 11 years ago

One note: this doesn't exactly match the convention since classifiers are separated from the artifactId by a hyphen rather than an underscore, which means that it will be harder to add scalagen as a dependency for sbt users that want to cross compile. Maybe there's a way to change that, I'll look in to it. Being separated by a hyphen works for what I need though, so maybe that's good enough

timowest commented 11 years ago

Implemented here https://github.com/mysema/scalagen/pull/50