Re: m2, xdoclet and generate-sources problem

Jörg Schaible <[email protected]>
Newsgroups gmane.comp.java.xdoclet.user,gmane.comp.jakarta.tomcat.user
Message-ID <F0D7281DAB048B438E8F5EC4ECEFBDDCE4F9FD__13946.5100518011$1154991226$gmane$org@esmail.elsag.de>
Hi Marco,

Marco Mistroni wrote on Monday, August 07, 2006 3:53 PM:

> hi all,
>  i have a multiproject where 2 of the subprojects have to run
> xdoclet plugin
> in order to generate
> local interfaces, ddescriptors etc..
> 
> for some weird reasons, the generate-sources goal works only on one
> of them.. 
> 
> i have
> 
> myProject
>     |____ EJB1
>     |____ EJB2
> 
> both poms have generate-sources goal, but when i launch the pom from
> myProject, it actually generates sources only for EJB1. 

No, source for both EJBs are generated, but you find anything in the EJB1 component ...

> HTIS
> HAPPENS only
> for generation of local/remove interaces, since deployment
> descriptors gets successfully generated.

Because the subtasks define a destdir attribute.

> I tried various trial to see if it wa smy fault of
> incorrecting use xdoclet
> tags etc, but if i place all EJBs in either EJB1 or EJB2,
> everything works
> fine.
> Having ejb in both directory though, as i said, results in
> local/remove interraces being generated only in the first project
> being invoked 
> 
> here' s my pom.xml (it is exactly the same for build phase of
> both projects
> 
> <plugins>
>       <plugin>
>         <groupId>org.codehaus.mojo</groupId>
>         <artifactId>xdoclet-maven-plugin</artifactId>        
>           <executions> <execution>
>             <phase>generate-sources</phase>
>             <goals>
>               <goal>xdoclet</goal>
>             </goals>
>             <configuration>
>               <tasks>
>                 <ejbdoclet
> 
> destDir="${project.build.directory}/generated-sources/xdoclet"       
>             " excludedTags="@author,@version">
>                 <fileset
>                     dir="src/main/java"
>                     includes="**/*Bean.java" />
>                 <entitycmp />
>                 <homeinterface >
>                         <!-- <packagesubstitution packages="session"
>                           substituteWith="interfaces"
> useFirst="  true"/>
> -->
>                 </homeinterface>
>                 <localinterface/>
>                 <localhomeinterface/>
>                 <remoteinterface/>
>                 <deploymentdescriptor
> 
> destDir="${project.build.directory}/META-INF"/>
>                     <jboss version="3.2"
> 
> destDir="${project.build.directory}/META-INF"/>
>                  </ejbdoclet>
>               </tasks>
>             </configuration>
>           </execution>
>         </executions>
>       </plugin>
> 
> 
> anyone knows anything about that?

define the destdir attribute for all subtasks, so that the destdir attribute of the ejbdoclet is completely ignored.

Reference:
http://jira.codehaus.org/browse/MOJO-265
http://opensource.atlassian.com/projects/xdoclet/browse/XDT-1505

- Jörg

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.