You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Guillaume Boucherie <gu...@gmail.com> on 2007/10/02 11:14:23 UTC
[maven2 antrun plugin] problem with classpath
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
Re: [maven2 antrun plugin] problem with classpath
Posted by Guillaume Boucherie <gu...@gmail.com>.
Hi,
Ok it's finally works fine.
I'm just use the 1.0-beta-1-SNAPSHOT version because the versions in central
repository doesn't work for me.
Thanks
--
CletteBou
clettebou.miniville.fr
2007/10/3, Tim Kettler <ti...@udo.edu>:
>
> Hi,
>
> I can reproduce the problem but have no clue either what the root cause
> could be. Howerver, it's working for me with the xdoclet-maven-plugin
> [1] from the mojo project:
>
> <plugin>
> <groupId>org.codehaus.mojo</groupId>
> <artifactId>xdoclet-maven-plugin</artifactId>
> <executions>
> <execution>
> <phase>process-resources</phase>
> <goals>
> <goal>xdoclet</goal>
> </goals>
> <configuration>
> <tasks>
> <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>
> </execution>
> </executions>
> </plugin>
>
> -Tim
>
> [1] http://mojo.codehaus.org/xdoclet-maven-plugin/
>
> Guillaume Boucherie schrieb:
> > 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.
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
Re: [maven2 antrun plugin] problem with classpath
Posted by Tim Kettler <ti...@udo.edu>.
Hi,
I can reproduce the problem but have no clue either what the root cause
could be. Howerver, it's working for me with the xdoclet-maven-plugin
[1] from the mojo project:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>xdoclet-maven-plugin</artifactId>
<executions>
<execution>
<phase>process-resources</phase>
<goals>
<goal>xdoclet</goal>
</goals>
<configuration>
<tasks>
<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>
</execution>
</executions>
</plugin>
-Tim
[1] http://mojo.codehaus.org/xdoclet-maven-plugin/
Guillaume Boucherie schrieb:
> 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.
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org