You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Robert Scholte (JIRA)" <ji...@apache.org> on 2018/08/17 09:08:00 UTC
[jira] [Comment Edited] (MRELEASE-750) String index out of range:
-1 in ReleaseUtils.loadResolvedDependencies() when using
Parent-Module-Layout
[ https://issues.apache.org/jira/browse/MRELEASE-750?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14445469#comment-14445469 ]
Robert Scholte edited comment on MRELEASE-750 at 8/17/18 9:07 AM:
------------------------------------------------------------------
Update: I just figured out it was because of -Ddependency.locations.enabled=false, see MRELEASE-834. Removing this property repaired the broken build.
was (Author: semeion):
Update: I just figured out it was because of -Ddependency.locations.enabled=false, see https://jira.codehaus.org/browse/MRELEASE-834. Removing this property repaired the broken build.
> String index out of range: -1 in ReleaseUtils.loadResolvedDependencies() when using Parent-Module-Layout
> --------------------------------------------------------------------------------------------------------
>
> Key: MRELEASE-750
> URL: https://issues.apache.org/jira/browse/MRELEASE-750
> Project: Maven Release Plugin
> Issue Type: Bug
> Components: prepare
> Affects Versions: 2.3
> Reporter: Thomas Baldauf
> Assignee: Robert Scholte
> Priority: Major
> Fix For: 2.4
>
> Attachments: MNG-750-release.patch, ReleaseUtils.java
>
>
> [ERROR] Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.XXX:prepare (default-cli) on project XXX: Execution default-cli of goal org.apache.maven.plugins:maven-release-plugin:2.XXX:prepare failed: String index out of range: -1 -> [Help 1]
> This is happening in org.apache.maven.shared.release.config.ReleaseUtils.loadResolvedDependencies(..),
> line number 250:
> artifactVersionlessKey = propertyName.substring( startIndex, endIndex );
> Apparently endIndex can be -1 under special circumstances. Defensive programming fixes the problem.
> Proposed patch (see attachment):
> if (endIndex > startIndex) {
> artifactVersionlessKey = propertyName.substring( startIndex, endIndex );
> } else {
> artifactVersionlessKey = propertyName.substring( startIndex );
> }
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)