[
https://issues.apache.org/jira/browse/SCM-159?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17960610#comment-17960610
]
ASF GitHub Bot commented on SCM-159:
------------------------------------
jira-importer opened a new issue, #435:
URL: https://github.com/apache/maven-scm/issues/435
**[Julian
Wood](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=woodj)**
opened
**[SCM-159](https://issues.apache.org/jira/browse/SCM-159?redirect=false)** and
commented
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.
---
**Affects:** 1.0-beta-3
**Attachments:**
-
[SCM-159-maven-scm-provider-svn.patch](https://issues.apache.org/jira/secure/attachment/12718877/SCM-159-maven-scm-provider-svn.patch)
(_2.99 kB_)
> 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)