Hi Wilfred,

Yes I had the same problem and I think I have a working solution. The key is, 
that I wrote an additional plugin, that would generate a jar containing the 
generated sources and classes from xmlbeans. My normal project now includes 
this project.

The process is like this:

The normal XMLBeans Plugin generates ist sources and classes and puts them to a 
defined location. My plugin picks up thoses resources at the same location and 
builds the jar and installes it into the local repository. For this, my plugin 
runs in the process-resources phase.

Now the project insode eclipse can resolve anything it needs, with one downside 
that you have to run the lifecycle one time outside eclipse for the initial 
generation of this jar.

Greetings,

Christian Domsch.

P.S.: I attached the pom and the source for this plugin.

> -----Ursprüngliche Nachricht-----
> Von: Wilfred Springer [mailto:[EMAIL PROTECTED] 
> Gesendet: Freitag, 5. Mai 2006 08:20
> An: [EMAIL PROTECTED]
> Cc: Maven Users List
> Betreff: XMLBeans Plugin + Eclipse Mayhem
> 
> Hi all,
> 
> I am using the XMLBeans Maven Plugin in a couple of projects, 
> but using this plugin in combination with Eclipse is giving 
> me a headache. I was just wondering if somebody has already solved it.
> 
> The layout of my project is a little like this:
> 
> project
>  +--- pom.xml
>  +--- project-xml-binding
>           +--- pom.xml
>           +--- src/main/xsd/test.xsd
>           +----src/main/xsdconfig/xsdconfig.xml
>  +--- project-client
>           +--- pom.xml
>           +--- src/main/java
> 
> 
> The 'project-client' module depends on project-xml-binding. 
> The problem
> is that client code in 'project-client' does not always see 
> the classes
> or source files generated from the XMLBeans plugin. So 
> Eclipse is giving
> a lot of warnings for missing class file definitions, I don't 
> have code
> completion, and my tests do not always run when running it 
> from Eclipse.
> 
> So the question is: how do I make sure that my client code has all of
> the class definitions of the 'project-xml-binding' project, 
> and how do I
> configure my poms to make sure that eclipse:eclipse is giving me the
> proper project settings?
> 
> Thanks,
> 
> Wilfred
> 
> Wilfred Springer | Software Architect | TomTom |
> [EMAIL PROTECTED] | +31 646 720 990
> 
<project xmlns="http://maven.apache.org/POM/4.0.0"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
		xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd";>
	<!-- ********************************************************************* -->
  <!-- * Parent  Information                                               * -->
  <!-- ********************************************************************* -->
	<parent>
		<groupId>com</groupId>
		<artifactId>top_logic</artifactId>
		<version>1.0</version>
	</parent>
	<!-- ********************************************************************* -->
  <!-- * General Information                                               * -->
  <!-- ********************************************************************* -->
	<modelVersion>4.0.0</modelVersion>
	<groupId>com.top_logic.maven.plugin</groupId>
	<artifactId>xmlbeans-gen</artifactId>
	<packaging>maven-plugin</packaging>
	<version>1.0</version>
	<name>Plugin for helping in the xmlbeans lifecycle</name>
	<url>http://www.top-logic.com</url>
	<inceptionYear>2006</inceptionYear>
	<organization>
		<name>Business Operation Systems GmbH</name>
		<url>http://www.top-logic.com</url>
	</organization>
	<scm>
		<connection>scm:cvs:pserver:egal:[EMAIL PROTECTED]:/cvsroot/top-logic:com.top_logic.maven/com.top_logic.maven.plugin.xmlbeans-gen</connection>
	</scm>
	<!-- ********************************************************************* -->
  <!-- * Dependencies                                                      * -->
  <!-- ********************************************************************* -->
	<dependencies>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-plugin-api</artifactId>
      <version>2.0.2</version>
    </dependency>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-archiver</artifactId>
      <version>2.0.2</version>
    </dependency>
  </dependencies>
</project>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to