[GRADLE-840] Internal regX error Created: 03/Mar/10  Updated: 04/Jan/13  Resolved: 24/Nov/10

Status: Resolved
Project: Gradle
Affects Version/s: 0.8
Fix Version/s: 0.9-rc-1

Type: Bug
Reporter: Alexander Carman Assignee: Adam Murdoch
Resolution: Fixed Votes: 0


 Description   

I have found if I try to execute a task with an option that is not recognized I get an internal regX error, here is the output to the console:

C:\Development\webctrl\main\dev>packageDist -Pi4jinst=C:\Program Files\install4j

'packageDist' is not recognized as an internal or external command,
operable program or batch file.

C:\Development\webctrl\main\dev>gradle packageDist -Pi4jinst=C:\Program Files\in
stall4j
Working on webctrl:popup

FAILURE: Build aborted because of an internal error.

  • What went wrong:
    Build aborted because of an unexpected internal error. Please file an issue at:
    www.gradle.org.
  • Try:
    Run with -d option to get additional debug info.
  • Exception is:
    java.util.regex.PatternSyntaxException: Illegal/unsupported escape sequence near
    index 35
    \Q\EFiles[\p {javaLowerCase}\p{Digit}]*\Q\E\install[\p{javaLowerCase}

    \p

    {Digit}

    ]*\
    Q4j\E
    ^
    at java.util.regex.Pattern.error(Pattern.java:1713) [na:1.6.0_17]
    at java.util.regex.Pattern.escape(Pattern.java:2177) [na:1.6.0_17]
    at java.util.regex.Pattern.atom(Pattern.java:1952) [na:1.6.0_17]
    at java.util.regex.Pattern.sequence(Pattern.java:1834) [na:1.6.0_17]
    at java.util.regex.Pattern.expr(Pattern.java:1752) [na:1.6.0_17]
    at java.util.regex.Pattern.compile(Pattern.java:1460) [na:1.6.0_17]
    at java.util.regex.Pattern.<init>(Pattern.java:1133) [na:1.6.0_17]
    at java.util.regex.Pattern.compile(Pattern.java:823) [na:1.6.0_17]
    at org.gradle.util.NameMatcher.getPatternForName(NameMatcher.java:111) [
    gradle-core-0.9-20091221160531-0500.jar:0.9-20091221160531-0500]
    at org.gradle.util.NameMatcher.find(NameMatcher.java:63) [gradle-core-0.
    9-20091221160531-0500.jar:0.9-20091221160531-0500]
    at org.gradle.execution.TaskNameResolvingBuildExecuter.doSelect(TaskName
    ResolvingBuildExecuter.java:102) [gradle-core-0.9-20091221160531-0500.jar:0.9-20
    091221160531-0500]
    at org.gradle.execution.TaskNameResolvingBuildExecuter.select(TaskNameRe
    solvingBuildExecuter.java:41) [gradle-core-0.9-20091221160531-0500.jar:0.9-20091
    221160531-0500]
    at org.gradle.execution.DelegatingBuildExecuter.select(DelegatingBuildEx
    ecuter.java:46) [gradle-core-0.9-20091221160531-0500.jar:0.9-20091221160531-0500
    ]
    at org.gradle.execution.DefaultBuildExecuter.select(DefaultBuildExecuter
    .java:52) [gradle-core-0.9-20091221160531-0500.jar:0.9-20091221160531-0500]
    at org.gradle.GradleLauncher.doBuildStages(GradleLauncher.java:191) [gra
    dle-core-0.9-20091221160531-0500.jar:0.9-20091221160531-0500]
    at org.gradle.GradleLauncher.doBuild(GradleLauncher.java:133) [gradle-co
    re-0.9-20091221160531-0500.jar:0.9-20091221160531-0500]
    at org.gradle.GradleLauncher.run(GradleLauncher.java:103) [gradle-core-0
    .9-20091221160531-0500.jar:0.9-20091221160531-0500]
    at org.gradle.launcher.Main.execute(Main.java:93) [gradle-launcher-0.9-2
    0091221160531-0500.jar:0.9-20091221160531-0500]
    at org.gradle.launcher.Main.main(Main.java:42) [gradle-launcher-0.9-2009
    1221160531-0500.jar:0.9-20091221160531-0500]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [na:1.6.0
    _17]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
    java:39) [na:1.6.0_17]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:25) [na:1.6.0_17]
    at java.lang.reflect.Method.invoke(Method.java:597) [na:1.6.0_17]
    at org.gradle.launcher.GradleMain.main(GradleMain.java:51) [gradle-launc
    her-0.9-20091221160531-0500.jar:0.9-20091221160531-0500]

BUILD FAILED

Total time: 10.373 secs

C:\Development\webctrl\main\dev>

In this case the variable should have been written like this -Pi4jinst="C:\Program Files\install4j", this would have worked without issue.



 Comments   
Comment by Adam Murdoch [ 03/Mar/10 ]

Fixed the internal error.

It will now tell you that task 'Files\install4j' is not found. You will need to quote the -P argument if the value has spaces in it, ie "-Pi4jinst=c:\Program Files\install4j"

Generated at Wed Jun 30 11:40:17 CDT 2021 using Jira 8.4.2#804003-sha1:d21414fc212e3af190e92c2d2ac41299b89402cf.