Add the build-helper-maven-plugin to your project's POM. This may look 
something like this:

 65             <plugin>
 66                 <groupId>org.codehaus.mojo</groupId>
 67                 <artifactId>build-helper-maven-plugin</artifactId>
 68                 <version>1.1</version>
 69                 <executions>
 70                     <execution>
 71                         <id>add-source</id>
 72                         <phase>generate-sources</phase>
 73                         <goals>
 74                             <goal>add-source</goal>
 75                         </goals>
 76                         <configuration>
 77                             <sources>
 78 <source>${basedir}path/to/your/keyfile.file</source>
 79                             </sources>
 80                         </configuration>
 81                     </execution>
 82                 </executions>
 83             </plugin>

Have a look at the documentation of this plugin because in your case it 
might be better to use the 'add-resourc' goal than the 'add-source'.

However, before doing this you should check if it isn't a better choice to 
place your file below 'src/main/resources' which will make it 
automatically available in the classpath without any change to the POM.

Bernd





[email protected] wrote on 28.01.2010 13:47:32:

> [image removed] 
> 
> Adding variable in eclipse project
> 
> roberto.caldas 
> 
> to:
> 
> users
> 
> 28.01.2010 16:17
> 
> Please respond to "Maven Users List"
> 
> I am using the eclipse plugin to generate eclipse projects but I have 
this 
> project wtih a dependency that uses a key file located in a certain 
> directory. So everytime I create the project I must manually add this 
path 
> as a variable using the build path option on the project properties on 
> eclipse. How do I add this in the pom file?
> Thank you.
> 
> Roberto
> 
> This message is intended solely for the use of its addressee and may 
> contain privileged or confidential information. All information 
contained 
> herein shall be treated as confidential and shall not be disclosed to 
any 
> third party without Embraer?s prior written approval. If you are not the 

> addressee you should not distribute, copy or file this message. In this 
> case, please notify the sender and destroy its contents immediately.
> Esta mensagem é para uso exclusivo de seu destinatário e pode conter 
> informações privilegiadas e confidenciais. Todas as informações aqui 
> contidas devem ser tratadas como confidenciais e não devem ser 
divulgadas 
> a terceiros sem o prévio consentimento por escrito da Embraer. Se você 
não 
> é o destinatário não deve distribuir, copiar ou arquivar a mensagem. 
Neste 
> caso, por favor, notifique o remetente da mesma e destrua imediatamente 
a 
> mensagem.


InterComponentWare AG:  
Vorstand: Peter Kirschbauer (Vors.), Jörg Stadler / Aufsichtsratsvors.: Prof. 
Dr. Christof Hettich  
Firmensitz: 69190 Walldorf, Industriestraße 41 / AG Mannheim HRB 351761 / 
USt.-IdNr.: DE 198388516  

Reply via email to