[jira] [Updated] (SCM-833) getLastChangedRevision() returns null whereas as getRevision() get correct versions
[ https://issues.apache.org/jira/browse/SCM-833?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Michael Osipov updated SCM-833: --- Fix Version/s: waiting-for-feedback > 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, 1.9.5 >Reporter: Karl Heinz Marbaise >Priority: Minor > Fix For: waiting-for-feedback > > > Currently there is a method like this in the code (buildnumber-maven-plugin): > AbstractScmMojo.java: > {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 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?... > So ATM I'm not sure if this is really a bug in SCM or a misusage in > buildnumber-maven-plugin ? -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Updated] (SCM-833) getLastChangedRevision() returns null whereas as getRevision() get correct versions
[ https://issues.apache.org/jira/browse/SCM-833?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Elliotte Rusty Harold updated SCM-833: -- Priority: Minor (was: Major) > 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, 1.9.5 >Reporter: Karl Heinz Marbaise >Priority: Minor > > Currently there is a method like this in the code (buildnumber-maven-plugin): > AbstractScmMojo.java: > {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 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?... > So ATM I'm not sure if this is really a bug in SCM or a misusage in > buildnumber-maven-plugin ? -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Updated] (SCM-833) getLastChangedRevision() returns null whereas as getRevision() get correct versions
[ https://issues.apache.org/jira/browse/SCM-833?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Karl Heinz Marbaise updated SCM-833: Affects Version/s: 1.9.5 > 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, 1.9.5 >Reporter: Karl Heinz Marbaise > > Currently there is a method like this in the code (buildnumber-maven-plugin): > AbstractScmMojo.java: > {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 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?... > So ATM I'm not sure if this is really a bug in SCM or a misusage in > buildnumber-maven-plugin ? -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (SCM-833) getLastChangedRevision() returns null whereas as getRevision() get correct versions
[ https://issues.apache.org/jira/browse/SCM-833?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Karl Heinz Marbaise updated SCM-833: Description: Currently there is a method like this in the code (buildnumber-maven-plugin): AbstractScmMojo.java: {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 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?... So ATM I'm not sure if this is really a bug in SCM or a misusage in buildnumber-maven-plugin ? was: Currently there is a method like this in the code (buildnumber-maven-plugin): AbstractScmMojo.java: {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 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?... > 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): > AbstractScmMojo.java: > {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 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?... > So ATM I'm not sure if this is really a bug in SCM or a misusage in > buildnumber-maven-plugin ? -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (SCM-833) getLastChangedRevision() returns null whereas as getRevision() get correct versions
[ https://issues.apache.org/jira/browse/SCM-833?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Karl Heinz Marbaise updated SCM-833: Description: Currently there is a method like this in the code (buildnumber-maven-plugin): AbstractScmMojo.java: {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 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?... was: 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 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?... > 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): > AbstractScmMojo.java: > {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 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)