Closed gbecan closed 10 years ago
What do you mean by "the path of a project" ? KMF generates packages in lowercases, always. Could you give a bit more details on your project organization ? A minimal folder with pom and src to exemplify would be a must ! :-)
I created a project with a minimal example : https://github.com/gbecan/kmf-uppercase-bug In this repository, there are 2 intellij projects that are generating classes from a simple ecore model.
One is named kmf.uppercase.bug.ok and correctly generates the Java classes from the ecore.
The other is named kmf.uppercase.bug.NotOk and fails to generate the Java classes. What happens is that Kotlin classes are generated in kmf.uppercase.bug.notok/taget instead of kmf.uppercase.bug.NotOk/target folder.
Perfect ! Thanks. I understand the problem. However, KMF uses the ${project.build.directory} property of Maven to know where to generate the files. It works on my mac with no problem. What system are you using ?
Ok that's probably coming from the OS. I'm using Linux (Fedora)
If it comes from the OS, it must certainly not be a problem of the Linux one..
Just sayin'
I agree :D! I looked into the code of KMF, in particular in the org.kevoree.modeling.kotlin.generator module and there are several occurrences of toLowerCase method. It may be the source of the problem. In particular, there is one weird call in https://github.com/dukeboard/kevoree-modeling-framework/blob/master/org.kevoree.modeling.kotlin.generator/src/main/java/org/kevoree/modeling/kotlin/generator/GenerationContext.java#L187
When the path of a project contains uppercase letters (e.g. Foo/Bar), the kotlin classes are generated in a lowercase folder (foo/bar). Thus, nothing is compiled by the Kotlin compiler despite the "build success" indicated by Maven.