# Wrong line number in build script syntax error

**URL:** <https://discuss.gradle.org/t/wrong-line-number-in-build-script-syntax-error/1548>\
**Category:** Old Forum Archive\
**Created:** [August 12, 2014, 9:42pm UTC](https://discuss.gradle.org/t/wrong-line-number-in-build-script-syntax-error/1548 "2014-08-12T21:42:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Robert1](https://avatars.discourse-cdn.com/v4/letter/r/48db29/32.png) [@Robert1](https://discuss.gradle.org/u/Robert1)\
**Post date:** [August 12, 2014, 9:42pm UTC](https://discuss.gradle.org/t/wrong-line-number-in-build-script-syntax-error/1548/1 "2014-08-12T21:42:00Z")

</div>

A syntax error in my Gradle build script gives the wrong line number (line 148 when the build script only has 7 lines).

robert@pferdeapfel:~/hrsn\> gradle

FAILURE: Build failed with an exception.

- Where:

Build file ‘/Users/robert/hrsn/build.gradle’ line: 148

- What went wrong:

Could not compile build file ‘/Users/robert/hrsn/build.gradle’.

> startup failed:

build file ‘/Users/robert/hrsn/build.gradle’: 148: expecting ‘}’, found ‘’ @ line 148, column 1.

1 error

- Try:

Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 0.981 secs

robert@pferdeapfel:~/hrsn\> wc -l build.gradle

7 build.gradle

robert@pferdeapfel:~/hrsn\> gradle --version

* * *

Gradle 2.0

* * *

Build time:

2014-07-01 07:45:34 UTC

Build number: none

Revision:

b6ead6fa452dfdadec484059191eb641d817226c

Groovy:

2.3.3

Ant:

Apache Ant™ version 1.9.3 compiled on December 23 2013

JVM:

1.7.0\_21 (Oracle Corporation 23.21-b01)

OS:

Mac OS X 10.8.5 x86\_64

Below is the build script to reproduce the problem:

task deploy(type: Copy) {

from “file1”

// oops, } missing

task deployWebtest(type: Copy) {

from “file2”

}

Robert

---

<div class="post-metadata">

**Author:** ![luke\_daley](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/luke_daley/32/9890_2.png) [@luke\_daley](https://discuss.gradle.org/u/luke_daley)\
**Post date:** [August 13, 2014, 2:20am UTC](https://discuss.gradle.org/t/wrong-line-number-in-build-script-syntax-error/1548/2 "2014-08-13T02:20:00Z")

</div>

Hi Robert,  
  
This means you have an unclosed { in your buildscript.  
  
We are aware of the wrong-line-number problem and are working towards a fix.

---

<div class="post-metadata">

**Author:** ![Robert1](https://avatars.discourse-cdn.com/v4/letter/r/48db29/32.png) [@Robert1](https://discuss.gradle.org/u/Robert1)\
**Post date:** [August 13, 2014, 2:36pm UTC](https://discuss.gradle.org/t/wrong-line-number-in-build-script-syntax-error/1548/3 "2014-08-13T14:36:00Z")

</div>

Hi Luke,

yes, I fixed my build script before I posted here. I just wanted to let you guys know that the error line number was way off. Glad to read you already knew.

Robert
