You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "J. Matthew Pryor" <jm...@yahoo.com> on 2003/12/01 06:59:11 UTC
xdoclet plugin and multiple java source directories
I am pretty sure this one is for the xdoclet
developers but I am wondering
if anyone here has come across this.
I am writing an AndroMDA maven plugin. Its working
well, but I am having
trouble when it comes time to run xdoclet on the
AndroMDA generated code
AndroMDA generates 2 kinds of files. One that can
safely be regenerated (a
base class if you like), and one that is supposed to
serve as a template
that is generated once and then hand edited thereafter
Usually this is done into 2 different directory
structures
The base classes I want to generate into
${maven.build.dir}/genarc/java and
the other files into ${maven.src.dir}/java/main
Now the problem comes from 2 places
a) pom.build.sourceDirectory only has a single root
b) all the xdoclet plugin jelly code assumes that the
directory for supplied
filesets is ${pom.build.sourceDirectory}
<j:set var="fileset_index" value="0"/>
<j:forEach begin="0" end="10"
indexVar="fileset_index">
<j:set var="fileset_index_var_name"
value="maven.xdoclet.webdoclet.fileset.${fileset_index}"/>
<j:if
test="${context.getVariable(fileset_index_var_name) !=
null}">
<fileset
dir="${pom.build.sourceDirectory}">
<j:set
var="fileset_index_include_var_name"
value="maven.xdoclet.webdoclet.fileset.${fileset_index}.include"/>
<j:set
var="fileset_index_exclude_var_name"
value="maven.xdoclet.webdoclet.fileset.${fileset_index}.exclude"/>
<j:if
test="${context.getVariable(fileset_index_include_var_name)
!= null}">
<include
name="${context.getVariable(fileset_index_include_var_name)}"/>
</j:if>
<j:if
test="${context.getVariable(fileset_index_exclude_var_name)
!= null}">
<exclude
name="${context.getVariable(fileset_index_exclude_var_name)}"/>
</j:if>
</fileset>
</j:if>
</j:forEach>
So I could create my own xdoclet maven plugn and allow
the dir to be
specified
i.e.
maven.xdoclet.webdoclet.fileset.0=true
maven.xdoclet.webdoclet.fileset.0.dir=${maven.build.dir}/genarc/java
maven.xdoclet.webdoclet.fileset.0.include=**/*Servlet.java
That would be nice, and I'll try & get the xdoclet
folks to make that change
to the xdoclet plugin.jelly file
But how generally do people deal with generated Java
code, especially when
there are 2 levels of generation
1. AndroMDA
2. XDoclet
Right now I get my AndroMDA plugin to add the output
folders to the
'maven.compile.src.set'
<maven:addPath id="maven.compile.src.set"
refid="andromda.java.compile.src.set.${subelement_index}"/>
Anyway I'd appreciate any advice people care to pass
on
Thanks,
Matthew
__________________________________
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org