You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by David Jencks <da...@yahoo.com> on 2007/01/22 10:49:37 UTC

Minor problems with possibly generated schema classes

I have 2 complaints about the schema-bootstrap and schema-extra  
modules...

1. Many of the source java files that are checked in claim that they  
are automatically generated.  IMO these should either be actually  
generated as part of the build or their javadoc should clearly state  
that they are not generated or say that they were once generated and  
why they aren't generated as part of the build.

2. These two modules have the same package name.  This is generally a  
really bad idea and can lead to lots of classloader problems... some  
of which I recently ran into, such as the protected constructors in  
public inner classes becoming inaccessible from the other jar when  
the jars are loaded in different classloaders.

I could fix (2) but not (1) unless someone tells me what the answer  
is :-)

thanks
david jencks


Re: Minor problems with possibly generated schema classes

Posted by Alex Karasulu <ak...@apache.org>.
David Jencks wrote:
> I have 2 complaints about the schema-bootstrap and schema-extra modules...
> 
> 1. Many of the source java files that are checked in claim that they are 
> automatically generated.  IMO these should either be actually generated 
> as part of the build or their javadoc should clearly state that they are 
> not generated or say that they were once generated and why they aren't 
> generated as part of the build.

Ok the schema generator plugin that generates these schema producers 
does not overwrite files that it sees in the src/main/java area.  It 
only generates producers into the target/generated-sources directory if 
the same .java file does not exists in src/main/java.

Now originally we generated empty producers for some schemas then we 
customized them and moved them to src/main/java.

Hence the bad javadocs.  Feel free to change em if you like.

> 2. These two modules have the same package name.  This is generally a 
> really bad idea and can lead to lots of classloader problems... some of 
> which I recently ran into, such as the protected constructors in public 
> inner classes becoming inaccessible from the other jar when the jars are 
> loaded in different classloaders.
> 
> I could fix (2) but not (1) unless someone tells me what the answer is :-)
> 

Hmmm I need to look at this email again later.  For now I need to run. 
Let me get back to you.

Regards,
Alex