You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Petter Måhlén (JIRA)" <ji...@codehaus.org> on 2009/03/04 11:16:12 UTC
[jira] Created: (SCM-441) NPE when using Git SCM 1.2-SNAPSHOT
NPE when using Git SCM 1.2-SNAPSHOT
-----------------------------------
Key: SCM-441
URL: http://jira.codehaus.org/browse/SCM-441
Project: Maven SCM
Issue Type: Bug
Components: maven-scm-api
Affects Versions: 1.1
Environment: Linux and MacOSX, probably everywhere
Reporter: Petter Måhlén
This is the log message:
---
[INFO] Storing revision in 'scm.revision' project property.
[INFO] ------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO] ------------------------------------------------------------------------
[INFO] null
[INFO] ------------------------------------------------------------------------
[INFO] Trace
java.lang.NullPointerException
at java.util.Hashtable.put(Hashtable.java:394)
at org.apache.maven.scm.plugin.UpdateMojo.execute(UpdateMojo.java:103)
---
Looking at the code:
public void execute()
throws MojoExecutionException
{
super.execute();
try
{
ScmRepository repository = getScmRepository();
UpdateScmResult result = getScmManager().update( repository, getFileSet(),
getScmVersion( scmVersionType, scmVersion ),
runChangelog );
checkResult( result );
if ( result instanceof UpdateScmResultWithRevision )
{
String revision = ( (UpdateScmResultWithRevision) result ).getRevision();
getLog().info( "Storing revision in '" + revisionKey + "' project property." );
if ( project.getProperties() != null ) // Remove the test when we'll use plugin-test-harness 1.0-alpha-2
{
project.getProperties().put( revisionKey, revision );
}
getLog().info( "Project at revision " + revision );
}
}
catch ( IOException e )
{
throw new MojoExecutionException( "Cannot run update command : ", e );
}
catch ( ScmException e )
{
throw new MojoExecutionException( "Cannot run update command : ", e );
}
}
The problem must be that the 'revision' String is null. I guess that is a bug in the Git SCM provider, but I would argue it is also a bug in the Update mojo, which should be a little bit more resistant to null results.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Closed: (SCM-441) NPE when using Git SCM 1.2-SNAPSHOT
Posted by "Olivier Lamy (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/SCM-441?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Olivier Lamy closed SCM-441.
----------------------------
Resolution: Fixed
fixed in [rev 755751|http://svn.apache.org/viewvc?rev=755751&view=rev]
Thanks !
> NPE when using Git SCM 1.2-SNAPSHOT
> -----------------------------------
>
> Key: SCM-441
> URL: http://jira.codehaus.org/browse/SCM-441
> Project: Maven SCM
> Issue Type: Bug
> Components: maven-scm-provider-git
> Affects Versions: 1.2
> Environment: Linux and MacOSX, probably everywhere
> Reporter: Petter Måhlén
> Assignee: Olivier Lamy
> Fix For: 1.2
>
> Attachments: SCM-441.patch
>
>
> This is the log message:
> ---
> [INFO] Storing revision in 'scm.revision' project property.
> [INFO] ------------------------------------------------------------------------
> [ERROR] FATAL ERROR
> [INFO] ------------------------------------------------------------------------
> [INFO] null
> [INFO] ------------------------------------------------------------------------
> [INFO] Trace
> java.lang.NullPointerException
> at java.util.Hashtable.put(Hashtable.java:394)
> at org.apache.maven.scm.plugin.UpdateMojo.execute(UpdateMojo.java:103)
> ---
> Looking at the code:
> public void execute()
> throws MojoExecutionException
> {
> super.execute();
> try
> {
> ScmRepository repository = getScmRepository();
> UpdateScmResult result = getScmManager().update( repository, getFileSet(),
> getScmVersion( scmVersionType, scmVersion ),
> runChangelog );
> checkResult( result );
> if ( result instanceof UpdateScmResultWithRevision )
> {
> String revision = ( (UpdateScmResultWithRevision) result ).getRevision();
> getLog().info( "Storing revision in '" + revisionKey + "' project property." );
> if ( project.getProperties() != null ) // Remove the test when we'll use plugin-test-harness 1.0-alpha-2
> {
> project.getProperties().put( revisionKey, revision );
> }
> getLog().info( "Project at revision " + revision );
> }
> }
> catch ( IOException e )
> {
> throw new MojoExecutionException( "Cannot run update command : ", e );
> }
> catch ( ScmException e )
> {
> throw new MojoExecutionException( "Cannot run update command : ", e );
> }
> }
> The problem must be that the 'revision' String is null. I guess that is a bug in the Git SCM provider, but I would argue it is also a bug in the Update mojo, which should be a little bit more resistant to null results.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (SCM-441) NPE when using Git SCM 1.2-SNAPSHOT
Posted by "Petter Måhlén (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/SCM-441?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=167858#action_167858 ]
Petter Måhlén commented on SCM-441:
-----------------------------------
Interestingly, this happens whenever there is a valid Git URL in the <scm/> section of the pom.xml file. but not if I include an invalid SVN url. So my workaround for now to get our builds to work is to lie to the SCM plugin and tell it to use a nonexistent SVN repository.
> NPE when using Git SCM 1.2-SNAPSHOT
> -----------------------------------
>
> Key: SCM-441
> URL: http://jira.codehaus.org/browse/SCM-441
> Project: Maven SCM
> Issue Type: Bug
> Components: maven-scm-api
> Affects Versions: 1.1
> Environment: Linux and MacOSX, probably everywhere
> Reporter: Petter Måhlén
>
> This is the log message:
> ---
> [INFO] Storing revision in 'scm.revision' project property.
> [INFO] ------------------------------------------------------------------------
> [ERROR] FATAL ERROR
> [INFO] ------------------------------------------------------------------------
> [INFO] null
> [INFO] ------------------------------------------------------------------------
> [INFO] Trace
> java.lang.NullPointerException
> at java.util.Hashtable.put(Hashtable.java:394)
> at org.apache.maven.scm.plugin.UpdateMojo.execute(UpdateMojo.java:103)
> ---
> Looking at the code:
> public void execute()
> throws MojoExecutionException
> {
> super.execute();
> try
> {
> ScmRepository repository = getScmRepository();
> UpdateScmResult result = getScmManager().update( repository, getFileSet(),
> getScmVersion( scmVersionType, scmVersion ),
> runChangelog );
> checkResult( result );
> if ( result instanceof UpdateScmResultWithRevision )
> {
> String revision = ( (UpdateScmResultWithRevision) result ).getRevision();
> getLog().info( "Storing revision in '" + revisionKey + "' project property." );
> if ( project.getProperties() != null ) // Remove the test when we'll use plugin-test-harness 1.0-alpha-2
> {
> project.getProperties().put( revisionKey, revision );
> }
> getLog().info( "Project at revision " + revision );
> }
> }
> catch ( IOException e )
> {
> throw new MojoExecutionException( "Cannot run update command : ", e );
> }
> catch ( ScmException e )
> {
> throw new MojoExecutionException( "Cannot run update command : ", e );
> }
> }
> The problem must be that the 'revision' String is null. I guess that is a bug in the Git SCM provider, but I would argue it is also a bug in the Update mojo, which should be a little bit more resistant to null results.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (SCM-441) NPE when using Git SCM 1.2-SNAPSHOT
Posted by "Mark Struberg (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/SCM-441?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=170170#action_170170 ]
Mark Struberg commented on SCM-441:
-----------------------------------
Same thing like in a good restaurant:
The question is now WHAT, the question is IN WHICH ORDER!
So I prefer you do both ;)
Would be cool if Petter could also check it on his repo - txs!
> NPE when using Git SCM 1.2-SNAPSHOT
> -----------------------------------
>
> Key: SCM-441
> URL: http://jira.codehaus.org/browse/SCM-441
> Project: Maven SCM
> Issue Type: Bug
> Components: maven-scm-provider-git
> Affects Versions: 1.2
> Environment: Linux and MacOSX, probably everywhere
> Reporter: Petter Måhlén
> Assignee: Olivier Lamy
> Fix For: 1.2
>
> Attachments: SCM-441.patch
>
>
> This is the log message:
> ---
> [INFO] Storing revision in 'scm.revision' project property.
> [INFO] ------------------------------------------------------------------------
> [ERROR] FATAL ERROR
> [INFO] ------------------------------------------------------------------------
> [INFO] null
> [INFO] ------------------------------------------------------------------------
> [INFO] Trace
> java.lang.NullPointerException
> at java.util.Hashtable.put(Hashtable.java:394)
> at org.apache.maven.scm.plugin.UpdateMojo.execute(UpdateMojo.java:103)
> ---
> Looking at the code:
> public void execute()
> throws MojoExecutionException
> {
> super.execute();
> try
> {
> ScmRepository repository = getScmRepository();
> UpdateScmResult result = getScmManager().update( repository, getFileSet(),
> getScmVersion( scmVersionType, scmVersion ),
> runChangelog );
> checkResult( result );
> if ( result instanceof UpdateScmResultWithRevision )
> {
> String revision = ( (UpdateScmResultWithRevision) result ).getRevision();
> getLog().info( "Storing revision in '" + revisionKey + "' project property." );
> if ( project.getProperties() != null ) // Remove the test when we'll use plugin-test-harness 1.0-alpha-2
> {
> project.getProperties().put( revisionKey, revision );
> }
> getLog().info( "Project at revision " + revision );
> }
> }
> catch ( IOException e )
> {
> throw new MojoExecutionException( "Cannot run update command : ", e );
> }
> catch ( ScmException e )
> {
> throw new MojoExecutionException( "Cannot run update command : ", e );
> }
> }
> The problem must be that the 'revision' String is null. I guess that is a bug in the Git SCM provider, but I would argue it is also a bug in the Update mojo, which should be a little bit more resistant to null results.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (SCM-441) NPE when using Git SCM 1.2-SNAPSHOT
Posted by "Olivier Lamy (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/SCM-441?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=170167#action_170167 ]
Olivier Lamy commented on SCM-441:
----------------------------------
you mean please check in or check/verify ? :D.
> NPE when using Git SCM 1.2-SNAPSHOT
> -----------------------------------
>
> Key: SCM-441
> URL: http://jira.codehaus.org/browse/SCM-441
> Project: Maven SCM
> Issue Type: Bug
> Components: maven-scm-provider-git
> Affects Versions: 1.2
> Environment: Linux and MacOSX, probably everywhere
> Reporter: Petter Måhlén
> Assignee: Olivier Lamy
> Fix For: 1.2
>
> Attachments: SCM-441.patch
>
>
> This is the log message:
> ---
> [INFO] Storing revision in 'scm.revision' project property.
> [INFO] ------------------------------------------------------------------------
> [ERROR] FATAL ERROR
> [INFO] ------------------------------------------------------------------------
> [INFO] null
> [INFO] ------------------------------------------------------------------------
> [INFO] Trace
> java.lang.NullPointerException
> at java.util.Hashtable.put(Hashtable.java:394)
> at org.apache.maven.scm.plugin.UpdateMojo.execute(UpdateMojo.java:103)
> ---
> Looking at the code:
> public void execute()
> throws MojoExecutionException
> {
> super.execute();
> try
> {
> ScmRepository repository = getScmRepository();
> UpdateScmResult result = getScmManager().update( repository, getFileSet(),
> getScmVersion( scmVersionType, scmVersion ),
> runChangelog );
> checkResult( result );
> if ( result instanceof UpdateScmResultWithRevision )
> {
> String revision = ( (UpdateScmResultWithRevision) result ).getRevision();
> getLog().info( "Storing revision in '" + revisionKey + "' project property." );
> if ( project.getProperties() != null ) // Remove the test when we'll use plugin-test-harness 1.0-alpha-2
> {
> project.getProperties().put( revisionKey, revision );
> }
> getLog().info( "Project at revision " + revision );
> }
> }
> catch ( IOException e )
> {
> throw new MojoExecutionException( "Cannot run update command : ", e );
> }
> catch ( ScmException e )
> {
> throw new MojoExecutionException( "Cannot run update command : ", e );
> }
> }
> The problem must be that the 'revision' String is null. I guess that is a bug in the Git SCM provider, but I would argue it is also a bug in the Update mojo, which should be a little bit more resistant to null results.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Updated: (SCM-441) NPE when using Git SCM 1.2-SNAPSHOT
Posted by "Mark Struberg (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/SCM-441?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mark Struberg updated SCM-441:
------------------------------
Attachment: SCM-441.patch
please check this patch!
the GitUpdateCommand now detects the latest version of the branch given (or master if non given).
> NPE when using Git SCM 1.2-SNAPSHOT
> -----------------------------------
>
> Key: SCM-441
> URL: http://jira.codehaus.org/browse/SCM-441
> Project: Maven SCM
> Issue Type: Bug
> Components: maven-scm-provider-git
> Affects Versions: 1.2
> Environment: Linux and MacOSX, probably everywhere
> Reporter: Petter Måhlén
> Assignee: Olivier Lamy
> Fix For: 1.2
>
> Attachments: SCM-441.patch
>
>
> This is the log message:
> ---
> [INFO] Storing revision in 'scm.revision' project property.
> [INFO] ------------------------------------------------------------------------
> [ERROR] FATAL ERROR
> [INFO] ------------------------------------------------------------------------
> [INFO] null
> [INFO] ------------------------------------------------------------------------
> [INFO] Trace
> java.lang.NullPointerException
> at java.util.Hashtable.put(Hashtable.java:394)
> at org.apache.maven.scm.plugin.UpdateMojo.execute(UpdateMojo.java:103)
> ---
> Looking at the code:
> public void execute()
> throws MojoExecutionException
> {
> super.execute();
> try
> {
> ScmRepository repository = getScmRepository();
> UpdateScmResult result = getScmManager().update( repository, getFileSet(),
> getScmVersion( scmVersionType, scmVersion ),
> runChangelog );
> checkResult( result );
> if ( result instanceof UpdateScmResultWithRevision )
> {
> String revision = ( (UpdateScmResultWithRevision) result ).getRevision();
> getLog().info( "Storing revision in '" + revisionKey + "' project property." );
> if ( project.getProperties() != null ) // Remove the test when we'll use plugin-test-harness 1.0-alpha-2
> {
> project.getProperties().put( revisionKey, revision );
> }
> getLog().info( "Project at revision " + revision );
> }
> }
> catch ( IOException e )
> {
> throw new MojoExecutionException( "Cannot run update command : ", e );
> }
> catch ( ScmException e )
> {
> throw new MojoExecutionException( "Cannot run update command : ", e );
> }
> }
> The problem must be that the 'revision' String is null. I guess that is a bug in the Git SCM provider, but I would argue it is also a bug in the Update mojo, which should be a little bit more resistant to null results.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Updated: (SCM-441) NPE when using Git SCM 1.2-SNAPSHOT
Posted by "Olivier Lamy (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/SCM-441?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Olivier Lamy updated SCM-441:
-----------------------------
Assignee: Olivier Lamy
Affects Version/s: (was: 1.1)
1.2
Fix Version/s: 1.2
Component/s: (was: maven-scm-api)
maven-scm-provider-git
> NPE when using Git SCM 1.2-SNAPSHOT
> -----------------------------------
>
> Key: SCM-441
> URL: http://jira.codehaus.org/browse/SCM-441
> Project: Maven SCM
> Issue Type: Bug
> Components: maven-scm-provider-git
> Affects Versions: 1.2
> Environment: Linux and MacOSX, probably everywhere
> Reporter: Petter Måhlén
> Assignee: Olivier Lamy
> Fix For: 1.2
>
>
> This is the log message:
> ---
> [INFO] Storing revision in 'scm.revision' project property.
> [INFO] ------------------------------------------------------------------------
> [ERROR] FATAL ERROR
> [INFO] ------------------------------------------------------------------------
> [INFO] null
> [INFO] ------------------------------------------------------------------------
> [INFO] Trace
> java.lang.NullPointerException
> at java.util.Hashtable.put(Hashtable.java:394)
> at org.apache.maven.scm.plugin.UpdateMojo.execute(UpdateMojo.java:103)
> ---
> Looking at the code:
> public void execute()
> throws MojoExecutionException
> {
> super.execute();
> try
> {
> ScmRepository repository = getScmRepository();
> UpdateScmResult result = getScmManager().update( repository, getFileSet(),
> getScmVersion( scmVersionType, scmVersion ),
> runChangelog );
> checkResult( result );
> if ( result instanceof UpdateScmResultWithRevision )
> {
> String revision = ( (UpdateScmResultWithRevision) result ).getRevision();
> getLog().info( "Storing revision in '" + revisionKey + "' project property." );
> if ( project.getProperties() != null ) // Remove the test when we'll use plugin-test-harness 1.0-alpha-2
> {
> project.getProperties().put( revisionKey, revision );
> }
> getLog().info( "Project at revision " + revision );
> }
> }
> catch ( IOException e )
> {
> throw new MojoExecutionException( "Cannot run update command : ", e );
> }
> catch ( ScmException e )
> {
> throw new MojoExecutionException( "Cannot run update command : ", e );
> }
> }
> The problem must be that the 'revision' String is null. I guess that is a bug in the Git SCM provider, but I would argue it is also a bug in the Update mojo, which should be a little bit more resistant to null results.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira