First, the sourceSchema instructions are incorrect - copy/pase error from
the ant task description. I'll fix that.

Second, src/java is not really where you want to put xsd's or any resource
files. Also note that the standard location of java files is
src/main/java.

So do this. First, call the cops so your boss doesn't kill you.

Second,

Create another project and move all of your schemas to it. We'll call it
schemas, and it should look like this:

schemas/src/main/resources/**/*.xsd
schemas/src/xsd/**.xsd
schemas/pom.xml

in your pom.xml for this project, add src/xsd as a resourceDirectory. You
can have more than one
(http://maven.apache.org/maven-model/maven.html#class_resource).

Then list schemas-xxx.jar as a dependency in your project below, and
follow the last scenario in the usage guidelines:

http://mojo.codehaus.org/xmlbeans-maven-plugin/usage.html

This will cause all of your schemas to end up in target/xmlbeans-xsds and
for all of them to get compiled.

Kris Bravo
Corridor Software, Inc.
http://www.corridor-software.us

> I have many xsd files in many subdirectories.
> <schemaDirectory>src/xsd</schemaDirectory> looks for xsd files only in
> this directoryand not in subdirectories.  In a documentation i've founded
> that in my case i should use fileset. It was in description of
> sourceSchemas.
>
> http://mojo.codehaus.org/xmlbeans-maven-plugin/xmlbeans-mojo.html
>
> My directories looks like this:
>
> |
> |----------src
>         |
>         |---------xsd
>         |       |
>         |       |-----------common
>         |               |
>         |               *.xsd
>         |
>         |---------jave
>         |       |
>         |       |-------------some1 with *.xsd
>         |       |               |
>         |       |               |------------some 1-1 wirh*.xsd
>         |       |               |               |
>         |       |--------some 2  some1-2*.xsd   |
>         |       |       *.xsd   |       |       |
> .
> .
> .
>
> and so on.
>
> How should my POM.xml file look like??
> What should I do?
>
> Please!!! My boss will kill me.
>
>
> Pozdrawiam
> Sebastian Bùoch
>
>
>
> "Kris Bravo" <[EMAIL PROTECTED]>
> 2006-01-03 19:42
> Please respond to
> [email protected]
>
>
> To
> [email protected]
> cc
>
> Subject
> Re: [mojo-user] Problem with xmlbeans ant fileset
>
>
>
>
>
>
> This is off a bit, since xmlbeans doesn't support filesets in this way.
> Also, I'm not certain what you are trying to do with this line:
>
>  <fileset dir="src/java" includes="**/*.*"/>
> but if you want your java source located here, you need
>  <build>
>    <sourceDirectory>src/java</sourceDirectory>
>  </build>
>
> instead. Try this along with the following plugin description instead.
>
> <plugin>
>   <groupId>org.codehaus.mojo</groupId>
>   <artifactId>xmlbeans-maven-plugin</artifactId>
>   <executions>
>     <execution>
>       <phase>generate-sources</phase>
>         <goals>
>           <goal>xmlbeans</goal>
>         </goals>
>     </execution>
>   </executions>
>   <configuration>
>     <memoryInitialSize>8m</memoryInitialSize>
>     <memoryMaximumSize>256m</memoryMaximumSize>
>     <debug>true</debug>
>     <verbose>true</verbose>
>     <schemaDirectory>src/xsd</schemaDirectory>
>     </configuration>
>   </plugin>
>
> Kris Bravo
>
>> I'm using maven2 and i'm trying to us xmlbeans plugin. I need to set
> files
>> so could find them. Please HELP!!! My pom.xml looks like this:
>>
>> <plugin>
>>         <groupId>org.codehaus.mojo</groupId>
>>         <artifactId>xmlbeans-maven-plugin</artifactId>
>>           <executions>
>>                 <execution>
>>                 <phase>generate-sources</phase>
>>
>>                         <goals>
>>                                 <goal>xmlbeans</goal>
>>
>>                         </goals>
>>
>>                 </execution>
>>
>>         </executions>
>>         <inherited>true</inherited>
>>         <configuration>
>>
>>                 <memoryInitialSize>8m</memoryInitialSize>
>>                 <memoryMaximumSize>256m</memoryMaximumSize>
>>                 <debug>true</debug>
>>                 <verbose>true</verbose>
>>                 <failonerror>true</failonerror>
>>                 <schemaDirectory>src/xsd</schemaDirectory>
>>                 <fileset dir="src/xsd" includes="**/*.xsd"/>
>>                 <fileset dir="src/java" includes="**/*.*"/>
>>
>>
>>                 </configuration>
>>
>>
>>       </plugin>
>>
>>
>>
>>
>> Pozdrawiam
>> Sebastian B³och
>
>
>
>


Reply via email to