You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Michael Osipov (Jira)" <ji...@apache.org> on 2022/04/15 14:22:00 UTC

[jira] [Closed] (MENFORCER-416) Range [0, 3) out of bounds for length 2

     [ https://issues.apache.org/jira/browse/MENFORCER-416?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael Osipov closed MENFORCER-416.
------------------------------------
    Resolution: Cannot Reproduce

Works for me:
{noformat}
D:\Entwicklung\Projekte\sample> D:\Entwicklung\Programme\apache-maven-3.8.5\bin\mvn.cmd validate -V
Apache Maven 3.8.5 (3599d3414f046de2324203b78ddcf9b5e4388aa0)
Maven home: D:\Entwicklung\Programme\apache-maven-3.8.5
Java version: 18, vendor: Eclipse Adoptium, runtime: D:\Entwicklung\Programme\jdk-18+36
Default locale: de_DE, platform encoding: UTF-8
OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
[INFO] Scanning for projects...
[INFO]
[INFO] -----------------------< org.foo.modules:sample >-----------------------
[INFO] Building sample 1.0.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-enforcer-plugin:3.0.0:enforce (enforce-versions) @ sample ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  0.494 s
[INFO] Finished at: 2022-04-15T16:20:40+02:00
[INFO] ------------------------------------------------------------------------
D:\Entwicklung\Projekte\sample>
{noformat}

> Range [0, 3) out of bounds for length 2
> ---------------------------------------
>
>                 Key: MENFORCER-416
>                 URL: https://issues.apache.org/jira/browse/MENFORCER-416
>             Project: Maven Enforcer Plugin
>          Issue Type: Bug
>            Reporter: Thomas LE CLERE
>            Priority: Major
>         Attachments: sample.zip
>
>
> Hello,
> I face an issue when I compile a maven project: 
> {code:java}
> Caused by: java.lang.StringIndexOutOfBoundsException: Range [0, 3) out of bounds for length 2
>     at jdk.internal.util.Preconditions$1.apply (Preconditions.java:55)
>     at jdk.internal.util.Preconditions$1.apply (Preconditions.java:52)
>     at jdk.internal.util.Preconditions$4.apply (Preconditions.java:213)
>     at jdk.internal.util.Preconditions$4.apply (Preconditions.java:210)
>     at jdk.internal.util.Preconditions.outOfBounds (Preconditions.java:98)
>     at jdk.internal.util.Preconditions.outOfBoundsCheckFromToIndex (Preconditions.java:112)
>     at jdk.internal.util.Preconditions.checkFromToIndex (Preconditions.java:349)
>     at java.lang.String.checkBoundsBeginEnd (String.java:4589)
>     at java.lang.String.substring (String.java:2703)
>     at org.apache.commons.lang.SystemUtils.getJavaVersionAsFloat (SystemUtils.java:1122)
>     at org.apache.commons.lang.SystemUtils.<clinit> (SystemUtils.java:818)
>     at org.apache.maven.plugins.enforcer.RequireJavaVersion.execute (RequireJavaVersion.java:52)
>     at org.apache.maven.plugins.enforcer.EnforceMojo.execute (EnforceMojo.java:190)
>     at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
>     at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:301)
>     at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:211)
>     at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:165)
>     at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:157)
>     at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:121)
>     at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
>     at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
>     at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:127)
>     at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:294)
>     at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
>     at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
>     at org.apache.maven.cli.MavenCli.execute (MavenCli.java:960)
>     at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:293)
>     at org.apache.maven.cli.MavenCli.main (MavenCli.java:196)
>     at jdk.internal.reflect.DirectMethodHandleAccessor.invoke (DirectMethodHandleAccessor.java:104)
>     at java.lang.reflect.Method.invoke (Method.java:577)
>     at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
>     at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
>     at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
>     at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347) {code}
> Here is my settings
> {code:java}
> Apache Maven 3.8.5 (3599d3414f046de2324203b78ddcf9b5e4388aa0)
> Maven home: /usr/local/Cellar/maven/3.8.5/libexec
> Java version: 18, vendor: Homebrew, runtime: /usr/local/Cellar/openjdk/18/libexec/openjdk.jdk/Contents/Home
> Default locale: fr_FR, platform encoding: UTF-8
> OS name: "mac os x", version: "10.15.7", arch: "x86_64", family: "mac" {code}
> Thanks in advance for your help.
> Regards,



--
This message was sent by Atlassian Jira
(v8.20.1#820001)