jkesselm commented on PR #125: URL: https://github.com/apache/xalan-java/pull/125#issuecomment-1822146794
Quick test: Compiling with 21, running as 1.8 ### The good part: Looks ok when invoked from command line with java -cp <path>/Version. - MINOR quibble: It might be nice to have this exception explain that the most likely cause is that the version number is available only when a Maven build is done. We can add that after the merge; it's not a merge blocker. ### Less good: Ran Maven from commandline, confirmed the pom.properties exists in the expected places. Refreshed xalan-project in Eclipse; pom.properties is seen. Pointed at and ran org.apache.xml.serializer.Version. _It still reports the exception and 0.0.0._ Oops? This appears to be because after importing the Maven project, the default working directory for directly executing this class is its own module, ${workspace_loc:serializer}. not the parent module..., so the path starting with serializer/ is not resolving. I suspect a similar issue would exist if the non-jar copy of our Version was invoked from another project in Eclipse; current directory there shouldn't be the xalan-project root either... so just adding another fallback path without serializer/ doesn't look like a good solution. I don't know how other IDEs handle current directory, but I wouldn't be surprised if the same issue exists there. Counting on paths relative to current directory just isn't stable. If we could do a path relative to the class's location, maybe, but... - We could just say "Version doesn't work reliably in the IDE unless you're running against the jarfiles". I think folks might consider that a regression. - We _could_ go back to filtering the Version .java from templates. Ugly but it eliminates the context sensitivity. - I don't have a third answer offhand, and it's past bedtime. Lemme sleep on it and see if anything materializes. Oh well. "If it was easy, they wouldn't need people like us." -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@xalan.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@xalan.apache.org For additional commands, e-mail: dev-h...@xalan.apache.org