Re: codehaus xmlbeans and eclipse

2007-01-18 Thread flyboy

Gregory,

Thanks for your reply.

For the record, I found a  acceptable work around.   I configured the
xmlbeans plugin to create a schema jar file in the target directory.  Then I
put this jar file on my eclipse classpath.  I haven't checked yet whether
this configuration affects the rest of the build in maven.  However, it
looks like the xmlbeans plugin still generates source and bizarre
schemaorg_apache_xmlbeans directories , so I believe this is no impact on
the rest of the maven build.

Thanks again,
John


-- 
View this message in context: 
http://www.nabble.com/codehaus-xmlbeans-and-eclipse-tf3029668s177.html#a8434372
Sent from the Maven - Users mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: codehaus xmlbeans and eclipse

2007-01-17 Thread Gregory Kick

John,

I know exactly what you're talking about and there isn't really a
great solution.

On 1/17/07, flyboy <[EMAIL PROTECTED]> wrote:


I have some issues with xmlbeans and eclipse.  Is anyone successful?

1) I have a maven project with xml beans generated code.  The xmlbeans maven
plugin creates a directory 'target/classes/schemaorg_apache_xmlbeans.
Eclipse removes this directory on a 'project clean' or build classpath
configuration.


The reason this happens is that xmlbeans generates two sets of files.
The first is the typical java files that you'd expect.  In the
xmlbeans ant task, these are the ones that you'd get in the target of
the srcgendir directory.

The second set is the bizarre one.  When srconly is true, there are
still some files generated in the classgendir directory.  These files
are the "compiled" schema files (.xsb) and TypeSystemHolder.class.
These are only generated by the plugin and since clean will wipe
everything from the target directory and there are no correspond
sources/resources, you'll have to rerun the plugin.



2) After losing target/classes/schemaorg_apache_xmlbeans, the xmlbeans maven
plugin will not recreate it, because the other directory it creates,
target/xmlbeans-source is still present.  Removing target/xmlbeans-source
from command line causes eclipse to automatically remove xmlbeans-source
from the source path.  So, after regenerating both subdirectories, restoring
xmlbeans-source as a source directory causes the first problem above to
occur.


Not so sure about this one because I built my own plugin to better
handle the first issue.  :-)



3) Eclipse is not 'seeing' target/classes/schemaorg_apache_xmlbeans and so
the generated source code in xmlbeans-source cannot be built.  Specifically,
schemaorg_apache_xmlbeans/system//TypeSystemHolder is
NOT getting resolved.


This is probably the result of eclipse compilation and the problem
that I talked about in #1.  My guess is that eclipse compiles the
sources, notices that there is no TypeSystemHolder and removes the
.class file.  This is pretty unavoidable because there __is no .java
file__.  Xmlbeans does some weird thing where it actually manipulates
a template class file.  The only thing I can recommend is to run the
plugin, don't touch anything, and run whatever you want to from
eclipse.  That usually works for me.



I am using eclipse 3.2.1, xmlbeans-maven-plugin 2.0, maven 2.0.4, eclipse
maven plugin 2.3.

Is anyone using xmlbeans, maven and eclipse with success?  Are you
struggling with this?   Is there workaround?

Thanks,
John
--
View this message in context: 
http://www.nabble.com/codehaus-xmlbeans-and-eclipse-tf3029668s177.html#a8418392
Sent from the Maven - Users mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





--
Gregory Kick
[EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



codehaus xmlbeans and eclipse

2007-01-17 Thread flyboy

I have some issues with xmlbeans and eclipse.  Is anyone successful?

1) I have a maven project with xml beans generated code.  The xmlbeans maven
plugin creates a directory 'target/classes/schemaorg_apache_xmlbeans. 
Eclipse removes this directory on a 'project clean' or build classpath
configuration.

2) After losing target/classes/schemaorg_apache_xmlbeans, the xmlbeans maven
plugin will not recreate it, because the other directory it creates,
target/xmlbeans-source is still present.  Removing target/xmlbeans-source
from command line causes eclipse to automatically remove xmlbeans-source
from the source path.  So, after regenerating both subdirectories, restoring
xmlbeans-source as a source directory causes the first problem above to
occur.

3) Eclipse is not 'seeing' target/classes/schemaorg_apache_xmlbeans and so
the generated source code in xmlbeans-source cannot be built.  Specifically,
schemaorg_apache_xmlbeans/system//TypeSystemHolder is
NOT getting resolved.

I am using eclipse 3.2.1, xmlbeans-maven-plugin 2.0, maven 2.0.4, eclipse
maven plugin 2.3.

Is anyone using xmlbeans, maven and eclipse with success?  Are you
struggling with this?   Is there workaround?

Thanks,
John
-- 
View this message in context: 
http://www.nabble.com/codehaus-xmlbeans-and-eclipse-tf3029668s177.html#a8418392
Sent from the Maven - Users mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]