You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Slavic Chernyak <mr...@gmail.com> on 2007/03/24 04:41:50 UTC

Partial compile during generate-sources phase

I'm working on a plugin to automate a visual age tool that generates java
classes from cobol copybooks (ibm record framework).  We still have a bunch
of applications that use this and everytime there is a copybook change
somebody needs to startup visual age and go through the gui to generate java
files.  I'm trying to automate this process as part of our build with a
maven plugin.
The process is done in 2 steps:
1. Generate a RecordType java file
2. Generate a Record java file
Step 2 requires the compiled class from step 1.  The problem I'm running
into is figuring out how to use maven lifecycle to accomplish this.  Both
steps generate source files, so it would seem that generate-source should be
used.  However, I need the compile phase to run before i generate the source
in step 2...  Is there a way to force the compile phase to run from the
plugin without advancing the overall lifecycle?  Hope that question makes
sense... Basically I want to generate some source files, compile them, have
them available on the classpath, then generate more source files (leveraging
the compiled classes), and after my plugin has completed it's work, have the
build process continue from the generate-sources phase.

Thanks