You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Marco Tedone <mt...@jemos.org> on 2004/03/15 20:05:27 UTC

What does the XDoclet plugin expects?

Hi, I'm reading the documentation on the XDoclet website about the Maven
plugin. However, I don't know what the "xdoclet:ejbdoclet" goal expects in
the maven.xml file. I've got a folder /src under which java, webapp, etc.
are stored. When I point my cursor to /src and type "maven
xdoclet:ejbdoclet" nothing happens.

I had an Ant file with an ejbdoclet element defined in it. I specified all
the patterns in there, and it was working fine. I guess the xdoclet Maven
plugin avoids us from specifying an ejbdoclet target in our maven.xml, and
the use of the properties should drive how the application applies the
transformation patterns.

Could anyone please initiate me on this?

Thanks,

Marco



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: What does the XDoclet plugin expects?

Posted by Marco Tedone <mt...@jemos.org>.
Could you send  me an example of how you embedded your ant <ejbdoclet>
target with Maven?

I've got the following Ant script (the problem here is that I would need the
classpath that contains XDoclet):

<!-- ****************************************************** -->
<!-- *********  Compile Test sources   ******************** -->
<!-- ****************************************************** -->
  <target name="ejbdoclet" >
    <delete dir="${xdoclet.build.dir}"
     failonerror="false" />
    <mkdir dir="${xdoclet.build.dir}" />
    <delete failonerror="false">
      <fileset dir="${metainf.dir}">
        <include name="ejb-jar.xml" />
        <include name="jboss.xml" />
        <include name="jbosscmp-jdbc.xml" />
      </fileset>
    </delete>
    <taskdef
        name="ejbdoclet"
        classname="xdoclet.modules.ejb.EjbDocletTask"
        classpathref="run.classpath"
    />

    <tstamp>
        <format property="TODAY" pattern="dd-MM-yy"/>
    </tstamp>



    <!-- ENTITY -->
    <ejbdoclet
        destdir="${xdoclet.build.dir}"
        excludedtags="@version,@author"
        addedtags="@xdoclet-generated at ${TODAY}"
        ejbspec="2.0"
        mergeDir="${metainf.dir}"
    >
        <fileset dir="${src.prod.dir}">
            <include name="**/*EJB.java"/>
            <include name="**/*Bean.java"/>
        </fileset>

        <remoteinterface pattern="{0}">
          <packageSubstitution packages="ejbs" substituteWith="interfaces"/>

        </remoteinterface>


        <localinterface pattern="{0}Local">
          <packageSubstitution packages="ejbs" substituteWith="interfaces"/>

        </localinterface>


        <homeinterface pattern="{0}Home" >
          <packageSubstitution packages="ejbs" substituteWith="interfaces"/>

        </homeinterface>


        <localhomeinterface>
          <packageSubstitution packages="ejbs" substituteWith="interfaces"/>

        </localhomeinterface>


        <entitypk pattern="{0}Key" >
          <packageSubstitution packages="entities" substituteWith="key"/>
          <packageSubstitution packages="sessions" substituteWith="key"/>
        </entitypk>

        <valueobject pattern="{0}">
          <packageSubstitution packages="ejbs"
substituteWith="valueobject"/>

        </valueobject>

        <entitycmp/>

        <deploymentdescriptor destdir="${metainf.dir}"/>
        <jboss version="3.2"
            destdir="${metainf.dir}"

        />
    </ejbdoclet>

Thanks,

Marco
----- Original Message ----- 
From: "Kevin Hagel" <kh...@mminternet.com>
To: "Maven Users List" <us...@maven.apache.org>
Sent: Monday, March 15, 2004 7:36 PM
Subject: Re: What does the XDoclet plugin expects?


> maven can often be considered an Ant wrapper, I've found it much easier
> to embed "ant" script rather than "maven" script to deal with xdoclet.
> xdoclet's plugin methods for assigning values is awkward and impenetrable.
> Look in your repository for the expanded xdoclet plugins, look in the
> plugin.properties file, you'll see the defaults being set.  Then look in
> the plugin.jelly for how they're being used.  be careful, this file is
> some 11,000 lines of code!
>
> Marco Tedone wrote:
>
> >Hi, I'm reading the documentation on the XDoclet website about the Maven
> >plugin. However, I don't know what the "xdoclet:ejbdoclet" goal expects
in
> >the maven.xml file. I've got a folder /src under which java, webapp, etc.
> >are stored. When I point my cursor to /src and type "maven
> >xdoclet:ejbdoclet" nothing happens.
> >
> >I had an Ant file with an ejbdoclet element defined in it. I specified
all
> >the patterns in there, and it was working fine. I guess the xdoclet Maven
> >plugin avoids us from specifying an ejbdoclet target in our maven.xml,
and
> >the use of the properties should drive how the application applies the
> >transformation patterns.
> >
> >Could anyone please initiate me on this?
> >
> >Thanks,
> >
> >Marco
> >
> >
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> >For additional commands, e-mail: users-help@maven.apache.org
> >
> >
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: What does the XDoclet plugin expects?

