maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Adrian Shum" <>
Subject RE: Generating resource base on compilation result
Date Wed, 04 Aug 2010 02:28:37 GMT
Hi Jesse,

Breaking out another dummy project will be my last resort, coz I also
want to make this
mojo works for simple projects.

Seems the "difficult if not imposssible" way is my only way to go  :(

Maybe what if I change my question to another way:
Is there any way to add resource to resulting jar, apart from
project.addResource() before
the process-resources phase?

Best Regards,

-----Original Message-----
From: Jesse Farinacci [] 
Sent: Tuesday, August 03, 2010 8:09 PM
To: Maven Users List
Subject: Re: Generating resource base on compilation result

Hi AdRiAN,

On Tue, Aug 3, 2010 at 6:53 AM, Adrian Shum <> wrote:
> I am trying to develop a plugin which will generate certain resources 
> base on compiled classes and dependencies.


> Is there any suggestion for me?

You could quite easily solve this if you just create another module
which depends on your domain object module. Then run your classpath
scanning for @Entity / @Embedded, etc, and output a persistence.xml.
Trying to do this process in the same module without using APT *and*
using the compiled classes will be difficult if not impossible. If you
wanted to simply examine the source code and the dependency classpath,
maybe it would work. But since you're oddly requiring compiled code, I'm
fairly sure it will not.

Just break it into separate modules and all will be fine. Or use APT.


There are 10 types of people in this world, those
that can read binary and those that can not.

To unsubscribe, e-mail:
For additional commands, e-mail:

This email is confidential. If you are not the intended recipient, please delete it from your
system and notify the sender immediately. Any unauthorized use, disclosure, dissemination
or copying of this email is prohibited. Taifook Securities Group, its group companies and
their content providers ("Parties") shall not be responsible for the accuracy or completeness
of this email or its attachment, if any, which could contain virus, be corrupted, destroyed,
incomplete, intercepted, lost or arrive late.   The Parties do not accept liability for any
damage caused by this email.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message