You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Gaute Lote <ga...@gmail.com> on 2006/12/19 16:50:09 UTC

Maven 2 and xdoclet with Spring AbstractStateLessSessionBean

Hi,

seems like it was missing dependencies that
caused xdoclet or the xdoclet-plugin to fail generating sources for
Beans extending Springs AbstractStateLessSessionBean


I got it to work with this:

<plugin>
<artifactId>xdoclet-maven-plugin</artifactId>
<groupId>org.codehaus.mojo</groupId>
<dependencies>
<dependency>
<groupId>xdoclet</groupId>
<artifactId>xjavadoc</artifactId>
<version>1.1</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring</artifactId>
<version>1.2.8</version>
</dependency>
<dependency>
<groupId>ant</groupId>
<artifactId>ant</artifactId>
<version>1.6.5</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.1</version>
<scope>runtime</scope>
</dependency>
</dependencies>
<executions>
<execution>
<id>ejbdoclet</id>
<phase>generate-sources</phase>
<goals>
<goal>xdoclet</goal>
</goals>
<configuration>
<generatedSourcesDirectory>${project.build.directory
}/generated-sources/ejbdoclet</generatedSourcesDirectory>
<tasks>
<ejbdoclet force="true" ejbSpec="2.1" verbose="true" destDir="${
project.build.directory}/generated-sources/java">
<fileset dir="${project.build.sourceDirectory}">
<include name="**/*Bean.java"/>
</fileset>
<remoteinterface/>
<homeinterface/>
<localinterface/>
<localhomeinterface/>
<mdb/>
<utilobject cacheHomes="yes"/>
<deploymentdescriptor destdir="${src}/META-INF"/>
<weblogic destdir="${src}/META-INF" xmlencoding="UTF-8" validatexml="true"/>
<packageSubstitution packages="ejb" substituteWith="interfaces"/>
</ejbdoclet>
</tasks>
</configuration>
</execution>
</executions>
</plugin>

and this for adding the generated source to the compilers sourcepath:

<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<id>add-source</id>
<phase>generate-sources</phase>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>${project.build..directory}/generated-sources/java</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>


---------- Forwarded message ----------
From: Gaute Lote <ga...@gmail.com>
Date: Dec 12, 2006 4:14 PM
Subject: Maven 2 and xdoclet
To: users@maven.apache.org

Hi,

I'm trying to get xdoclet to work with maven, but it won't generate source
for some of my beans.
The beans it won't generate source for all have this tag

* @ejb.env-entry name="ejb/BeanFactoryPath" type=" java.lang.String"
* value="applicationContext.xml"

I'm trying to port from an extisting ant build which uses xdoclet
1.2.3which generates code for all the beans, but for som reason
this fails with maven.

My xdoclet plugin

<plugin>
<artifactId>xdoclet-maven-plugin</artifactId>
<groupId>org.codehaus.mojo</groupId>
<version> 1.0-alpha-2</version>
<executions>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>xdoclet</goal>
</goals>
<configuration>
<tasks>
<ejbdoclet verbose="true" force="true" ejbSpec="2.1" destDir="${
project.build.directory }\generated-sources\xdoclet">
<fileset dir="${project.build.sourceDirectory}">
<include name="no/ergo/ergosolutions/mff/sis2/ejb/*Bean.java"/>
<include name="no/ergo/lm/middel/fasade/ejb/*Bean.java"/>
<include name="no/ergo/lm/middel/tjenester/ejb/*Bean.java"/>
</fileset>
<packageSubstitution packages="ejb" substituteWith="interfaces"/>
<homeinterface destDir="${project.build.directory}/generated-sources\xdoclet"/>

<remoteinterface destDir="${project.build.directory
}/generated-sources\xdoclet"/>
<localhomeinterface
destDir="${project.build.directory}/generated-sources\xdoclet"/>

<localinterface destDir="${project.build.directory
}/generated-sources\xdoclet"/>
<utilobject cacheHomes="true"
destDir="${project.build.directory}/generated-sources\xdoclet"/>
<deploymentdescriptor destDir="${project.build.outputDirectory}/META-INF"/>
</ejbdoclet>
</tasks>
</configuration>
</execution>
</executions>
</plugin>


regards
Gaute