ogc-schemas icon indicating copy to clipboard operation
ogc-schemas copied to clipboard

indoorgml schema patch/test broken

Open srstsavage opened this issue 8 years ago • 21 comments
trafficstars

The patch for indoorgmlnavi.xsd appears to be outdated and breaks the build:

https://github.com/highsource/ogc-schemas/blob/master/schemas/src/main/patches/ogc.patch#L252-L263

Removing that section of ogc.patch allows the build to progress until the scripts tests, where this test fails:

scripts/tests/IndoorGML/1.0/FJK-Haus_IndoorGML_withEXR-corrected.xml

Specifically the test encounters the following error:

Error: Element [{http://www.opengis.net/indoorgml/1.0/core}Geometry3D] could not be unmarshalled as is not known in this context and the property does not allow DOM content.

srstsavage avatar Jan 17 '17 06:01 srstsavage

After IndoorGML schema was version up to 1.0.2, indoorgmlcore.xsd has some changes and backward compatibility is broken.

hgryoo avatar Jan 19 '17 06:01 hgryoo

Great for OGC to break backwards-compatibility on minor version (1.0.2).

I've removed the patch as it is no longer necessary. I also had to change the sample XMl due to backwards incompatibility.

highsource avatar Jan 22 '17 10:01 highsource

Hello, highsource. Unfortunately, there are some errors in current schema of IndoorGML... IndoorGML group knew this problem and It will be fixed very soon.

hgryoo avatar Jan 23 '17 10:01 hgryoo

Hello, highsource. Good news! IndoorGML new version for bug fix will be uploaded at OGC. However before that, I need to use this OGC-Schemas with new schemas(will be 1.0.3). So is there any way that I manually change this as new schema xsd file?

JungHam avatar Oct 10 '17 12:10 JungHam

You could PR a patch:

https://github.com/highsource/ogc-schemas/tree/master/schemas/src/main/patches

highsource avatar Oct 10 '17 13:10 highsource

Hello, I make pull request with new schema patch. Thanks for your previous answer.

I now develop my project with your indoorgml module, so I want to import the module's jar file. But when I add dependency of the indoorgml jar file at my project, I can't use the indoorgml module at my project.
I can select dependency of indoorgml jar at Eclipse, but cannot import that into my class. What do I need to do in this situation?

JungHam avatar Nov 22 '17 07:11 JungHam

But when I add dependency of the indoorgml jar file at my project, I can't use the indoorgml module at my project.

Why? I'm not sure what you're doing exactly. Normally you'd add your dependency to your pom.xml and then Maven will use the dependency. In Eclipse you have things like m2eclispe which resolve Maven dependencies and add them as depenencies of your project.

What is the error that you get?

highsource avatar Nov 22 '17 08:11 highsource

Really thanks for your fast answer. That's it, what I did was adding my dependency as the way you mentioned here. Before I added the dependency as 2.6.2 snapshot version, I added the 2.5.1 version of Indoorgml (maven online repository). After I changed version from 2.5.1 to 2.6.2 snapshot, suddenly all import in the code of my project didn't work. In the other words, I cannot use the class which your project generated. I checked that all JAXB class were created successfully in your project and jar file also.

JungHam avatar Nov 22 '17 13:11 JungHam

Have you actually built the snapshot version locally?

highsource avatar Nov 22 '17 18:11 highsource

Yes. I checked that snapshot version was created at local .m2 repository which 2.5.2 version is also placed at. Regardless of edited patch.

JungHam avatar Nov 28 '17 06:11 JungHam

Can you create a minimal reproducing project for me to test?

highsource avatar Nov 28 '17 08:11 highsource

Would you describe what is "reproducing project" to me..? OGC Schemas? Or my project?

JungHam avatar Nov 28 '17 08:11 JungHam

A minimal project which imports OGC Schemas you want to use and includes a small unit test (for instance unmarshal something). So yes - your project but cut to minimum.

highsource avatar Nov 28 '17 08:11 highsource

Okay. Thanks:) I will upload minimal version as the link of repository.

JungHam avatar Nov 28 '17 08:11 JungHam

https://github.com/JungHam/Mini_IndoorGMLFactory This one. Thanks for waiting.

JungHam avatar Nov 28 '17 15:11 JungHam

I have built 2.6.2-SNAPSHOT locally and then just updated versions to 2.6.2-SNAPSHOT in your pom.xml. The project compiles but the unmarshalling test fails - the Geometry3D element is not expected. My guess is that your XML sample somehow does not match the schemas, but I can't investigate at the moment.

Here's my suggestion:

  • I have pushed my latest changes. Please pull and build 2.6.2-SNAPSHOT locally.
  • Update your project to use 2.6.2-SNAPSHOT version.
  • Try to figure out why your sample XML does not match the schema.

highsource avatar Nov 28 '17 21:11 highsource

Thanks for checking. Yes, because of schema, my sample file is 1.0.1 version data. I forgot to put 1.0.3 version data also. Sorry for that. I will check latest version.

JungHam avatar Nov 28 '17 22:11 JungHam

I tried with new version. Result is below :

  • successfully built
  • but except of snapshot version, the other versions of jar are searched at 'search dependencies' window in eclipse
  • maybe I think differences are : settings.xml in your .m2 repository

Would you like to show your settings.xml and your pom.xml in my project or let me know the settings which seems to be related with snapshot version? I think the problem now I'm suffered by is maybe is related with environment setting.
I asked this to my colleague(hgryoo) but he didn't know about this.

JungHam avatar Nov 29 '17 06:11 JungHam

So the project is successfully build via Maven in command line? And the only problem you have is in Eclipse? That Eclipse can't resolve dependencies?

No, my settings.xml won't help you, there's nothing special there.

Turn on "Debug Output" in Maven Preferences in Eclipse. Then Update Maven Project, with "Force Update of Snapshots/Releases". Check Maven Console, you might have some error messages there.

But generally if command-line build is working, the rest is IDE specifics.

highsource avatar Nov 29 '17 09:11 highsource

Really Thanks for your comment! I now solved the problem. The matter was my eclipse's maven setting. Firstly I did all things you recommended and next I unchecked "Resolve dependencies from Workspace projects" option in "properties" at my project setting. Then problem was solved. Everything is okay. Your advice helped me so much. Thank you again...you saved me.

About IndoorGML 1.0.3, I only patched different schema, so when IndoorGML 1.0.3 is officially uploaded to OGC then I will notice about that. Updating will take some time.

JungHam avatar Nov 30 '17 05:11 JungHam

Hello, highsource. I'm happy to announce the release of IndoorGML schema 1.0.3 version. So I made pull request for ogc.patch file which I pulled before. Thank you for waiting!:)

JungHam avatar Mar 27 '18 13:03 JungHam