-
Notifications
You must be signed in to change notification settings - Fork 99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[#438] get version of XJC at runtime and dump it on source generation #440
Conversation
* @return currently running XJC version | ||
*/ | ||
public XJCVersion getVersion() { | ||
return XJCVersion.empty(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about we make this a XJCVersion.NOT_DETECTED; <-- static string?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will define static instance UNDEFINED
package org.jvnet.jaxb.maven; | ||
|
||
public class XJCVersion { | ||
private String raw = "N/A"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps add a public static final String NOT_DETECTED = "NOT DETECTED" <-- as a way to signal to users that there is a tooling version mismatch?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
method isKnown will return true if at least one version (major, minor, bugfix) is > 0
} | ||
} | ||
|
||
public static XJCVersion empty() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't love this.. seems like a static constant could work instead?
fa8f394
to
34377b7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Fixes #438