Maven: The scm url does not contain a valid delimiter
I'm trying to get automatic buildNumers working but I keep running into the error
The scm url does not contain a valid delimiter
Here's the relevant part of the pom.
<scm>
<connection>scm:svn:${source.repo}</connection>
<developerConnection>scm:svn:${source.repo}</developerConnection>
<url>${source.repo}</url>
</scm>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>buildnumber-maven-plugin</artifactId>
<version>1.0</version>
<executions>
<execution>
<phase>validate</phase>
<goals>
<goal>create</goal>
</goals>
</execution>
</executions>
<configuration>
<revisionOnScmFailure>1</revisionOnScmFailure>
<format>{0,number}</format>
<items>
<item>buildNumber0</item>
</items>
</configuration>
</plugin>
<properties>
<source.repo>svn://myserver/repository/${project.artifactId}</source.repo>
[..]
</properties>
The subversion location contains two sub projects core and web.
If anyone can help, I feel like I've tried everything.
I've tried the following:
- using pipes: invalid url
- retrieving a list of items from the server using the repo url from the command line: works fine
- adding /trunk to the repo url: delimiter error
- adding /trunk/core to the repo url: delimiter error
- adding /trunk/web to the repo url: delimiter error
The delimiter error is probably hiding a different error because I dont think the url is wrong.
Here's the stack
java.lang.IllegalArgumentException: The scm url does not contain a valid delimit
er.
at org.apache.maven.scm.provider.ScmUrlUtils.getDelimiter(ScmUrlUtils.ja
va:61)
at org.apache.maven.scm.manager.AbstractScmManager.makeScmRepository(Abs
tractScmManager.java:186)
at org.codehaus.mojo.build.CreateMojo.getScmRepository(CreateMojo.java:7
68)
at org.codehaus.mojo.build.CreateMojo.getScmBranch(CreateMojo.java:619)
at org.codehaus.mojo.build.CreateMojo.execute(CreateMojo.java:464)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi
nManager.java:490)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
ultLifecycleExecutor.java:694)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLi
fecycle(DefaultLifecycleExecutor.java:556)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau
ltLifecycleExecutor.java:535)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan
dleFailures(DefaultLifecycleExecutor.java:387)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen
ts(DefaultLifecycleExecutor.java:348)
at org开发者_StackOverflow社区.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi
fecycleExecutor.java:180)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:6
0)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Thanks, Marc
Try running the command:
mvn help:effective-pom
And check the output. That and the other help commands should help you trouble-shoot your Maven settings (e.g. expression evaluation, profiles, etc.)
It is possibly because you are using a placeholder in the URI, and Maven is not expanding it before using it.
I've battled this kind of thing myself with Maven, and sometimes you just have to give up and do the expansion by hand.
Another possibility was that the expanded URL scm:svn:svn://myserver/repository/....
was wrong, but @ach_l's comment convinces me that's not the problem.
精彩评论