Hi Roland,

does this pattern/recipe change if both resources and Java classes would
be generated in the same directory. I have tried this a few days ago
(trying to automate a few things for the castor-maven-plugin), and it
seems like this does not really work.

Assume you have a directory where you'll find ....

- A.java
- B.java
- .castor.cdr

where the last is a resource file. If I use above code snippets, I can
see in the target folder after a plugin run and subsequent compilation
the compiled Java classes, the resource file and the source files.

How can I avoid the source files to be copy across ?

Regards
Werner

Roland Asmann wrote:
> Assuming you already have the maven-project as a variable in your plugin (if 
> not, add it!):
> 
> project.addCompileSourceRoot("your output directory here");
> 
> 
> And in the case of resources:
> 
> Resource resource = new Resource();
> resource.setDirectory("your output directory here");
> resource.addInclude("**/*");
> project.addResource(resource);
> 
> 
> 
> On Thursday 01 October 2009 13:59, Lewis, Eric wrote:
>> Hi
>>
>> I'm writing a plugin which generates resources and also test resources.
>> How in my plugin can I add these directories to the sources paths and the
>> test resources paths? (Except for using the build-helper plugin)
>>
>> Best regards,
>> 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