Hi all,

I'm trying to use xdoclet for my project via the antrun plugin, but I'm
encounter problem with classpath.
I configure antrun like this:
<project>
  [...]
  <build>
    <plugins>
      <plugin>
        <artifactId>maven-antrun-plugin</artifactId>
        <executions>
          <execution>
            <phase>process-resources</phase>
            <configuration>
              <tasks>
                <property name="plugin_classpath" refid="
maven.plugin.classpath"/>
                <echo message="plugin classpath:  ${plugin_classpath}"/>
                <taskdef name="webdoclet" classname="
xdoclet.modules.web.WebDocletTask">
                  <classpath refid="maven.plugin.classpath" />
                </taskdef>
                <webdoclet destDir="${project.build.outputDirectory}">
                  <fileset dir="${project.build.sourceDirectory}">
                    <include
name="com/ideo/sweetdev/presentation/struts/tag/**/*Tag*.java" />
                  </fileset>
                  <jsptaglib taglibversion="${project.version}"
                             jspversion="1.2"
                             shortname="sweetdev-struts"
                             description="This tag library contains the
SweetDEV standard tags"
                             uri="http://www.sweetdev.com/sweetdev-struts";
                             displayname="SweetDEV"
                             smallicon="icone.jpg"
                             filename="sweetdev-struts.tld"
                  >
                  </jsptaglib>
                </webdoclet>
              </tasks>
            </configuration>
            <goals>
              <goal>run</goal>
            </goals>
          </execution>
        </executions>
        <dependencies>
          <dependency>
            <groupId>xdoclet</groupId>
            <artifactId>xdoclet-web-module</artifactId>
            <version>1.2.3</version>
          </dependency>
          <dependency>
            <groupId>xdoclet</groupId>
            <artifactId>xjavadoc</artifactId>
            <version>1.1</version>
          </dependency>
        </dependencies>
      </plugin>
    </plugins>
  [...]
</project>

And when I run phase process-resources I got this:
E:\projects\sweetdev\branches\sweetdev-maven2\sweetdev-struts>mvn
process-resources
[INFO] Scanning for projects...
[INFO]
----------------------------------------------------------------------------
[INFO] Building sweetdev-struts
[INFO]    task-segment: [process-resources]
[INFO]
----------------------------------------------------------------------------
[INFO] [enforcer:enforce {execution: enforce-java}]
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [antrun:run {execution: default}]
[INFO] Executing tasks
     [echo] plugin classpath:
  E:\tools\maven\repository-maven2\junit\junit\3.8.1\junit-3.8.1.jar;
  E:\tools\maven\repository-maven2\xdoclet\xdoclet\1.2.3\xdoclet-1.2.3.jar;
  E:\tools\maven\repository-maven2\xdoclet\xdoclet-web-module\1.2.3\xdoclet-
web-module-1.2.3.jar;

E:\tools\maven\repository-maven2\commons-logging\commons-logging\1.0.4\commons-
logging-1.0.4.jar;
  E:\tools\maven\repository-maven2\ant\ant\1.6.5\ant-1.6.5.jar;

E:\tools\maven\repository-maven2\commons-collections\commons-collections\2.1\commons-
collections-2.1.jar;

E:\tools\maven\repository-maven2\org\codehaus\plexus\plexus-utils\1.1\plexus-
utils-1.1.jar;
  E:\tools\maven\repository-maven2\ant\ant-launcher\1.6.5\ant-
launcher-1.6.5.jar;
  E:\tools\maven\repository-maven2\xdoclet\xjavadoc\1.1\xjavadoc-1.1.jar
;E:\tools\maven\maven-2.0.7\lib\maven-core-2.0.7-uber.jar
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO] Error executing ant tasks

Embedded error: Can't create a jsptaglib element under webdoclet. Make sure
the jar file containing the corresponding subtask class is on the classpath
specified in the <taskdef> that defined {2}.
[INFO]
------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 3 seconds
[INFO] Finished at: Tue Oct 02 11:00:01 CEST 2007
[INFO] Final Memory: 6M/12M
[INFO]
------------------------------------------------------------------------

I don't understand why antrun can't find the jsptaglib task as it is include
in the jar xdoclet-web-module present in the classpath !!!
Could you help me please ?
Thanks in advance.

-- 
CletteBou
clettebou.miniville.fr

Reply via email to