Posted by Kevin Hagel <kh...@mminternet.com>.
maven can often be considered an Ant wrapper, I've found it much easier 
to embed "ant" script rather than "maven" script to deal with xdoclet.
xdoclet's plugin methods for assigning values is awkward and impenetrable.
Look in your repository for the expanded xdoclet plugins, look in the 
plugin.properties file, you'll see the defaults being set.  Then look in 
the plugin.jelly for how they're being used.  be careful, this file is 
some 11,000 lines of code!

Marco Tedone wrote:

>Hi, I'm reading the documentation on the XDoclet website about the Maven
>plugin. However, I don't know what the "xdoclet:ejbdoclet" goal expects in
>the maven.xml file. I've got a folder /src under which java, webapp, etc.
>are stored. When I point my cursor to /src and type "maven
>xdoclet:ejbdoclet" nothing happens.
>
>I had an Ant file with an ejbdoclet element defined in it. I specified all
>the patterns in there, and it was working fine. I guess the xdoclet Maven
>plugin avoids us from specifying an ejbdoclet target in our maven.xml, and
>the use of the properties should drive how the application applies the
>transformation patterns.
>
>Could anyone please initiate me on this?
>
>Thanks,
>
>Marco
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>For additional commands, e-mail: users-help@maven.apache.org
>
>
>  
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: What does the XDoclet plugin expects?

Posted by Alwyn Schoeman <al...@smart.com.ph>.
I have only come across this when I have only a MDB which doesn't generate
any interfaces.

If you have a sessionbean and it generates interfaces, it should create the
ejbdoclet directory automatically.

