grails / grails-maven

67 stars 52 forks source link

Grails 2.4.x breaks maven-based plugin builds #43

Open ryangardner opened 10 years ago

ryangardner commented 10 years ago

https://github.com/grails/grails-maven/blob/master/src/main/java/org/grails/maven/plugin/tools/DefaultGrailsServices.java#L141

The plugin is now calling out to a method called getClassNameForLowerCaseHyphenSeparatedName - that method is designed to take a class that is named like "foo-bar-baz" and turn it into "FooBarBaz".

The problem is that this is precisely the opposite of what used to happen at this line. It used to call out to GrailsNameUtils.getScriptName(GrailsNameUtils.getLogicalName(className, "GrailsPlugin"));

that method takes strings like "FooBarBaz" and turn it into "foo-bar-baz"

The net result of this change is that it wont pass the validator and gives strange errors to us as we try to run it.

Should I just copy the code that used to do the getScriptName method into this mojo?