codegen integration into build. howto?

I'm trying to move an application from building with ant to building with IntelliJ (to have all it's cool features: debug, hotswap etc).
Currently the ant script is like this:
- compile ant task "generateComponents"
- invoke generateComponents - take some xml files and generate java files
- compile the generated java files
- compile some other java files

Is it possible to do something like this with IntelliJ (i.e. have a the code generation as part of the build like this) ?

Also, if there is no way to do it properly, do you know any workaround?

Thanks

0
Avatar
Permanently deleted user

Hello Alexander,

I'm trying to move an application from building with ant to building
with IntelliJ (to have all it's cool features: debug, hotswap etc).

Currently the ant script is like this:

- compile ant task "generateComponents"

- invoke generateComponents - take some xml files and generate java
files

- compile the generated java files

- compile some other java files

Is it possible to do something like this with IntelliJ (i.e. have a
the code generation as part of the build like this) ?


You can write a plugin using our compiler API that would invoke the code
generator. There's no way to set up such generation through the UI without
using Ant.

--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


0
Avatar
Permanently deleted user

Will it help if I move my build from ANT to MAVEN and use MAVEN's generate-sources feature? Is IntelliJ's integrated that good so to invoke the code generation properly?

0
Avatar
Permanently deleted user

Hello Alexander,

Will it help if I move my build from ANT to MAVEN and use MAVEN's
generate-sources feature? Is IntelliJ's integrated that good so to
invoke the code generation properly?


The code generation will be invoked, but your original goal of switching
to our compiler will not be fulfilled: the entire build will be done by Maven.

--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


0

请先登录再写评论。