How to add a folder to the classpath used during maven build

2011-08-31 Thread Benjamin Dreux
Hi I want to add a folder to the classpath used during the maven build (verify pase to be precise) This folder must not be in the project (not inside src or any other child) How could i add something to the classpath used my maven. I've seen solution using the pom.xml, be since the folder is not

Re: How to add a folder to the classpath used during maven build

2011-08-31 Thread Brian Topping
http://mojo.codehaus.org/build-helper-maven-plugin/add-source-mojo.html added to the verify phase might be what you are looking for? If not, there are a lot of other goals in that plugin that have similar functionality, maybe one of them is better suited. On Aug 31, 2011, at 10:34 AM, Benjamin

Re: How to add a folder to the classpath used during maven build

2011-08-31 Thread Benjamin Dreux
I'm sorry but i don't want to modify my pom I just want to change the maven parameters, or a env variable Is there a way you know to achieve this ?? 2011/8/31 Brian Topping topp...@codehaus.org: http://mojo.codehaus.org/build-helper-maven-plugin/add-source-mojo.html added to the verify phase

Re: How to add a folder to the classpath used during maven build

2011-08-31 Thread Andy Glick
Hi, I'm sorry to say it, but I believe that you aren't thinking about this from a Maven perspective. Your build is specified in your pom. There is some feature of your build that requires a reference to some artifact outside the scope of your module. The normal way to resolve this not

Re: How to add a folder to the classpath used during maven build

2011-08-31 Thread Benjamin Dreux
In fact my issue is that these property are in the environement when the war is builded. But we need this file also when the test are running. But since the file is environement dependent, i don't want to have this file staying in the repositry So i decided to add a copy of this file in the test

Re: How to add a folder to the classpath used during maven build

2011-08-31 Thread Brian Topping
That won't work. Maven keeps internal lists of these kind of things, and the plugins contribute to it. So for instance, the compiler plugin adds the location it put the compiled objects to the list. It generally doesn't make sense for these lists to be accessible outside the plugin space.

Re: How to add a folder to the classpath used during maven build

2011-08-31 Thread Andy Glick
OK, what you've told us is that this issue arises in the test phase in a build that is defined in a profile, yes? So it ought be straight forward to add a configuration for the surefire plugin to the profile in question. If you want to use the solution during the integration-test phase you

Re: How to add a folder to the classpath used during maven build

2011-08-31 Thread Wayne Fay
Since i'm using some profile for each environment, i could add some task to the profiles. You could probably hack something via profiles. But this is use of profiles should not be encouraged IMO. Instead you should create an artifact out of this folder's contents and add a proper dependency

Re: How to add a folder to the classpath used during maven build

2011-08-31 Thread Benjamin Dreux
HI, fist thanks for your interest I have a properties file that i want to keep in my environnement. This is because this way the war file is environnement independant. I put the property file in the tomcat/lib folder. But when i'm running my tests, i also need the property file, to define

Re: How to add a folder to the classpath used during maven build

2011-08-31 Thread Andy Glick
What I was attempting to recommend shouldn't cause the war file to become environment dependent, but I may not have understood. I'm assuming that you have a pom file that is executing tests, and which also produces a war file. In the test environment for the war producing module you need to

Re: How to add a folder to the classpath used during maven build

2011-08-31 Thread Wayne Fay
I have a properties file that i want to keep in my environnement. This is because this way the war file is environnement independant. I put the property file in the tomcat/lib folder. But when i'm running my tests, i also need the property file, to define things like db url ... And i