You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "Asmann, Roland" <Ro...@adesso.at> on 2012/02/19 16:22:31 UTC

Generating resources based on classes

Hi all,

I want to generate a couple of resources based on the classes I have in 
my project. Therefor, I have 2 questions:
- How do I get the classpath for the plugin correct? I need access to my 
classes and it's dependencies.
- In which phase should I put this plugin? The phase I would normally 
use (generate-resources) occurs before the actual compiling of my 
classes... Or should I move the compiler to an earlier phase?

The point is, I need to access the classes from 'src/main/java', and I 
figured the easiest way would be to access them after they have been 
compiled, so I can just trigger methods on them like any normal java object.

Thanks,
Roland

-- 
Roland Asmann
Senior Software Engineer

adesso Austria GmbH
Floridotower 26. Stock              T +43 1 2198790-27
Floridsdorfer Hauptstr. 1           F +43 1 2198790-927
A-1210 Wien                         M +43 664 88657566
                                    E roland.asmann@adesso.at
                                    W www.adesso.at

-------------------------------------------------------------
             >>> business. people. technology. <<<
-------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Generating resources based on classes

Posted by "Asmann, Roland" <Ro...@adesso.at>.
Thanks Wayne, I'll give those a look.


On 24-02-12 18:01, Wayne Fay wrote:
>> I want to generate a couple of resources based on the classes I have in
>> my project. Therefor, I have 2 questions:
>> - How do I get the classpath for the plugin correct? I need access to my
>> classes and it's dependencies.
>> - In which phase should I put this plugin? The phase I would normally
>> use (generate-resources) occurs before the actual compiling of my
>> classes... Or should I move the compiler to an earlier phase?
>
> Can you think of any other plugins that need similar behavior? If so,
> you can look at those plugins to see how they are doing the same
> thing. Perhaps jaxb or jaxws or similar plugins would be a place to
> start.
>
> Wayne
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>

-- 
Roland Asmann
Senior Software Engineer

adesso Austria GmbH
Floridotower 26. Stock              T +43 1 2198790-27
Floridsdorfer Hauptstr. 1           F +43 1 2198790-927
A-1210 Wien                         M +43 664 88657566
                                    E roland.asmann@adesso.at
                                    W www.adesso.at

-------------------------------------------------------------
             >>> business. people. technology. <<<
-------------------------------------------------------------

Re: Generating resources based on classes

Posted by Wayne Fay <wa...@gmail.com>.
> I want to generate a couple of resources based on the classes I have in
> my project. Therefor, I have 2 questions:
> - How do I get the classpath for the plugin correct? I need access to my
> classes and it's dependencies.
> - In which phase should I put this plugin? The phase I would normally
> use (generate-resources) occurs before the actual compiling of my
> classes... Or should I move the compiler to an earlier phase?

Can you think of any other plugins that need similar behavior? If so,
you can look at those plugins to see how they are doing the same
thing. Perhaps jaxb or jaxws or similar plugins would be a place to
start.

Wayne

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org