${project.parent.basedir} not working inside resources

2011-12-15 Thread Jan Bernhardt
Hello,

I can not figer out, how to get this working...

I would like to refer a config-file resource from a parent pom directory, but 
when I insert this code to my child pom file:

build
resources
   resource
 
directory${project.basedir}/src/main/resources/directory
 filteringtrue/filtering
   /resource
   resource
 
directory${project.parent.basedir}/src/main/config/directory
 filteringtrue/filtering
   /resource
/resources
...
/build


I get the following error message

[INFO] skip non existing resourceDirectory 
C:\Users\myname\workspace\parent\child\${project.parent.basedir}\src\main\config

For some reason I do not know, this property is not replaced with the expected 
value. Any ideas?

Kind regards
Jan



Execution control for self developed maven plugins

2011-11-15 Thread Jan Bernhardt

Hi,

how can I ensure that resource filtering took place before my maven plugin is 
executed?

Background:
I wrote my own maven plugin. I used spring to wire my components together and 
set specific configuration parameters.
Now I would like to use maven properties in my spring-config.xml. I put my 
spring-config.xml into src/main/resources/ and used ${maven.property} 
placeholders.
In my plugin I now want to read the spring-config.xml which contains the values 
from my pom.xml file instead of my placeholders.
I used the following code to access this config file in my plugin:

/**
* @parameter expression=${spring.config} 
default-value=${project.build.outputDirectory}${file.separator}spring-config.xml
* @required
*/
private String config;


But because the target sources have not been generated yet, I get a 
FileNotFoundException when I try to read this config file.
I read something about an @execute Annotation which executes another plugin 
first, before executing the current plugin. But I don't know how to set it 
right, that filtering takes place before my plugin is executed. I tried, but it 
didn't work:

@execute goal=resources:resources

Kind regards
Jan


Jan Bernhardt, M.Sc., +49 (228) 76 37 76 - 15, Talend, global leader in Open 
Source Integration



[Description: sig_businesscard]http://www.talend.com/JANBER.vcf[Description: 
sig_direction]http://www.talend.com/open-source-provider/contacts.php[Description:
 sig_download]http://www.talend.com/download.php?src=EmailSignature

[Description: sig_talend]http://www.talend.com/