You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by mv...@o2.pl on 2006/01/03 12:15:10 UTC

problem with xsd files

Hi,

I am na newbie to Maven and I have a following problem with my Maven
2.0.1. My POM.xml looks like this:

<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">
    
  <modelVersion>4.0.0</modelVersion>
  <groupId>pl.com.arimr.abg.ofsa</groupId>
  <artifactId>ofsa</artifactId>
  <packaging>jar</packaging>
  <version>1.0-SNAPSHOT</version>
  <name>Schema</name>
  <url>http://maven.apache.org</url>
 
  <dependencies>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>3.8.1</version>
      <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>xbean</groupId>
        <artifactId>xbean</artifactId>
        <version>8.1.4.0</version>
    <scope>compile</scope>
    </dependency>
	<dependency>
        <groupId>weblogic</groupId>
        <artifactId>wli</artifactId>
        <version>8.1.4.0</version>
    <scope>compile</scope>
    </dependency>
  </dependencies>
  
  <build>
	<plugins>
		<plugin>
		<artifactId>maven-antrun-plugin</artifactId>
		<executions>
		<execution>
		<phase>process-resources</phase>
		<configuration>
		<tasks>
		  <!--<echo message="${maven.src.dir}"/>
		  <echo message="${mvn.src.dir}"/>-->
		  <taskdef name="xmlbean" classname="com.bea.xbean.tool.XMLBean"
classpathref="maven.dependency.classpath" />
	      <taskdef name="mflbean" classname="com.bea.wli.mfl.MFLBean"
classpathref="maven.dependency.classpath" />
			<xmlbean
      			classgendir="${maven.build.dest}"
      			schema="src"
      			classpathref="maven.dependency.classpath"
      			debug="false"
      			memoryInitialSize="8m"
      			memoryMaximumSize="256m"
      			fork="true"
      		failonerror="true" />
		<!-- Insert arbitrary Ant -->
		</tasks>
		</configuration>
		<!-- Run the ant target -->
		<goals>
		<goal>run</goal>
		</goals>
		</execution>
		</executions>
		</plugin>
	</plugins>
	<sourceDirectory>src/java</sourceDirectory>
</build>
</project>

and I would like to compile my project which contains of .xsd files.
When I try to do 'mvn compile' it says:

[INFO] Scanning for projects...
[INFO]
----------------------------------------------------------------------------
[INFO] Building Schema
[INFO]    task-segment: [compile]
[INFO]
----------------------------------------------------------------------------
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
Downloading:
http://repo1.maven.org/maven2/xbean/xbean/8.1.4.0/xbean-8.1.4.0.pom
[WARNING] Unable to get resource from repository central
(http://repo1.maven.org/maven2)
Downloading:
http://repo1.maven.org/maven2/weblogic/wli/8.1.4.0/wli-8.1.4.0.pom
[WARNING] Unable to get resource from repository central
(http://repo1.maven.org/maven2)
[INFO] [antrun:run {execution: default}]
[INFO] Executing tasks
  [xmlbean]
src/java/pl/com/abg/arimr/ofsa/common/wniosek/v1/ro2D6schemat.xsd:1:
error: Document root element is missing.
  [xmlbean] src/java/pl/com/abg/arimr/ofsa/common/baza.xsd:1: error:
Document root element is missing.
  [xmlbean]
src/java/pl/com/abg/arimr/ofsa/common/wniosek/v1/ry4D1schemat.xsd:0:
error: Problem parsing referenced XML resour
ce -
D:\temp\ARIMR-OFSA\ARIMR-OFSA\Projekt\Implementacja\application\common\schema\src\java\pl\com\abg\arimr\ofsa\common\baza
.xsd:1: error: Document root element is missing.
  [xmlbean]
src/java/pl/com/abg/arimr/ofsa/common/wniosek/wnioski.xsd:0: error:
Type Baza@http://xml.zsi2.arimr.abg.com/ZSI2/
baza.xsd not found.
  [xmlbean]
src/java/pl/com/abg/arimr/ofsa/common/wniosek/v1/wnioski.xsd:0:
error: Type Wersja@http://xml.zsi2.arimr.abg.com/
ZSI2/baza.xsd not found.  Do you mean to refer to the type named
Wersja@http://xml.zsi2.arimr.abg.com/ZSI2/wnioski/v1/ry3D1sc
hemat.xsd (in ry3D1schemat.xsd)?
  [xmlbean] src/java/pl/com/abg/arimr/ofsa/common/card/karty.xsd:0:
error: Type Baza@http://xml.zsi2.arimr.abg.com/ZSI2/baza.
xsd not found.
Time to build schema type system: 4.157 seconds
BUILD FAILED
[INFO]
----------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
----------------------------------------------------------------------------
[INFO] Error executing ant tasks

[INFO]
----------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO]
----------------------------------------------------------------------------
[INFO] Total time: 12 seconds
[INFO] Finished at: Tue Jan 03 11:44:48 CET 2006
[INFO] Final Memory: 4M/22M
[INFO]
----------------------------------------------------------------------------

Ant task is working without any problems.
I would be grateful for any help.

Thanks,
Pawel




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org