Ryan Sonnek wrote:
please read the wiki page again. the example posted on the wiki specifically AVOIDS the xdoclet plugin, and instead uses maven goals to do the same work. the plugin and maven goals have nothing in common, and i would suggest using one or the other. I wrote the wiki pages in question, and would highly recommend NOT using the xdoclet plugin (for the reasons stated on the wiki).
any other questions, feel free to ask. xdoclet's pretty tough to get up and working the first time. Ryan
-----Original Message----- From: Chuck Daniels [mailto:[EMAIL PROTECTED] Sent: Friday, June 25, 2004 5:39 AM To: Maven Users List; [EMAIL PROTECTED] Subject: RE: How to get xdoclet generating necessary files thru maven?
Why have you overridden the xdoclet:ejbdoclet goal in your maven.xml? Try
removing it from your maven.xml so that the goal by the same name in the
plugin can run.
do it wrong?-----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Friday, June 25, 2004 3:38 AM To: [EMAIL PROTECTED] Subject: How to get xdoclet generating necessary files thru maven?
I make use of the example in wiki
(http://wiki.codehaus.org/maven/CreatingJ2eeApplications) to
create my j2ee project;
yet encounter a probelm when integrate xdoclet with maven.
After following up the instruction in maven plug-in page
(http://xdoclet.sourceforge.net/xdoclet/maven-plugin.html),
I setup maven.xml and project.properties along with project.xml.
It looks as
follow. However, it seems no use to get xdoclet generating
necessary files (such as remote, home interface). Additionaly, I
also defined
necessary depandencies in the root project.xml. Where did I
BTW, there no error report ,when compiling, for the ejbsource I use was
dir="${maven.xdoclet.ejbdoclet.srcDir}">successful compiled and run smoothly only through xdoclet. I appreciate any suggestions. Sincerely, Arsene
==========maven.xml==========BEG
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns:maven="jelly:maven" xmlns:j="jelly:core">
<preGoal name="java:compile">
<attainGoal name="xdoclet:ejbdoclet"/>
</preGoal>
<!-- Generate required Xdoclet EjbDoclet resources for this
project. -->
<goal name="xdoclet:ejbdoclet">
<echo message="destDir ->
${maven.xdoclet.ejbdoclet.destDir}"/>
<echo message="srcDir ->
${maven.xdoclet.ejbdoclet.srcDir}"/>
<mkdir dir="${maven.xdoclet.ejbdoclet.destDir}"/>
<taskdef name="ejbdoclet"
classname="xdoclet.modules.ejb.EjbDocletTask"
classpathref="maven.dependency.classpath"/>
<ejbdoclet destdir="${maven.xdoclet.ejbdoclet.destDir}"
excludedtags="@version,@author,@todo"
ejbspec="2.0" >
<fileset
dir="${maven.xdoclet.ejbdoclet.destDir}"><include name="**/*Bean.java"/> </fileset>
<session/> <remoteinterface/> <homeinterface/>
<deploymentdescriptor
destdir="${maven.xdoclet.ejbdoclet.destDir}/META-INF" />
<jboss version="3.0"
destdir="${maven.xdoclet.ejbdoclet.destDir}/META-INF"
/>
</ejbdoclet>
<echo>delete unneeded objects</echo>
<delete>
<fileset
---------------------------------------------------------------------<include name="**/data/*.java"/> <include name="**/interfaces/*.java"/> </fileset> </delete> <path id="ejbdoclet.java.compile.src.set" location="${maven.xdoclet.ejbdoclet.destDir}"/> <maven:addPath id="maven.compile.src.set" refid="ejbdoclet.java.compile.src.set"/> </goal> </project> ==========maven.xml==========END ==========project.proerties==========BEG maven.multiproject.type=ejb
#define xdoclet properties maven.xdoclet.force=false maven.xdoclet.ejbdoclet.srcDir=${basedir}/src/java maven.xdoclet.ejbdoclet.destDir=${basedir}/target/xdoclet/ejbdoclet
maven.ejb.src=${maven.xdoclet.ejbdoclet.srcDir}
# plugin.properties #ejbdoclet default properties maven.xdoclet.ejbdoclet.destDir=${maven.build.dir}/xdoclet/ejbdoclet
maven.xdoclet.ejbdoclet.fileset.0=true maven.xdoclet.ejbdoclet.fileset.0.include=**/*Bean.java
maven.xdoclet.ejbdoclet.deploymentdescriptor.0=true maven.xdoclet.ejbdoclet.deploymentdescriptor.0.destDir=${maven.bui ld.dir}/xdoclet/ejb/META-INF
maven.xdoclet.ejbdoclet.entitybmp.0=true maven.xdoclet.ejbdoclet.entitycmp.0=true maven.xdoclet.ejbdoclet.entitypk.0=true maven.xdoclet.ejbdoclet.homeinterface.0=true maven.xdoclet.ejbdoclet.localhomeinterface.0=true maven.xdoclet.ejbdoclet.localinterface.0=true maven.xdoclet.ejbdoclet.remoteinterface.0=true maven.xdoclet.ejbdoclet.session.0=true maven.xdoclet.ejbdoclet.utilobject.0=true ==========project.proerties==========END
==========Project.xml in root folder ==========BEG <project> <pomVersion>3</pomVersion> <groupId>tw.idv.arsene.maven.sample</groupId> <id>arsene-sample-project</id> <name>arsene sample project</name> <currentVersion>1.0</currentVersion> <package>tw.idv.arsene.maven.sample</package> <!-- ################################################################ --> <!-- Project management section --> <!-- ################################################################ -->
<!-- ################################################################ --> <!-- Project dependency section --> <!-- ################################################################ -->
<dependencies> <dependency> <groupId>commons-collections</groupId> <artifactId>commons-collections</artifactId> <version>2.1</version> <url>http://jakarta.apache.org/commons</url> </dependency>
<dependency> <groupId>commons-logging</groupId> <artifactId>commons-logging</artifactId> <version>1.0.3</version> <url>http://jakarta.apache.org/commons</url> </dependency>
<!-- XDoclet J2ee --> <dependency> <groupId>jboss</groupId> <artifactId>jboss-j2ee</artifactId> <version>3.2.1</version> <url>http://www.jboss.org</url> </dependency>
<!-- XDoclet --> <dependency> <groupId>xdoclet</groupId> <artifactId>xjavadoc</artifactId> <version>1.0.2</version> <url>http://xdoclet.sourceforge.net</url> </dependency>
<dependency> <groupId>xdoclet</groupId> <artifactId>xdoclet</artifactId> <version>1.2</version> <url>http://xdoclet.sourceforge.net</url> </dependency>
<dependency> <groupId>xdoclet</groupId> <artifactId>xdoclet-xdoclet-module</artifactId> <version>1.2</version> <url>http://xdoclet.sourceforge.net</url> </dependency>
<dependency> <groupId>xdoclet</groupId> <artifactId>xdoclet-ejb-module</artifactId> <version>1.2</version> <url>http://xdoclet.sourceforge.net</url> </dependency>
<dependency> <groupId>xdoclet</groupId> <artifactId>xdoclet-jboss-module</artifactId> <version>1.2b4</version> <url>http://xdoclet.sourceforge.net</url> </dependency>
<dependency> <groupId>xdoclet</groupId> <artifactId>xdoclet-jmx-module</artifactId> <version>1.2</version> <url>http://xdoclet.sourceforge.net</url> </dependency> </dependencies> <!-- ################################################################ --> <!-- Project build and reports section --> <!-- ################################################################ --> <build> <sourceDirectory> ${basedir}/src/java </sourceDirectory> <unitTestSourceDirectory> ${basedir}/src/test </unitTestSourceDirectory> <unitTest> <includes> <include>**/Test*.java</include> </includes> <!-- <excludes> <exclude> **/*Test*All.java </exclude> </excludes> --> </unitTest> </build>
</project>
==========project.xml in root folder ==========END ==========HelloBean.java ==========BEG package tw.idv.arsene.maven.sample.ejb;
import javax.ejb.*;
/** * @ejb:bean name="Hello" * description="Sample to test xdoclet" * jndi-name="ejb/Hello" * type="Stateless" */
public class HelloBean extends BaseSessionBean {
/** * @ejb:interface-method view-type="remote" */ public String speak(){ return "hello"; }
}
==========HelloBean.java ==========END ==========BaseSessionBean.java ==========BEG package tw.idv.arsene.maven.sample.ejb;
import javax.ejb.*; /** * @ejb:bean * name="BaseSession" * type="Stateless" * view-type="remote" * jndi-name="ejb/BaseSession" */ public class BaseSessionBean implements SessionBean{ /** * @ejb:create-method */ public void ejbCreate() throws CreateException{} public void ejbRemove(){} public void setSessionContext(SessionContext context){ } public void ejbPassivate(){ } public void ejbActivate(){} } ==========BaseSessionBean.java ==========END
Cool Things Happen When Mac Users Meet! Join the community in Boston this July: www.macworldexpo.com
To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
-- Eric W. Hauser Application Developer accessIndiana..."linking hoosiers to government" http://www.IN.gov 10 W. Market St., Suite 600 Indianapolis, IN 46204 Phone: (317) 233-4007 Fax: (317) 233-2011
**********************************************************************
CONFIDENTIALITY NOTICE:
This E-mail and any attachments are confidential. If you are not the intended recipient, you do not have permission to disclose, copy, distribute, or open any attachments. If you have received this E-mail
in error, please notify us immediately by returning it to the sender and delete this copy from your system. Thank you.
accessIndiana, MyLocal.IN.gov, CivicNet
**********************************************************************
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
