The following comment has been added to this issue:

     Author: Heiko W. Rupp
    Created: Sat, 10 Apr 2004 2:44 PM
       Body:
Package substitution is working for me. We are using it at work (with XDT-399 applied) 
for a year now without problems.

Is persistence from your example really the package in which FooBean is?

Example:

Class: de.pilhuhn.ejb.FooSessionBean.java

substitute pilhuhn with bla.fasel doesn't work
substitute ejb with bla.fasel does what you describe.

IMU, with the classical packagesubstitution tag, xdoclet only substitutes the last 
packgage of your path.

---------------------------------------------------------------------
View this comment:
  
http://opensource.atlassian.com/projects/xdoclet/browse/XDT-595?page=comments#action_13848

---------------------------------------------------------------------
View the issue:
  http://opensource.atlassian.com/projects/xdoclet/browse/XDT-595

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: XDT-595
    Summary: packageSubstitution ignored when generating local interfaces
       Type: Bug

     Status: Open
   Priority: Major

 Original Estimate: Unknown
 Time Spent: Unknown
  Remaining: Unknown

    Project: XDoclet
 Components: 
             EJB Module
   Versions:
             1.2 Beta 3

   Assignee: xdoclet-devel (Use for new issues)
   Reporter: Matt Gumbley

    Created: Wed, 6 Aug 2003 11:31 AM
    Updated: Sat, 10 Apr 2004 2:44 PM
Environment: Win2000, JBoss 3.0.6

Description:
We're generating the interfaces to our beans (Entity beans, in this case) in a 
directory separate from the Bean class:

e.g. this generates interfaces for the /foo/persistence/FooBean bean (some detail 
omitted):

<target name="xdoclet-12b3-generate" depends="init">
      <taskdef
         name="ejbdoclet"
         classname="xdoclet.modules.ejb.EjbDocletTask">
         <classpath refid="persistence.xdoclet.path"/>
      </taskdef>
      <mkdir dir="${build.generate.dir}/foo/persistence/interfaces"/>     
      <ejbdoclet
         destdir="${build.generate.dir}"
         mergedir="${basedir}/xdoclet"
         force="${xdoclet.force}">     
         <fileset dir="${src.dir}">
            <include name="**/*Bean.java"/>          
         </fileset>
         <packageSubstitution packages="persistence" 
substituteWith="persistence.interfaces"/>

etc., etc. So, our interfaces should be placed in the /foo/persistence/interfaces 
tree, built under ${build.generate.dir}, which is a separate directory from the 
${src.dir}. (this works fine with xdoclet 1.1.2, but generates many spurious warnings, 
and there's no @ejb.value-object...)

I see the following output from xdoclet:

   [ejbdoclet] WARNING: Some classes refer to other classes that were not found among 
the sources or on the classpath.
   [ejbdoclet]          (Perhaps the referred class doesn't exist? Hasn't been 
generated yet?)
   [ejbdoclet]          The referring classes do not import any fully qualified 
classes matching these classes.
   [ejbdoclet]          Since at least one package is imported, it is impossible for 
xjavadoc to figure out
   [ejbdoclet]          what package the referred classes belong to. The classes are:
   [ejbdoclet] H:\<my-dev-tree>\src\java\foo\persistence\FooBean.java --> FooLocal 
qualified to foo.persistence.FooLocal

This should not need qualifying? It should be foo.persistence.interfaces.FooLocal, as 
per the packageSubstitution?

Then javac barfs:
       [javac] 
H:\<my-dev-tree>\build\generate\foo\persistence\interfaces\FooLocal.java:13: cannot 
resolve symbol
       [javac] symbol  : class FooLocal 
       [javac] location: package persistence
       [javac]    public foo.persistence.FooLocal create( java.lang.String 
category,java.lang.String key,java.lang.String comment ) throws java.lang.Exception;



---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://opensource.atlassian.com/projects/xdoclet/secure/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira



-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
xdoclet-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-devel

Reply via email to