[
https://issues.apache.org/jira/browse/SCM-159?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17964359#comment-17964359
]
Olivier Lamy commented on SCM-159:
----------------------------------
This project has moved from Jira to GitHub Issues. This issue was migrated to
[apache/maven-scm#435|https://github.com/apache/maven-scm/issues/435].
> NumberFormatException when you include a port in your scm url
> -------------------------------------------------------------
>
> Key: SCM-159
> URL: https://issues.apache.org/jira/browse/SCM-159
> Project: Maven SCM (Moved to GitHub Issues)
> Issue Type: Bug
> Components: maven-scm-provider-svn
> Affects Versions: 1.0-beta-3
> Environment: osx 10.4.4, java 1.4.2_09
> Reporter: Julian Wood
> Assignee: Emmanuel Venisse
> Priority: Major
> Fix For: 1.0-beta-3
>
> Attachments: SCM-159-maven-scm-provider-svn.patch
>
>
> This bug came about in a strange way. I have always had URLs like:
> scm:svn:http://[email protected]:8800/pmgt/trunk
> and they have always worked for me. But when I came to write a small plugin
> which used scm, I found I kept getting this error:
> org.apache.maven.lifecycle.LifecycleExecutionException: An error is occurred
> in the status process.
> ...
> Caused by: org.apache.maven.plugin.MojoExecutionException: An error is
> occurred in the status process.
> ...
> Caused by: org.apache.maven.scm.ScmException: Can't load the scm provider.
> ...
> Caused by: java.lang.NumberFormatException: For input string: ":8800"
> at
> java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
> at java.lang.Integer.parseInt(Integer.java:468)
> at java.lang.Integer.parseInt(Integer.java:518)
> at
> org.apache.maven.scm.provider.svn.repository.SvnScmProviderRepository.parseUrl(SvnScmProviderRepository.java:126)
> at
> org.apache.maven.scm.provider.svn.repository.SvnScmProviderRepository.<init>(SvnScmProviderRepository.java:42)
> at
> org.apache.maven.scm.provider.svn.SvnScmProvider.parseScmUrl(SvnScmProvider.java:251)
> at
> org.apache.maven.scm.provider.svn.SvnScmProvider.makeProviderScmRepository(SvnScmProvider.java:80)
> at
> org.apache.maven.scm.manager.AbstractScmManager.makeScmRepository(AbstractScmManager.java:134)
> at
> org.apache.maven.plugins.release.helpers.ScmHelper.getScmRepository(ScmHelper.java:86)
> Now this of course didn't happen during release:prepare, or with the
> changelog plugin. So I changed around the <developerConnection> tag, and it
> turns out that it can be anything and these two goals still work, presumably
> because sufficient svn information is somewhere else.
> In any case, I needed it to work for my plugin, and found that the index of
> the colon is off by one character in SvnScmProviderRepository.parseUrl, as
> the error message implies.
> This patch fixes that, and adds some unit tests.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)