highsource / ogc-schemas

XML<->Java and XML<->JS for OGC XSDs.
BSD 2-Clause "Simplified" License
82 stars 49 forks source link

indoorgml schema patch/test broken #186

Open srstsavage opened 7 years ago

srstsavage commented 7 years ago

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.
hgryoo commented 7 years ago

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

highsource commented 7 years ago

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.

hgryoo commented 7 years ago

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

JungHam commented 6 years ago

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?

highsource commented 6 years ago

You could PR a patch:

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

JungHam commented 6 years ago

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?

highsource commented 6 years ago

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?

JungHam commented 6 years ago

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.

highsource commented 6 years ago

Have you actually built the snapshot version locally?

JungHam commented 6 years ago

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.

highsource commented 6 years ago

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

JungHam commented 6 years ago

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

highsource commented 6 years ago

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.

JungHam commented 6 years ago

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

JungHam commented 6 years ago

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

highsource commented 6 years ago

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:

JungHam commented 6 years ago

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 commented 6 years ago

I tried with new version. Result is below :

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.

highsource commented 6 years ago

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.

JungHam commented 6 years ago

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 commented 6 years ago

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!:)