Question

I am trying to use maven release plugin to make a release of my multi-module project. when i execute

mvn release:prepare

i get following error

ERROR] Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.0:prepare (default-cli) on project sample-packt-serverside: Execution defau
t-cli of goal org.apache.maven.plugins:maven-release-plugin:2.0:prepare failed: String index out of range: -1 -> [Help 1]

then i tried to execute

mvn -e -X release:prepare

then i see the following output on the console

could anybody help me to resolve this isssue.

enter image description here

Was it helpful?

Solution

You're missing the trailing letter s in groupId of the plugin. Correct declaration should be:

<dependency>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-release-plugin</artifactId>
    <version>2.1</version>
</dependency>

I'd also consider upgrading to a fresher version. As far as I can see, current version is 2.4.1.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top