timowest / scalagen

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

Trouble using com.mysema.scalagen:scalagen_2.10.1 module via Gradle #87

Open joelittlejohn opened 7 years ago

joelittlejohn commented 7 years ago

I'm getting the following error trying to use the scalagen_2.10.1 module via gradle. When I add this dependency I see this error:

org.gradle.api.internal.artifacts.ivyservice.ivyresolve.parser.MetaDataParseException:
inconsistent module metadata found. 
Descriptor: com.mysema.scalagen:scalagen_2.9.3:0.3.2 
Errors: bad module name: expected='scalagen_2.10.1' found='scalagen_2.9.3'

I think the problem here is the way the scalagen module users a property, defined by its own profiles to define the artifactid. So the artifact is resolved, but the scala-2.9.x profile defined in that same pom.xml and set as active by default then changes the id of the artifact itself. So you load scalagen_2.10.1 and it's contents changes it's own artifactid to scalagen_2.9.3.

I've tried various techniques, including:

but no matter what I try I get the same error. I don't believe it's possible to use this module without someone having to set -Pscala-2.10.x on all builds.

So I'm planning to fork this library and modify the artifactid to remove this property. I'll package a modified version of this library as a module of my own project, and .

joelittlejohn commented 7 years ago

I thought I had this solved, but the problem persists.