From: Yingqi T. <ana...@gm...> - 2007-07-25 00:29:33
|
Justin, Do you know how to solve the same problem for "mvn jaxb2:xjc"? Thanks On 7/24/07, Yingqi Tang <ana...@gm...> wrote: > Thanks a lot! > > I actually tried and that successfully works around the problem > > On 7/24/07, Justin Deoliveira <jde...@op...> wrote: > > Hi > > > > Nope you didnt' miss anything... This is a problem with xml schema in > > general... usually parsers arent able to resolve schema location > > references directly because they don't exist. Luckily there are some > > plugin configuration parameters which can help. > > > > What you need to do is download the ows schema somewhere to your hard > > disk. It is available from schemas.opengis.net in case you dont already > > know. > > > > Then specify the following in the plugin configuration: > > > > <configuration> > > ... > > <schemaLookupDirectories> > > <schemaLookupDirectory>[directory with ows.xsd]</schemaLookupDirectory> > > > > </schemaLookupDirectories> > > ... > > > > </configuration> > > > > The full reference of plugin configuration parameters is located here: > > > > http://docs.codehaus.org/display/GEOTDOC/1+Configuration+Parameter+Reference > > > > There are some other parameters which can probably help. Give that a try > > and let me know how it goes. > > > > Also... if we could keep these discussion on the public mailing list > > (gt-devel) that would be good. Thanks. > > > > -Justin > > > > Yingqi Tang wrote: > > > Justin, > > > > > > I was trying to follow the XML development guide to create binding for > > > a schema. The first schema I throw in is wfs.xsd for WFS 1.1.0. > > > > > > It seems the path of wfs.xsd can be resolved, but there is relative > > > path in wfs.xsd itself like "../../ows/1.0.0/owsAll.xsd", which causes > > > the problem and exception popup saying "Can not resolve schema > > > location..." > > > > > > Did I miss something? > > > > > > Here is the plugin configuration: > > > > > > <plugin> > > > <groupId>org.geotools.maven</groupId> > > > <artifactId>gt2-xmlcodegen</artifactId> > > > <version>2.4-SNAPSHOT</version> > > > <configuration> > > > > > > <schemaLocation>\src\main\xsd\wfs\1.1.0\wfs.xsd</schemaLocation> > > > > > > <destinationPackage>org.geotools.experiment.wfs2</destinationPackage> > > > <!-- > > > <constructorArguments> > > > <constructorArgument> > > > <name>factory</name> > > > <type>org.geotools.po.ObjectFactory</type> > > > </constructorArgument> > > > </constructorArguments> > > > --> > > > </configuration> > > > </plugin> > > > > > > Thanks > > > > > > !DSPAM:4007,46a6378068967180515871! > > > > > > > > > -- > > Justin Deoliveira > > The Open Planning Project > > http://topp.openplans.org > > > |