Hi,

[EMAIL PROTECTED] writes:
> 4. what does the scope value "runtime" means? I cannot think of any
> dependency that is not needed at compile time but needed at runtime.
> For example if my project depends on junit then I need junit at
> compile time for compiling my project and also I need junit at runtime
> to successfully execute my project then for this example what does
> "runtime" means?

As I understand it, this means that the dependency is included only at
runtime. It makes sense for libraries which your app doesn't need to use
when compiling, but will need when run. For example, an app which uses
JDBC to access a MySQL database will not need the MySQL JDBC driver at
compile time (or any JDBC driver for that matter), but will need it at
run time (or else you will get a ClassNotFoundException when loading the
JDBC driver).

Same thing goes for test -- you might have a database unit test (such as
a DBUnit test) that accesses a test HSQL database, but the actual app
uses PostgreSQL. Therefore, you will want to add a dependency to the
HSQL driver with scope=test, and a dependency to the PostgreSQL driver
with scope=runtime.

-- 
JM Ibanez
Software Architect
Orange & Bronze Software Labs, Ltd. Co.

[EMAIL PROTECTED]
http://software.orangeandbronze.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to