On Mon, Mar 15, 2004 at 08:30:34PM -0000, Marco Tedone wrote:
> I've defined your same properties, defined ejbdoclet as pregoal and I'm
> obtaining the following error:
> 
> <ant:javac> srcdir
> "D:\Projects\jemos-xmlop-1.0\src\target\xdoclet\ejbdoclet" does not exist!
> 
> The ejbdoclet goal is looking for a src/target/xdoclet/ejbdoclet folder that
> doesn't exists. Shall I create it?
> 
> I've got the following package:
> 
> /src
>   |
>   ---->java     (src folder)
>             |
>             ---->org (package begins)
>                       |
>                       -->jemos
>                               |
>                               -->xmlop
>                                       |
>                                       OneNormalClass.java
>                                       SecondNormalClass.java
>                                       FirstEJB.java     (Entity)
>                                       FirstBeanSession.java  (Session)
> 
> In the following property I declared  the following:
> 
> maven.xdoclet.xdoclet.fileset.0.include=**/*EJB.java, **/*Bean.java
> 
> Is it ok? (I mean the use of the comma).
> 
> Is there a standard directory structure I could follow when creating EJBs
> with Maven?
> 
> Many thanks,
> 
> Marco
> 
> ----- Original Message ----- 
> From: "Konstantin Priblouda" <kp...@yahoo.com>
> To: "Maven Users List" <us...@maven.apache.org>; "Marco Tedone"
> <mt...@jemos.org>
> Sent: Monday, March 15, 2004 7:26 PM
> Subject: Re: What does the XDoclet plugin expects?
> 
> 
> >
> > --- Marco Tedone <mt...@jemos.org> wrote:
> > > Hi, I'm reading the documentation on the XDoclet
> > > website about the Maven
> > > plugin. However, I don't know what the
> > > "xdoclet:ejbdoclet" goal expects in
> > > the maven.xml file. I've got a folder /src under
> > > which java, webapp, etc.
> > > are stored. When I point my cursor to /src and type
> > > "maven
> > > xdoclet:ejbdoclet" nothing happens.
> > >
> >
> > you will need some properties and dependencies to
> > activate subtasks
> >
> > Like this:
> >
> > ---%<-------------
> > #message bundles
> > maven.xdoclet.xdoclet.destDir=${basedir}/target/xdoclet/xdoclet
> > maven.xdoclet.xdoclet.externalizer.0=true
> > maven.xdoclet.xdoclet.externalizer.0.destinationFile={0}{1}.properties
> >
> > maven.xdoclet.xdoclet.propertiestranslator.0=true
> > maven.xdoclet.xdoclet.fileset.0=true
> > maven.xdoclet.xdoclet.fileset.0.include=**/*.java
> > ---%<-------------
> >
> > Here I activate 2 subtasks ( externalizer / properties
> > translator ) ,
> > specify  fileset for eintire xdoclet invocation, and
> > some task specific
> > settings ( for example name pattern for generated
> > properties  )
> >
> > then I need to specify desired task ( xdoclet:xdoclet
> > ) as pregoal,
> > and possibly tune my project xml so  that generated
> > artifacts are packaged , or included in classpath of
> > unit tests.
> >
> > regards,
> >
> >
> >
> >
> > =====
> > ----[ Konstantin Pribluda ( ko5tik ) ]----------------
> > Zu Verst?rkung meines Teams suche ich ab Sofort einen
> > Softwareentwickler[In] f?r die Festanstellung.
> > Arbeitsort: Mainz
> > Skills:  Programieren, Kentnisse in OpenSource-Bereich
> > ----[ http://www.pribluda.de ]------------------------
> >
> > __________________________________
> > Do you Yahoo!?
> > Yahoo! Mail - More reliable, more storage, less spam
> > http://mail.yahoo.com
> >
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 

-- 
Alwyn Schoeman
SMART Communications.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: What does the XDoclet plugin expects?

Posted by Webb Morris <we...@yahoo.com>.
You should be running maven from the jemos-xmlop-1.0 directory, not the src directory.

WM


--- Marco Tedone <mt...@jemos.org> wrote:
> I've defined your same properties, defined ejbdoclet as pregoal and I'm
> obtaining the following error:
> 
> <ant:javac> srcdir
> "D:\Projects\jemos-xmlop-1.0\src\target\xdoclet\ejbdoclet" does not exist!
> 
> The ejbdoclet goal is looking for a src/target/xdoclet/ejbdoclet folder that
> doesn't exists. Shall I create it?
> 
> I've got the following package:
> 
> /src
>   |
>   ---->java     (src folder)
>             |
>             ---->org (package begins)
>                       |
>                       -->jemos
>                               |
>                               -->xmlop
>                                       |
>                                       OneNormalClass.java
>                                       SecondNormalClass.java
>                                       FirstEJB.java     (Entity)
>                                       FirstBeanSession.java  (Session)
> 
> In the following property I declared  the following:
> 
> maven.xdoclet.xdoclet.fileset.0.include=**/*EJB.java, **/*Bean.java
> 
> Is it ok? (I mean the use of the comma).
> 
> Is there a standard directory structure I could follow when creating EJBs
> with Maven?
> 
> Many thanks,
> 
> Marco
> 
> ----- Original Message ----- 
> From: "Konstantin Priblouda" <kp...@yahoo.com>
> To: "Maven Users List" <us...@maven.apache.org>; "Marco Tedone"
> <mt...@jemos.org>
> Sent: Monday, March 15, 2004 7:26 PM
> Subject: Re: What does the XDoclet plugin expects?
> 
> 
> >
> > --- Marco Tedone <mt...@jemos.org> wrote:
> > > Hi, I'm reading the documentation on the XDoclet
> > > website about the Maven
> > > plugin. However, I don't know what the
> > > "xdoclet:ejbdoclet" goal expects in
> > > the maven.xml file. I've got a folder /src under
> > > which java, webapp, etc.
> > > are stored. When I point my cursor to /src and type
> > > "maven
> > > xdoclet:ejbdoclet" nothing happens.
> > >
> >
> > you will need some properties and dependencies to
> > activate subtasks
> >
> > Like this:
> >
> > ---%<-------------
> > #message bundles
> > maven.xdoclet.xdoclet.destDir=${basedir}/target/xdoclet/xdoclet
> > maven.xdoclet.xdoclet.externalizer.0=true
> > maven.xdoclet.xdoclet.externalizer.0.destinationFile={0}{1}.properties
> >
> > maven.xdoclet.xdoclet.propertiestranslator.0=true
> > maven.xdoclet.xdoclet.fileset.0=true
> > maven.xdoclet.xdoclet.fileset.0.include=**/*.java
> > ---%<-------------
> >
> > Here I activate 2 subtasks ( externalizer / properties
> > translator ) ,
> > specify  fileset for eintire xdoclet invocation, and
> > some task specific
> > settings ( for example name pattern for generated
> > properties  )
> >
> > then I need to specify desired task ( xdoclet:xdoclet
> > ) as pregoal,
> > and possibly tune my project xml so  that generated
> > artifacts are packaged , or included in classpath of
> > unit tests.
> >
> > regards,
> >
> >
> >
> >
> > =====
> > ----[ Konstantin Pribluda ( ko5tik ) ]----------------
> > Zu Verst�rkung meines Teams suche ich ab Sofort einen
> > Softwareentwickler[In] f�r die Festanstellung.
> > Arbeitsort: Mainz
> > Skills:  Programieren, Kentnisse in OpenSource-Bereich
> > ----[ http://www.pribluda.de ]------------------------
> >
> > __________________________________
> > Do you Yahoo!?
> > Yahoo! Mail - More reliable, more storage, less spam
> > http://mail.yahoo.com
> >
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 


__________________________________
Do you Yahoo!?
Yahoo! Mail - More reliable, more storage, less spam
http://mail.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: What does the XDoclet plugin expects?

Posted by Konstantin Priblouda <kp...@yahoo.com>.
--- Marco Tedone <mt...@jemos.org> wrote:
> I've defined your same properties, defined ejbdoclet
> as pregoal and I'm
> obtaining the following error:
> 
> <ant:javac> srcdir
>
"D:\Projects\jemos-xmlop-1.0\src\target\xdoclet\ejbdoclet"
> does not exist!
> 
> The ejbdoclet goal is looking for a
> src/target/xdoclet/ejbdoclet folder that
> doesn't exists. Shall I create it?

It's not xdoclet that barfed, it's javac which had
missed directory where xdoclet generated sources shall
be. xdoclet pljugin registered it for javac.

> I've got the following package:
> 
> /src
>   |
>   ---->java     (src folder)
>             |
>             ---->org (package begins)
>                       |
>                       -->jemos
>                               |
>                               -->xmlop
>                                       |
>                                      
> OneNormalClass.java
>                                      
> SecondNormalClass.java
>                                       FirstEJB.java 
>    (Entity)
>                                      
> FirstBeanSession.java  (Session)
> 
> In the following property I declared  the following:
> 
>
maven.xdoclet.xdoclet.fileset.0.include=**/*EJB.java,
> **/*Bean.java

Shall be  maven.xdoclet.ejbdoclet.fileset - we are
calling ejbdoclet.
( respectively webdoclet, ejbdoclet, hibernatedoclet
etc )  

> Is it ok? (I mean the use of the comma).

Yes. And you did not forgot to say:
maven.xdoclet.ejbdoclet.fileset.0=true ?


> Is there a standard directory structure I could
> follow when creating EJBs
> with Maven?

Also check that you got proper dependencies specified
- 
xdoclet-ejbdoclet module, jar containing javax.ejb.* 
etc.


regards,

=====
----[ Konstantin Pribluda ( ko5tik ) ]----------------
Zu Verst�rkung meines Teams suche ich ab Sofort einen
Softwareentwickler[In] f�r die Festanstellung. 
Arbeitsort: Mainz 
Skills:  Programieren, Kentnisse in OpenSource-Bereich
----[ http://www.pribluda.de ]------------------------

__________________________________
Do you Yahoo!?
Yahoo! Mail - More reliable, more storage, less spam
http://mail.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: What does the XDoclet plugin expects?

Posted by Marco Tedone <mt...@jemos.org>.
I've defined your same properties, defined ejbdoclet as pregoal and I'm
obtaining the following error:

<ant:javac> srcdir
"D:\Projects\jemos-xmlop-1.0\src\target\xdoclet\ejbdoclet" does not exist!

The ejbdoclet goal is looking for a src/target/xdoclet/ejbdoclet folder that
doesn't exists. Shall I create it?

I've got the following package:

/src
  |
  ---->java     (src folder)
            |
            ---->org (package begins)
                      |
                      -->jemos
                              |
                              -->xmlop
                                      |
                                      OneNormalClass.java
                                      SecondNormalClass.java
                                      FirstEJB.java     (Entity)
                                      FirstBeanSession.java  (Session)

In the following property I declared  the following:

maven.xdoclet.xdoclet.fileset.0.include=**/*EJB.java, **/*Bean.java

Is it ok? (I mean the use of the comma).

Is there a standard directory structure I could follow when creating EJBs
with Maven?

Many thanks,

Marco

----- Original Message ----- 
From: "Konstantin Priblouda" <kp...@yahoo.com>
To: "Maven Users List" <us...@maven.apache.org>; "Marco Tedone"
<mt...@jemos.org>
Sent: Monday, March 15, 2004 7:26 PM
Subject: Re: What does the XDoclet plugin expects?


>
> --- Marco Tedone <mt...@jemos.org> wrote:
> > Hi, I'm reading the documentation on the XDoclet
> > website about the Maven
> > plugin. However, I don't know what the
> > "xdoclet:ejbdoclet" goal expects in
> > the maven.xml file. I've got a folder /src under
> > which java, webapp, etc.
> > are stored. When I point my cursor to /src and type
> > "maven
> > xdoclet:ejbdoclet" nothing happens.
> >
>
> you will need some properties and dependencies to
> activate subtasks
>
> Like this:
>
> ---%<-------------
> #message bundles
> maven.xdoclet.xdoclet.destDir=${basedir}/target/xdoclet/xdoclet
> maven.xdoclet.xdoclet.externalizer.0=true
> maven.xdoclet.xdoclet.externalizer.0.destinationFile={0}{1}.properties
>
> maven.xdoclet.xdoclet.propertiestranslator.0=true
> maven.xdoclet.xdoclet.fileset.0=true
> maven.xdoclet.xdoclet.fileset.0.include=**/*.java
> ---%<-------------
>
> Here I activate 2 subtasks ( externalizer / properties
> translator ) ,
> specify  fileset for eintire xdoclet invocation, and
> some task specific
> settings ( for example name pattern for generated
> properties  )
>
> then I need to specify desired task ( xdoclet:xdoclet
> ) as pregoal,
> and possibly tune my project xml so  that generated
> artifacts are packaged , or included in classpath of
> unit tests.
>
> regards,
>
>
>
>
> =====
> ----[ Konstantin Pribluda ( ko5tik ) ]----------------
> Zu Verstärkung meines Teams suche ich ab Sofort einen
> Softwareentwickler[In] für die Festanstellung.
> Arbeitsort: Mainz
> Skills:  Programieren, Kentnisse in OpenSource-Bereich
> ----[ http://www.pribluda.de ]------------------------
>
> __________________________________
> Do you Yahoo!?
> Yahoo! Mail - More reliable, more storage, less spam
> http://mail.yahoo.com
>




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: What does the XDoclet plugin expects?

Posted by Konstantin Priblouda <kp...@yahoo.com>.
--- Marco Tedone <mt...@jemos.org> wrote:
> Hi, I'm reading the documentation on the XDoclet
> website about the Maven
> plugin. However, I don't know what the
> "xdoclet:ejbdoclet" goal expects in
> the maven.xml file. I've got a folder /src under
> which java, webapp, etc.
> are stored. When I point my cursor to /src and type
> "maven
> xdoclet:ejbdoclet" nothing happens.
>

you will need some properties and dependencies to
activate subtasks

Like this:

---%<-------------
#message bundles
maven.xdoclet.xdoclet.destDir=${basedir}/target/xdoclet/xdoclet
maven.xdoclet.xdoclet.externalizer.0=true
maven.xdoclet.xdoclet.externalizer.0.destinationFile={0}{1}.properties

maven.xdoclet.xdoclet.propertiestranslator.0=true
maven.xdoclet.xdoclet.fileset.0=true
maven.xdoclet.xdoclet.fileset.0.include=**/*.java
---%<-------------

Here I activate 2 subtasks ( externalizer / properties
translator ) ,
specify  fileset for eintire xdoclet invocation, and
some task specific 
settings ( for example name pattern for generated
properties  ) 

then I need to specify desired task ( xdoclet:xdoclet
) as pregoal,
and possibly tune my project xml so  that generated
artifacts are packaged , or included in classpath of
unit tests.

regards,




=====
----[ Konstantin Pribluda ( ko5tik ) ]----------------
Zu Verst�rkung meines Teams suche ich ab Sofort einen
Softwareentwickler[In] f�r die Festanstellung. 
Arbeitsort: Mainz 
Skills:  Programieren, Kentnisse in OpenSource-Bereich
----[ http://www.pribluda.de ]------------------------

__________________________________
Do you Yahoo!?
Yahoo! Mail - More reliable, more storage, less spam
http://mail.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org