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>
      <groupId>net.sourceforge.jtds</groupId>
      <artifactId>jtds</artifactId>
      <version>1.2</version>
      <scope>compile</scope>  
  </dependency>
</dependencies>
...
</project>

Unless I redeclare the dependency to jtds in the plugin declaration like
this
<build>
  <plugins>
    <plugin>
       ...
      <dependencies>
        <dependency>
           <groupId>net.sourceforge.jtds</groupId>
           <artifactId>jtds</artifactId>
           <version>1.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]

Reply via email to