Crank CodeGen Maven plugin and archetype

25 views
Skip to first unread message

RickHigh

unread,
Jan 22, 2009, 3:22:01 PM1/22/09
to Crank Developer Support
Crank has never had a code generator. Recently we wrote one called
codegen with some help from my open source friends (thanks Alec).

It is far from complete but we have made some real progress and would
like people to try it out.

Please if you get a chance go to

http://code.google.com/p/krank/wiki/UsingCodeGenEarly

follow the instructions and let us know if you have any problems.

We are looking for feedback.


If you are interested in some of the history about the code generator
and some of thinking behind it check out:
http://code.google.com/p/krank/wiki/ThinkingInGroovy (Jan 2008...
early work done)
http://code.google.com/p/krank/wiki/ThinkingInGroovyPart2 (Dec 2008...
started working on it again)
http://code.google.com/p/krank/wiki/ProgressCodeGenerator
http://code.google.com/p/krank/wiki/ScreenShotsForCodeGen
http://code.google.com/p/krank/wiki/CreatingGroovyMojoForP2c
http://code.google.com/p/krank/wiki/CreatingSampleDatabaseForCodegenCrank
http://code.google.com/p/krank/wiki/UsingCodeGenEarly

This should be a good year for Crank development. I am looking for
some help porting Crank to JSF 2.0.

It would sure be nice when JavaOne rolls around this year to have
Crank working with JSF 2.0 with a functioning code generator.

I know there are a few JSF 2.0 expert on this mailing list.... Crank
needs your help.

Also, currently the code generator needs, code generator support for
Oracle. Who can volunteer for this?

RickHigh

unread,
Jan 26, 2009, 5:31:50 AM1/26/09
to Crank Developer Support
Ok... I got it running on windows but it will not reverse the
relationships. I am not sure why. It reverses the relationships on my
Unix box. It might be a case issue. Anyhoot... the good news it does
work on Windows in at least a degraded mode. The next step will be to
figure out why it is not getting the fks. Did I use the wrong db
scripts? is it a mysql version issue? sunspots? aliens?

Mac OS: richard-hightowers-macbook-pro:empWeb richardhightower$ mysql
--version mysql Ver 14.12 Distrib 5.0.67, for apple-darwin9.4.0 (i686)
using readline 5.1

Windows: C:\projects\testmojo\empWeb>mysql --version mysql Ver 14.12
Distrib 5.0.41, for Win32 (ia32)

Again.. it reverses the tables and columns but leaves off the
relationships...

Still looking for volunteers for Oracle. Learn Groovy. Impress your
friends. :o)

On Jan 22, 12:22 pm, RickHigh <RichardHighto...@gmail.com> wrote:
> Crank has never had a code generator. Recently we wrote one called
> codegen with some help from my open source friends (thanks Alec).
>
> It is far from complete but we have made some real progress and would
> like people to try it out.
>
> Please if you get a chance go to
>
> http://code.google.com/p/krank/wiki/UsingCodeGenEarly
>
> follow the instructions and let us know if you have any problems.
>
> We are looking for feedback.
>
> If you are interested in some of the history about the code generator
> and some of thinking behind it check out:http://code.google.com/p/krank/wiki/ThinkingInGroovy(Jan 2008...
> early work done)http://code.google.com/p/krank/wiki/ThinkingInGroovyPart2(Dec 2008...
> started working on it again)http://code.google.com/p/krank/wiki/ProgressCodeGeneratorhttp://code.google.com/p/krank/wiki/ScreenShotsForCodeGenhttp://code.google.com/p/krank/wiki/CreatingGroovyMojoForP2chttp://code.google.com/p/krank/wiki/CreatingSampleDatabaseForCodegenC...http://code.google.com/p/krank/wiki/UsingCodeGenEarly

RickHigh

unread,
Jan 26, 2009, 6:16:20 AM1/26/09
to Crank Developer Support
We have a case sensitivity issue.... Damn inconsistent JDBC driver....

Check out pkTableName and then the list of available tables....

fkName=FK_EMP_ID fkTableName=ROLE_EMPLOYEE pkName=EMP_ID
pkTableName=employee
Available table names = ["DEPARTMENT", "EMPLOYEE", "ROLE",
"ROLE_EMPLOYEE"]

See that pkTableName=employee does not match EMPLOYEE and that is the
problem for Many To One (M to 1)

I made some progress on Windows. I fixed the above problem. I got the
Employee to Department to reverse, but the Role to Employee (M to M)
and Employee to Role (M to M) and Department to Employee (1 to M) are
not workings. More debugging needs to be done.
> > started working on it again)http://code.google.com/p/krank/wiki/ProgressCodeGeneratorhttp://code....

RickHigh

unread,
Feb 2, 2009, 9:41:37 PM2/2/09
to Crank Developer Support
The code generator now works on Windows! I fixed the case sensitivity
issues.
Whew!
Reply all
Reply to author
Forward
0 new messages