We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Maven part: [in the maven part, if you set to true, it won't build if there are uncommitted files]
and this is version.properties which lives in src/main/resources:
version=${project.version} name=${project.name} revision=${buildNumber} timestamp=${timestamp} branch=${scmBranch}
And some logging:
` public static void logVersion() { Properties properties = new Properties(); InputStream in = null; try { in = LoadPropertiesUtility.class.getClassLoader().getResourceAsStream("version.properties");
if(in == null){ LOGGER.log(Level.FINE, "Unknown Code Revision"); } properties.load(in); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss"); String timestamp = properties.getProperty("timestamp"); String buildTimestamp = sdf.format(new Date(Long.parseLong(timestamp))); String version = properties.getProperty("name") + "-" + properties.getProperty("version"); String revision = properties.getProperty("revision"); String scmBranch = properties.getProperty("branch"); LOGGER.log(Level.FINE, "{0} commit version {1}, built on {2} from branch {3}", new Object[] { version, revision, buildTimestamp, scmBranch }); } catch (IOException ex) { LOGGER.log(Level.FINE, ex.getMessage()); } finally{ if(in != null){ try { in.close(); } catch (IOException e) { LOGGER.log(Level.FINE, e.getMessage()); } } }
`
How-Tos
APIs
Requirements
Design
Deployment