Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Not A Bug
-
Affects Version/s: 1.2
-
Fix Version/s: 1.6
-
Component/s: None
-
Labels:None
-
Environment:Fedora
-
Testcase included:yes
-
Number of attachments :
Description
I'm trying to run xdoclet in ant build file called from antrun plugin. The build file is very simple:
<project name="testcase" default="run"> <property name="maven.repository" value="set repository location here!"/> <property name="destdir" value="target/generated-sources"/> <path id="xdoclet.classpath"> <fileset dir="${maven.repository}"> <include name="commons-collections/commons-collections/3.1/commons-collections-3.1.jar"/> <include name="commons-logging/commons-logging/1.0.4/commons-logging-1.0.4.jar"/> <include name="jboss/jboss-j2ee/4.0.2/jboss-j2ee-4.0.2.jar"/> <include name="xjavadoc/xjavadoc/1.1/xjavadoc-1.1.jar"/> <include name="xdoclet/xdoclet/1.2.3/xdoclet-1.2.3.jar"/> <include name="xdoclet/xdoclet-ejb-module/1.2.3/xdoclet-ejb-module-1.2.3.jar"/> </fileset> </path> <target name="run"> <!-- print classplath --> <property refid="xdoclet.classpath" name="cp"/> <echo message="xdoclet.classpath: ${cp}"/> <!-- define ejbdoclet task --> <taskdef classname="xdoclet.modules.ejb.EjbDocletTask" classpathref="xdoclet.classpath" name="ejbdoclet"/> <!-- run ejbdoclet --> <ejbdoclet destdir="${destdir}"> <fileset includes="**/*Bean.java" dir="${basedir}/src/main/java"/> <remoteinterface/> </ejbdoclet> </target> </project>
When executed directly from command (ant -Dmaven.repository=/home/javor/.m2/repository) it works fine. But fails when embedded in antrun:
<plugin> <artifactId>maven-antrun-plugin</artifactId> <version>1.2-SNAPSHOT</version> <executions> <execution> <phase>generate-sources</phase> <goals> <goal>run</goal> </goals> <configuration> <tasks> <ant inheritRefs="true" inheritall="true" antfile="build.xml"> <property name="maven.repository" value="${settings.localRepository}"/> </ant> </tasks> </configuration> </execution> </executions> </plugin>
Maven output:
...
[INFO] [antrun:run {execution: default}]
[INFO] Executing tasks
run:
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error executing ant tasks
Embedded error: The following error occurred while executing this line:
/home/javor/workspace/testcase/build.xml:26: Can't create a remoteinterface element under ejbdoclet. Make sure the jar file containing the corresponding subtask class is on the classpath specified in the <taskdef> that defined {2}.
...
Could you show me any workaround or put a bit of light on that problem?
Attachments
Issue Links
| This issue relates to: | ||||
| MANTRUN-37 | Antrun breaks when using xdoclet plugin |
|
|
|
| This issue is related to: | ||||
| MANTRUN-59 | Taskdef/Typedef and Plugin dependencies |
|
|
|
when set refid="maven.plugin.classpath" in taskdef,
maven throws this error
Reference maven.plugin.classpath not found.