You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Libor Kramoliš <li...@corpus.cz> on 2005/03/24 10:11:28 UTC

How to distinguish compile, test and runtime dependency?

Hello.

Image I work on webapp ABC. The application connects to XYZ database and 
use JUnit for testing. Now I have to specify dependency on 
jdbc2_0-stdext.jar, jdbc-xyz.jar and junit.jar.

And now I would like to say SRC is compiled just with jdbc2_0-stdext.jar 
(I do not want to have jdbc-xyz.jar and junit.jar on classpath) and TEST 
is compiled with jdbc2_0-stdext.jar and junit.jar. Dependency on 
jdbc-xyz.jar is here to be bundled in final .war file, it should never 
be on classpath.

Is it posible to configure this in project.xml or is Maven going to 
support it in next release(s)?

Best regards,
-libor


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: How to distinguish compile, test and runtime dependency?

Posted by Brett Porter <br...@gmail.com>.
This will only be supported from Maven 2.x onwards.

- Brett


On Thu, 24 Mar 2005 10:11:28 +0100, Libor Kramoliš
<li...@corpus.cz> wrote:
> Hello.
> 
> Image I work on webapp ABC. The application connects to XYZ database and
> use JUnit for testing. Now I have to specify dependency on
> jdbc2_0-stdext.jar, jdbc-xyz.jar and junit.jar.
> 
> And now I would like to say SRC is compiled just with jdbc2_0-stdext.jar
> (I do not want to have jdbc-xyz.jar and junit.jar on classpath) and TEST
> is compiled with jdbc2_0-stdext.jar and junit.jar. Dependency on
> jdbc-xyz.jar is here to be bundled in final .war file, it should never
> be on classpath.
> 
> Is it posible to configure this in project.xml or is Maven going to
> support it in next release(s)?
> 
> Best regards,
> -libor
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: How to distinguish compile, test and runtime dependency?

Posted by Andrew Thornton <an...@caret.cam.ac.uk>.
Libor Kramoliš wrote:
> Image I work on webapp ABC. The application connects to XYZ database and 
> use JUnit for testing. Now I have to specify dependency on 
> jdbc2_0-stdext.jar, jdbc-xyz.jar and junit.jar.
> 
> And now I would like to say SRC is compiled just with jdbc2_0-stdext.jar 
> (I do not want to have jdbc-xyz.jar and junit.jar on classpath) and TEST 
> is compiled with jdbc2_0-stdext.jar and junit.jar. Dependency on 
> jdbc-xyz.jar is here to be bundled in final .war file, it should never 
> be on classpath.
> 
> Is it posible to configure this in project.xml or is Maven going to 
> support it in next release(s)?

Don't whether this is what you want or not, but if you split the webapp 
into two sub-projects, one containing the src/java bits and another 
containing the src/webapp bits, you then get to list the dependencies 
indpendently.

andy

-- 
Andrew Thornton
andrew@caret.cam.ac.uk

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org