On Saturday, July 10, 2004, at 05:33 AM, Eric Pugh wrote:

Hi all,

Can we add maven.gen.src=${maven.build.dest}/generated-sources?

I've been doing a bunch of work with the Hibernate, Xdoclet, and Eclipse
plugins for a client. One of the challenges we had was getting source code
generated via the Xdoclet and Hibernate plugins to play nice w/ a normal
Maven build as well as using it within Eclipse. Eclipse is their primary
environment for their developers, so Maven had to play nice with Eclipse.


The biggest challenge was getting various generated code bits into the
/target directory. When we put files in /target/classes and then ran builds
in Eclipse the /target/classes directory would be completely cleaned, and
wiped out the generated code that was needed.


After chatting with JvZ, I added to the Eclipse plugin the ability to add as
seperate source directories anything in ${maven.gen.src}. So, after
generating hibernate mapping files and a ddl I would have:
/target/generated-sources/xdoclet
/target/generated-sources/schema

Shouldn't this be
/target/generated-sources/hibernate? I don't know if hibernate is generating something or only xdoclet, nor the content of schema.


I think total confusion will result unless the directory is clearly labeled with the name of the tool that generated the source.

Since tools such as xdoclet may generate several kinds of source artifacts, perhaps having another level of directories would be wise:

/target/generated-sources/xdoclet/java
/target/generated-sources/xdoclet/ejb

thanks
david jencks



and they would each be a source folder in Eclipse. Works great. However,
because maven.gen.src is defined in the Eclipse plugin only, you have to
specify for the hibernate and xdoclet plugins the full path to generate
source into. It would be much simpler if maven.gen.src worked the same way
that maven.build.dest and other properties like that work.


Eric


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to