Details
-
Bug
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
1.9.4, 1.9.5
-
None
Description
Currently there is a method like this in the code (buildnumber-maven-plugin): AbstractScmMojo.java:
protected String getScmRevision() throws ScmException { ScmRepository repository = getScmRepository(); InfoScmResult scmResult = info( repository, new ScmFileSet( scmDirectory ) ); if ( scmResult == null || scmResult.getInfoItems().isEmpty() ) { return ( !StringUtils.isEmpty( revisionOnScmFailure ) ) ? revisionOnScmFailure : null; } checkResult( scmResult ); InfoItem info = scmResult.getInfoItems().get( 0 ); List<InfoItem> infoItems = scmResult.getInfoItems(); for (InfoItem infoItem : infoItems) { getLog().info("Item: " +infoItem.getRevision() + " lcr: " + infoItem.getLastChangedRevision() ); } getLog().info("useLastCommittedRevision: " + useLastCommittedRevision); if ( useLastCommittedRevision ) { return info.getLastChangedRevision(); } return info.getRevision(); }
The problem is simply that getLastChangedRevision() returns null whereas getRevision() returns the requested value?...
So ATM I'm not sure if this is really a bug in SCM or a misusage in buildnumber-maven-plugin ?