Plugin not using project dependencies

2006-08-11 Thread kapadia

All,

I'm having a problem where the plugins are not using the project-level
dependencies.  I have to redeclare the dependency within the
plugin.../plugin for it to find the classes it needs.  I would like to
have the dependency declared once for the project and have the plugins see
these dependencies.

For example, I'm using the sql-maven-plugin to execute some sql statements.
It needs a database driver to be able to do this :)  I have declared a
dependency on the jtds jar at the top of my pom.xml, like this:

project
...
dependencies
  ...
  dependency
  groupIdnet.sourceforge.jtds/groupId
  artifactIdjtds/artifactId
  version1.2/version
  scopecompile/scope  
  /dependency
/dependencies
...
/project

Unless I redeclare the dependency to jtds in the plugin declaration like
this
build
  plugins
plugin
   ...
  dependencies
dependency
   groupIdnet.sourceforge.jtds/groupId
   artifactIdjtds/artifactId
   version1.2/version
/dependency
 /dependencies
 executions
  
 /executions
   /plugin
  /plugins
/build

the plugin doesn't work.  When the plugin executes, I get  Driver class not
found: net.sourceforge.jtds.jdbc.Driver.  If I redeclare the plugin as
shown above, then it works.

Can anybody shed some light on this?

Thank your for your time,
Sujan 
-- 
View this message in context: 
http://www.nabble.com/Plugin-not-using-project-dependencies-tf2091709.html#a5765700
Sent from the Maven - Users forum at Nabble.com.


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



Re: Plugin not using project dependencies

2006-08-11 Thread kapadia

All,

If anyone can shed light on this problem I would appreciate it.  I would
rather not redeclare the dependencies in my plugin section if the project
(pom) already has declared them at the top.

Thanks,
Sujan



kapadia wrote:
 
 All,
 
 I'm having a problem where the plugins are not using the project-level
 dependencies.  I have to redeclare the dependency within the
 plugin.../plugin for it to find the classes it needs.  I would like to
 have the dependency declared once for the project and have the plugins see
 these dependencies.
 
 For example, I'm using the sql-maven-plugin to execute some sql
 statements. It needs a database driver to be able to do this :)  I have
 declared a dependency on the jtds jar at the top of my pom.xml, like this:
 
 project
 ...
 dependencies
   ...
   dependency
   groupIdnet.sourceforge.jtds/groupId
   artifactIdjtds/artifactId
   version1.2/version
   scopecompile/scope  
   /dependency
 /dependencies
 ...
 /project
 
 Unless I redeclare the dependency to jtds in the plugin declaration like
 this
 build
   plugins
 plugin
...
   dependencies
 dependency
groupIdnet.sourceforge.jtds/groupId
artifactIdjtds/artifactId
version1.2/version
 /dependency
  /dependencies
  executions
   
  /executions
/plugin
   /plugins
 /build
 
 the plugin doesn't work.  When the plugin executes, I get  Driver class
 not found: net.sourceforge.jtds.jdbc.Driver.  If I redeclare the plugin
 as shown above, then it works.
 
 Can anybody shed some light on this?
 
 Thank your for your time,
 Sujan 
 

-- 
View this message in context: 
http://www.nabble.com/Plugin-not-using-project-dependencies-tf2091709.html#a5767675
Sent from the Maven - Users forum at Nabble.com.


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