RE: How to load a class in a Mojo?

2011-07-17 Thread Robert Scholte
It is less complex, it´s just like any other java-project:this.getClass().getResourceAsStream( name ) this.getClass().getResource( name ); The @requiresDependencyResolution is about which dependecies should be available for this class, based on their scope. -Robert Date: Sat, 16 Jul 2011

Re: How to load a class in a Mojo?

2011-07-17 Thread Hilco Wijbenga
On 17 July 2011 02:53, Robert Scholte rfscho...@codehaus.org wrote: It is less complex, it´s just like any other java-project:this.getClass().getResourceAsStream( name ) this.getClass().getResource( name ); That's what I started with but both give me a NULL. Just to make sure I've given you

RE: How to load a class in a Mojo?

2011-07-17 Thread Robert Scholte
Don't you think it's a bit weird to run the maven-compiler-plugin:compile during the generate-sources phase? Try to keep this as they were meant to:- generate sources during the generate-sources phase- compile the sources during the compile phase.(within a few months you won't understand this

Re: How to load a class in a Mojo?

2011-07-17 Thread Hilco Wijbenga
On 17 July 2011 11:48, Robert Scholte rfscho...@codehaus.org wrote: Don't you think it's a bit weird to run the maven-compiler-plugin:compile during the generate-sources phase? Try to keep this as they were meant to:- generate sources during the generate-sources phase- compile the sources

Re: How to load a class in a Mojo?

2011-07-17 Thread Benson Margulies
Could you post a (non)working example on github for others to debug at? On Sun, Jul 17, 2011 at 4:22 PM, Hilco Wijbenga hilco.wijbe...@gmail.com wrote: On 17 July 2011 11:48, Robert Scholte rfscho...@codehaus.org wrote: Don't you think it's a bit weird to run the maven-compiler-plugin:compile