I'm following Spring Boot Docker Tutorial from here.
I got the exact result while having an internet connection. Now I need to produce the same result in an environment without an internet connection. I copied maven repositories and docker image into the new environment. I'm quite sure maven and docker is up and running.
When I tried to run following command com.google.cloud.tools:jib-maven-plugin:dockerBuild -Dimage=eureka I'm getting error messages. I guess there are some files plugin cannot locate but not sure which ones.
I'm adding the error message
[INFO] Scanning for projects...
[INFO]
[INFO] ---------------------------< com.ays:eureka >---------------------------
[INFO] Building eureka 0.0.1-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- jib-maven-plugin:2.1.0:dockerBuild (default-cli) # eureka ---
[INFO]
[INFO] Containerizing application to Docker daemon as eureka...
[WARNING] Base image 'gcr.io/distroless/java:8' does not use a specific image digest - build may not be reproducible
[ERROR] I/O error for image [gcr.io/distroless/java]:
[ERROR] org.apache.http.conn.ConnectTimeoutException
[ERROR] Connect to gcr.io:443 [gcr.io/64.233.184.82] failed: connect timed out
[INFO] Executing tasks:
[INFO] [============ ] 40,0% complete
[INFO] > building image to Docker daemon
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 22.409 s
[INFO] Finished at: 2020-04-13T16:37:23+03:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.google.cloud.tools:jib-maven-plugin:2.1.0:dockerBuild (default-cli) on project eureka: Connect to gcr.io:443 [gcr.io/64.233.184.82] failed: connect timed out -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
Can somebody point me where should I look or is there anything I'm missing at this point?
Here is my DockerFile
FROM openjdk:8-jdk-alpine
RUN addgroup -S spring && adduser -S spring -G spring
USER spring:spring
ARG DEPENDENCY=target/dependency
COPY ${DEPENDENCY}/BOOT-INF/lib /app/lib
COPY ${DEPENDENCY}/META-INF /app/META-INF
COPY ${DEPENDENCY}/BOOT-INF/classes /app
ENTRYPOINT ["java","-cp","app:app/lib/*","hello.Application"]`
I didn't change anything in DockerFile.
If you do not specify a base image, Jib 3.0+ by default uses adoptopenjdk:8-jre as a base image for Java 8 apps. (Prior to 3.0, Jib used gcr.io/distroless/java:8 as the default.)
When you are not using a specific image digest (such as gcr.io/distroless/java#sha256:...) but instead use a tag (:8 in your case with Jib < 3.0) for a base image, the tag can point to different images over time. That is, if you build an image sometime later on a different machine, Jib may pick up a slightly different base image than you used before. Hence the following warning:
[WARNING] Base image 'gcr.io/distroless/java:8' does not use a specific image digest - build may not be reproducible
For this reason, when you are not using a digest, Jib reaches out to the registry (gcr.io) and checks if the locally cached image (not in the local Docker engine cache but Jib's own cache) is up to date. If not, Jib will download the updated image. This is why you are getting the error when you're offline.
You have two options.
Pass --offline to Maven on the command-line. Then, Jib will use the cached base image; there will be no online connection. Of course, for this to work, Jib should have cached the base image before; you need to run Jib at least once online beforehand.
Use a digest to pin down a specific base image. For example, in your pom.xml,
<configuration>
<from><image>adoptopenjdk#sha256:9cb8bc7356ec2d9de56f3be3d8204a846ca0a3220af059aa67c35d53c7138e17</image></from>
</configuration>
If you prefer, you can specify both tag and digest. However, the tag will have no effect and only serve as a comment in this case.
<from><image>adoptopenjdk:8-jre#sha256:9cb8bc7356ec2d9de56f3be3d8204a846ca0a3220af059aa67c35d53c7138e17</image></from>
To find out what digest to use, check the adoptopenjdk Docker Hub repository. Another way is to run Jib once online. After the warning, you will see a message reporting the current digest for the tag.
[WARNING] Base image 'adoptopenjdk:8-jre' does not use a specific image digest - build may not be reproducible
[INFO] Using base image with digest: sha256:9cb8bc7356ec2d9de56f3be3d8204a846ca0a3220af059aa67c35d53c7138e17
Another option when you're running a local Docker daemon is to make Jib use an image from the daemon by prefixing docker:// to the base image (for example, <image>docker://openjdk:11-jre-slim</image>). However, depending on circumstances, this can be a little be slower than using a remote base image (but probably not so much even in that case).
Lastly, you can delete your Dockerfile. Jib does not use Dockerfile, Docker CLI, or Docker daemon.
Related
I try to CI/CD for the jave open source project, which is hosted on github.
When I build the project with maven local, then it works just fine.
But the same maven build fails when triggered inside the github/gitaction environment when building the jave-core target.
https://github.com/a-schild/jave2/blob/develop/jave-core/pom.xml
The special thing, is that I use the org.codehaus.mojo buildnumber-maven-plugin and also the org.codehaus.mojo templating-maven-plugin.
I think it fails because of this, but I am unable to find how to fix it.
Here is the gitaction
https://github.com/a-schild/jave2/blob/master/.github/workflows/maven.yml
And here the error log of the build
[INFO] Executing: /bin/sh -c cd '/home/runner/work/jave2/jave2/jave-core' && 'git' 'log' '-n1' '--date-order'
[INFO] Working directory: /home/runner/work/jave2/jave2/jave-core
[INFO] Executing: /bin/sh -c cd '/home/runner/work/jave2/jave2/jave-core' && 'git' 'pull' 'https://github.com/a-schild/jave2.git'
[INFO] Working directory: /home/runner/work/jave2/jave2/jave-core
Error: Provider message:
Error: The git-pull command failed.
Error: Command output:
Error: From https://github.com/a-schild/jave2
* branch HEAD -> FETCH_HEAD
hint: You have divergent branches and need to specify how to reconcile them.
hint: You can do so by running one of the following commands sometime before
hint: your next pull:
hint:
hint: git config pull.rebase false # merge
hint: git config pull.rebase true # rebase
hint: git config pull.ff only # fast-forward only
hint:
hint: You can replace "git config" with "git config --global" to set a default
hint: preference for all repositories. You can also pass --rebase, --no-rebase,
hint: or --ff-only on the command line to override the configured default per
hint: invocation.
fatal: Need to specify how to reconcile divergent branches.
I am on windows and this is the plugin configuration:
<plugin>
<groupId>com.google.cloud.tools</groupId>
<artifactId>jib-maven-plugin</artifactId>
<version>3.2.1</version>
<configuration>
<container>
<ports>
<port>8080</port>
</ports>
<format>OCI</format>
</container>
</configuration>
</plugin>
This is the command I run:
.\mvnw clean install jib:dockerBuild -Dimage=fullstack:v1
This is the error I keep getting no matter what I do:
[ERROR] Failed to execute goal com.google.cloud.tools:jib-maven-plugin:3.2.1:dockerBuild (default-cli) on project SpringBootFullStack: Build
to Docker daemon failed, perhaps you should make sure your credentials for 'registry-1.docker.io/library/eclipse-temurin' are set up correc
tly. See https://github.com/GoogleContainerTools/jib/blob/master/docs/faq.md#what-should-i-do-when-the-registry-responds-with-unauthorized f
or help: Unauthorized for registry-1.docker.io/library/eclipse-temurin: 401 Unauthorized
[ERROR] {"details":"incorrect username or password"}
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
How should I go about it? I've read the documentation on jib github repo on authenticating but I don't really understand how to procede and feel overwhelmed
UPDATE
I ran docker login and I get:
Authenticating with existing credentials...
Login Succeeded
but the error persists (and I figured I didn't include some part of the logging maybe:
[INFO] Using credentials from Docker config (C:\Users\david\.docker\config.json) for openjdk:17
[INFO] Executing tasks:
[INFO] [============ ] 40.0% complete
[INFO] > building image to Docker daemon
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.964 s
[INFO] Finished at: 2022-05-17T19:39:12+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.google.cloud.tools:jib-maven-plugin:3.2.1:dockerBuild (default-cli) on project SpringBootFullStack: Build
to Docker daemon failed, perhaps you should make sure your credentials for 'registry-1.docker.io/library/openjdk' are set up correctly. See
Unauthorized for registry-1.docker.io/library/openjdk: 401 Unauthorized
[ERROR] {"details":"incorrect username or password"}
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
UPDATE 2
this is also the content of the file logs refer to in order to get username and password:
{
"auths": {
"https://index.docker.io/v1/": {}
},
"credsStore": "desktop"
}
UPDATE 3
After two days of trying I decided to look for something else that would do the same job: https://spring.io/guides/gs/spring-boot-docker/
And with this the job was done in ~10 minutes. Life really is crazy
Just delete the credsStore property from the docker-config file.
You will find the config.json at your user-home dir.
the path is: $USER/.docker/config.json
and suppose the file contains the followings,
{
"auths": {
"https://index.docker.io/v1/": {}
},
"credsStore": "desktop"
}
and now delete the line :
"credsStore": "desktop"
So, the file will now contain the following
{
"auths": {
"https://index.docker.io/v1/": {}
}
}
{"details":"incorrect username or password"}
The response from the server is clear. Credentials were given to the server, and it says they are wrong.
Indeed, Jib did retrieve some (probably non-working) credentials from the Docker config.json file:
[INFO] Using credentials from Docker config (C:\Users\david\.docker\config.json) for openjdk:17
Try emptying config.json entirely or have just an empty {} block. Particularly, remove the entry for "https://index.docker.io/v1/" and credsStore. Deleting the file may or may not work, as Docker or other tools can regenerate it with wrong credentials again.
Probably the same kind of issue to this Stack Overflow question. Also take a look at this GitHub issue on the Jib repo.
I had the same issue on Mac.
And I found 2 ways how to solve it:
To do this, you can use the jib config:
<configuration>
...
<from>
<image>aws_account_id.dkr.ecr.region.amazonaws.com/my-base-image</image>
<auth>
<username>my_username</username>
<password>my_password</password>
</auth>
</from>
<to>
<image>gcr.io/my-gcp-project/my-app</image>
<auth>
<username>${env.REGISTRY_USERNAME}</username>
<password>${env.REGISTRY_PASSWORD}</password>
</auth>
</to>
...
</configuration>
https://github.com/GoogleContainerTools/jib/blob/master/jib-maven-plugin/README.md#auth-object
The second way is not about Windows, i fixed this issue on Mac OS but you can try to use my experience. I figured that it's strange if we're getting 401 unauthorized the most likely Jib trying to login with some wrong credentials.
In my case i found 2 rows in Keychain Access:
The first (wrong) with email in password (instead real password))
The second (correct) with real password
Jib tried to use first. The problem was solved after deleting the first value.
In windows case you can try to use Credential Manager or find some another credentials storage.
Additionally.
While i was researching it i found recommendations to change:
"credsStore": "desktop" -> "credStore": "desktop"
But it didn't work for me.
UPD
Same story on Windows use Credential Manager
I ran into the same problem on Windows.
Try removing the following creds:
..docker../acces-token
..docker../refresh-token
https://i.stack.imgur.com/G9aGR.png
If you don't want to go the extra credentials configuration step, pass them when running mvn package as below:
mvn package -D jib.to.auth.username="yourdockerUsername" -Djib.to.auth.password="yourDockerPassword"
It will build and push to docker Hub as required.
I had the issue on windows and solved the problem as follows:
Control Panel\All Control Panel Items\Credential Manager
From here I have removed in the Generic Credentials section all the entries related to docker
The from the powershell prompt:
docker login
and it worked!
faced same issue on win10 ... had to close docker desktop, I got some WARN related to credentials though, but it created the img
I have been trying to get more into the methodology of continuous integration as of recent, and have chosen Travis CI for the job. However, on one of my projects that uses Java and Kotlin my local builds pass, but fail on Travis.
I've been unable to make sense of the error messages that I am getting as to why my build is failing. kotlin-maven-plugin seems to be the origin of the errors. The problematic command as seen in the build logs is mvn install -DskipTests=true -Dmaven.javadoc.skip=true -B -V.
I have run this command locally with no errors and a successful build.
Here's a relevant snippet of the stack trace from the CI Build Job:
[INFO] --- kotlin-maven-plugin:1.4.32:compile (compile) # BytesToJava ---
[ERROR] java.lang.ExceptionInInitializerError
at com.intellij.pom.java.LanguageLevel.<clinit>(LanguageLevel.java:25)
at com.intellij.core.CoreLanguageLevelProjectExtension.<init>(CoreLanguageLevelProjectExtension.java:26)
at com.intellij.core.JavaCoreProjectEnvironment.<init>(JavaCoreProjectEnvironment.java:42)
at org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreProjectEnvironment.<init>(KotlinCoreProjectEnvironment.kt:26)
at org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment$ProjectEnvironment.<init>(KotlinCoreEnvironment.kt:121)
at org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment$Companion.createForProduction(KotlinCoreEnvironment.kt:425)
Would appreciate some resources or even a relevant issue thread. Thanks in advance :)
Travis Build Logs
The problem was being caused by an issue with illegal reflective operations and the Kotlin Maven Plugin with any project over Java 9 (my project uses Java 15). As described by this thread on YouTrack, a workaround is to:
A workaround is to run mvn with the following environment variable: MAVEN_OPTS=--illegal-access=permit
Adding a global environment variable with the same value to my .travis.yml fixed the issue.
I am trying to compile a fat jar for my Scala project that contains all of my dependencies according to this stackoverflow post, so that I can use it in a Java application. I am new to Scala/Java/JVM, so please be patient. I am using IntelliJ and scala 2.12.4, however I am running my sbt commands from the OS X Terminal.
To start, I am able to run sbt assembly and get a padsystem-assembly-0.0.1.jar in /target/scala-2.12/. (I had to make an assembly.sbt and modify my build.sbt with a "Merge Strategy" to get it to work.) However when I try to run this jar with scala
computer: dir user$ scala target/scala-2.12/padsystem-assembly-0.0.1.jar
scala target/scala-2.12/padsystem-assembly-0.0.1.jar
java.lang.NullPointerException
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:348)
at scala.reflect.internal.util.ScalaClassLoader.$anonfun$tryClass$1(ScalaClassLoader.scala:45)
at scala.util.control.Exception$Catch.$anonfun$opt$1(Exception.scala:242)
at scala.util.control.Exception$Catch.apply(Exception.scala:224)
at scala.util.control.Exception$Catch.opt(Exception.scala:242)
at scala.reflect.internal.util.ScalaClassLoader.tryClass(ScalaClassLoader.scala:45)
at scala.reflect.internal.util.ScalaClassLoader.tryToInitializeClass(ScalaClassLoader.scala:41)
at scala.reflect.internal.util.ScalaClassLoader.tryToInitializeClass$(ScalaClassLoader.scala:41)
at scala.reflect.internal.util.ScalaClassLoader$URLClassLoader.tryToInitializeClass(ScalaClassLoader.scala:125)
at scala.reflect.internal.util.ScalaClassLoader.run(ScalaClassLoader.scala:92)
at scala.reflect.internal.util.ScalaClassLoader.run$(ScalaClassLoader.scala:91)
at scala.reflect.internal.util.ScalaClassLoader$URLClassLoader.run(ScalaClassLoader.scala:125)
at scala.tools.nsc.CommonRunner.run(ObjectRunner.scala:22)
at scala.tools.nsc.CommonRunner.run$(ObjectRunner.scala:21)
at scala.tools.nsc.JarRunner$.run(MainGenericRunner.scala:14)
at scala.tools.nsc.CommonRunner.runAndCatch(ObjectRunner.scala:29)
at scala.tools.nsc.CommonRunner.runAndCatch$(ObjectRunner.scala:28)
at scala.tools.nsc.JarRunner$.runAndCatch(MainGenericRunner.scala:14)
at scala.tools.nsc.JarRunner$.runJar(MainGenericRunner.scala:26)
at scala.tools.nsc.MainGenericRunner.runTarget$1(MainGenericRunner.scala:72)
at scala.tools.nsc.MainGenericRunner.run$1(MainGenericRunner.scala:85)
at scala.tools.nsc.MainGenericRunner.process(MainGenericRunner.scala:96)
at scala.tools.nsc.MainGenericRunner$.main(MainGenericRunner.scala:101)
at scala.tools.nsc.MainGenericRunner.main(MainGenericRunner.scala)
And when I try to run it with java (which is my main goal):
computer: dir user$ java target/scala-2.12/padsystem-assembly-0.0.1.jar
Error: Could not find or load main class target.scala-2.12.padsystem-assembly-0.0.1.jar
Now, before you ask, "Are you sure your code is working?", I will note that I am able to sbt run my code successfully, and I can also sbt compile and sbt package it successfully as well.
Interestingly, if I try to sbt compile src/main/scala/OdinExtractor.scala from the base directory:
sbt compile src/main/scala/OdinExtractor.scala
[info] Loading settings from idea.sbt ...
[info] Loading global plugins from /Users/user/.sbt/1.0/plugins
[info] Loading project definition from /Users/user/PAD_IE/project/project
[info] Loading settings from assembly.sbt,plugins.sbt ...
[info] Loading project definition from /Users/user/PAD_IE/project
[info] Loading settings from build.sbt ...
[info] Set current project to padsystem (in build file:/Users/user/PAD_IE/)
[info] Executing in batch mode. For better performance use sbt's shell
[success] Total time: 4 s, completed Mar 16, 2018 3:35:49 PM
[error] Expected ID character
[error] Not a valid command: src (similar: set)
[error] Expected project ID
[error] Expected configuration
[error] Expected ':' (if selecting a configuration)
[error] Expected key
[error] Not a valid key: src (similar: sources, ps, run)
[error] src/main/scala/OdinExtractor.scala
[error] ^
OR if I try to scalac src/main/scala/OdinExtractor.scala or if I cd into the src/main/scala dir and try to run sbt compile OdinExtractor.scala I get:
[info] Loading settings from idea.sbt ...
[info] Loading global plugins from /Users/user/.sbt/1.0/plugins
[info] Updating ProjectRef(uri("file:/Users/user/.sbt/1.0/plugins/"), "global-plugins")...
[info] Done updating.
[info] Set current project to scala (in build file:/Users/user/PAD_IE/src/main/scala/)
[info] Executing in batch mode. For better performance use sbt's shell
[info] Compiling 1 Scala source to /Users/user/PAD_IE/src/main/scala/target/scala-2.12/classes ...
[error] /Users/user/PAD_IE/src/main/scala/OdinExtractor.scala:3:12: object clulab is not a member of package org
[error] import org.clulab.odin.Mention
[error] ^
[error] /Users/user/PAD_IE/src/main/scala/OdinExtractor.scala:4:12: object clulab is not a member of package org
[error] import org.clulab.processors.Document
[error] ^
[error] /Users/user/PAD_IE/src/main/scala/OdinExtractor.scala:5:12: object vinci is not a member of package org
[error] import org.vinci.pad.padsystem.PadSystem
[error] ^
[error] three errors found
[error] (Compile / compileIncremental) Compilation failed
[error] Total time: 1 s, completed Mar 16, 2018 3:38:06 PM
Why would I be able to sbt run my code successfully, but not be able to run the jar with scala or java, especially when all of the dependencies are included in the fat jar?
Why do I get errors with my depdencies when I do scalac src/main/scala/OdinExtractor.scala and sbt compile OdinExtractor.scala? The first I am guessing because scalac wants something like
scalac -cp "all:of:the:classpath:stuff:ever" OdinExtractor.scala.
(By the way, I can't figure out how to do this...)
Which, as I understand, is why we use sbt to begin with, yes? To avoid the messy classpath stuff. Which brings me to my next question: Why does sbt compile fail when I point it at the specific file? And why does it fail when I run it from the src/main/scala directory? I don't know about the first one, but my guess for the second question is that sbt must always be run from the base directory?
Back to the main goal: producing a fat jar that I can run with Java... Does anyone have any idea how I can debug this? I don't understand why the assembly jar fails, but the code still runs with sbt run. I originally thought the best way to debug this would be to just compile the object with def main(), and try to run it with both Scala and Java, but this has proven very troublesome.
In the end, I have an eerie feeling that perhaps all of this boils down to either 1) my confusion about classpaths, or 2) perhaps my project structure? But since my stuff runs with sbt run, I'm just at a total loss... Please help! Let me know if there's anything else I need to add to my post to make it more clear. Thanks!
Edit -
Per my build.sbt I did include the scala-library jar, so that it can be parsed by Java.
I.e. "org.scala-lang" % "scala-library" % "2.12.4"
Also, if its of any importance, my Object has a def main instead of extends App. Not sure if that matters...
The answer ended up being with the build.sbt. I found the answer in this stackoverflow post. I had to add
mainClass in assembly := Some("NameOfMyMainClass")
into the build.sbt.
After that, I did
sbt clean assembly
and was able to run both java -jar target/.../my-fat-jar.jar and scala target/.../my-fat-jar.jar.
Shoutout to #laughedelic for pointing out that I should use java -jar, and for answering my question about sbt compile src/... :')
I'm trying to execute a mvn release:prepare on my project and it runs up until the very end where it tries to commit the tag then it fails:
[INFO] Tagging release with the label v1.8.0...
[INFO] Executing: /bin/sh -c cd /Users/terraframe/Documents/workspace/Runway-SDK && git tag -F /var/folders/tY/tY5PnSNPED0Yr7FtapST2++++TI/-Tmp-/maven-scm-864030210.commit v1.8.0
[INFO] Working directory: /Users/terraframe/Documents/workspace/Runway-SDK
[INFO] Executing: /bin/sh -c cd /Users/terraframe/Documents/workspace/Runway-SDK && git push ssh://git#github.com/terraframe v1.8.0
...
Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.4.1:prepare (default-cli) on project runwaysdk-main: Unable to tag SCM
[ERROR] Provider message:
[ERROR] The git-push command failed.
[ERROR] Command output:
[ERROR] ERROR: Repository not found.
[ERROR] fatal: The remote end hung up unexpectedly
The specific git command that fails is:
git push ssh://git#github.com/terraframe v1.8.0
Here's my scm definition in my runwaysdk-main pom:
<scm>
<connection>scm:git:ssh://git#github.com/terraframe/Runway-SDK.git</connection>
<developerConnection>scm:git:ssh://git#github.com/terraframe/Runway-SDK.git</developerConnection>
<url>scm:git:ssh://git#github.com/terraframe/Runway-SDK.git</url>
</scm>
tldr: My repo url is defined as scm:git:ssh://git#github.com/terraframe/Runway-SDK.git
Yet this git push command is trying to push to ssh://git#github.com/terraframe.
Why? And how do I fix it?
Edit:
I am executing this on a parent pom (runwaysdk-main) of a multi-module with a flat project structure:
github.com/terraframe/Runway-SDK
/runwaysdk-main
/runwaysdk-common
/runwaysdk-client
/runwaysdk-server
I am using the latest version of the maven-release-plugin, 2.4.1.
I think you're hitting https://issues.apache.org/jira/browse/SCM-709. As a workaround, you could use version 2.3.2 of the maven-release-plugin