You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Karl Heinz Marbaise (JIRA)" <ji...@apache.org> on 2016/06/26 19:51:51 UTC
[jira] [Created] (SCM-833) getLastChangedRevision() returns null
whereas as getRevision() get correct versions
Karl Heinz Marbaise created SCM-833:
---------------------------------------
Summary: getLastChangedRevision() returns null whereas as getRevision() get correct versions
Key: SCM-833
URL: https://issues.apache.org/jira/browse/SCM-833
Project: Maven SCM
Issue Type: Bug
Components: maven-scm-api, maven-scm-provider-jgit
Affects Versions: 1.9.4
Reporter: Karl Heinz Marbaise
Currently there is a method like this in the code (buildnumber-maven-plugin):
{code: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();
}
{code}
The problem is simply that {{getLastChangedRevision()}} returns null whereas {{getRevision()}} returns the requested value?...
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)