You cannot explicitly add the webdoclet dependency to the webdoclet taskdef because the xdoclet plugin does not list the webdoclet dependency in its project.xml file. As I said, you must add the webdoclet dependency to your OWN project.xml which then becomes part of maven.dependency.classpath. This will allow the webdoclet taskdef to find what it needs.
If you want to explicitly add the webdoclet dependency to the webdoclet taskdef, you must add the dependency to the plugin's project.xml. However, I recommend against modifying your plugin when a workaround is possible, as in this case. Updating the xdoclet plugin in this manner should be posted as a JIRA issue (if that's appropriate for the xdoclet plugin). > -----Original Message----- > From: Ravi Hegde [mailto:[EMAIL PROTECTED] > Sent: Friday, January 21, 2005 3:07 AM > To: Maven Users List > Subject: RE: Xdoclet web module classpath > > Adding the web module dependency path in the webdoclet > taskdef's classpath does not help because maven throws > up at the taskdef level itself. If at all it is > possible to add the module jar to the classpath, it > should be before the taskdef. I tried a preGoal to > xdoclet:webdoclet and that also did not help. Any > other technique possible ? > > Thanks for the help :) > > --- Charles Daniels <[EMAIL PROTECTED]> wrote: > > > If you look at the webdoclet taskdef in the xdoclet > > plugin's > > plugin.jelly file, you will find the following: > > > > <taskdef name="webdoclet" > > classname="xdoclet.modules.web.WebDocletTask"> > > <classpath> > > <path refid="maven.dependency.classpath"/> > > <pathelement > > > path="${plugin.getDependencyPath('xdoclet:xdoclet')}"/> > > <pathelement > > > path="${plugin.getDependencyPath('xdoclet:xjavadoc')}"/> > > <pathelement > > > path="${plugin.getDependencyPath('xdoclet:xdoclet-xdoclet-module')}"/> > > <pathelement > > > path="${plugin.getDependencyPath('commons-collections:commons- > collection > > s')}"/> > > <pathelement > > > path="${plugin.getDependencyPath('commons-logging:commons-logg > ing')}"/> > > <pathelement > > path="${plugin.getDependencyPath('log4j:log4j')}"/> > > </classpath> > > </taskdef> > > > > Because of the way the classpath is formed, you must > > include the > > xdoclet-web-module dependency in your own > > project.xml file because > > maven.dependency.classpath includes only those > > dependencies from your > > project.xml, not any of the dependencies from the > > plugin's project.xml. > > Dependencies from the plugin are included (as you > > can see above) by > > using plugin.getDependencyPath(dependency). Notice > > that there is no > > explicit reference to the xdoclet:webdoclet > > dependency, which is why you > > must include it in your own project.xml. Seems odd > > to me that the > > xdoclet:webdoclet dependency is not explicit, which > > would eliminate the > > need for you to specify it in your own project.xml. > > Oh well. > > > > > -----Original Message----- > > > From: Ravi Hegde [mailto:[EMAIL PROTECTED] > > > Sent: Thursday, January 20, 2005 8:34 AM > > > To: [email protected] > > > Subject: Xdoclet web module classpath > > > > > > I was using xdoclet:webdoclet goal by adding the > > > following dependency to my project.xml. > > > > > > <dependency> > > > <groupId>xdoclet</groupId> > > > <artifactId>xdoclet-web-module</artifactId> > > > <version>1.2</version> > > > <url>http://xdoclet.sf.net/</url> > > > </dependency> > > > > > > To avoid adding this dependency to each of my > > > projects, I tried to add this dependency in the > > > project.xml of xdoclet plug-in. It is not working > > - I > > > get the error > > > > > > taskdef class xdoclet.modules.web.WebDocletTask > > cannot > > > be found > > > > > > But, printing the plugin dependency classpath > > before > > > the xdoclet:webdoclet goal by using a preGoal as > > shown > > > below prints xdoclet-web-module-1.2.jar with > > proper > > > path. > > > > > > <preGoal name="xdoclet:webdoclet"> > > > <echo message="***>> Dependency classpath = > > > ${plugin.getDependencyClasspath()}"/> > > > </preGoal> > > > > > > Does that mean xdoclet-web-module-1.2.jar is in > > > plug-in's classpath and still the taskdef does not > > > find it ? Any clue(s) will be of great help. > > > > > > > > > > > > > > > __________________________________ > > > Do you Yahoo!? > > > Read only the mail you want - Yahoo! Mail > > SpamGuard. > > > http://promotions.yahoo.com/new_mail > > > > > > > > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: > > [EMAIL PROTECTED] > > > For additional commands, e-mail: > > [EMAIL PROTECTED] > > > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: > > [EMAIL PROTECTED] > > For additional commands, e-mail: > > [EMAIL PROTECTED] > > > > > > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
