On Sat, 2009-07-11 at 08:03 -0400, Steve Appling wrote: > I think I may have gotten that with mismatched curly braces before. Why > don't > you post your build.gradle (or at least the part that you changed to cause > the > failure).
I don't think that is it in this case. The two bits of the Gradle file
that are the bits that depend on the variation are:
groovyHome = System.getenv ( ).'GROOVY_HOME'
if ( groovyHome ) {
groovyLib = new File ( groovyHome , 'lib' )
def groovyVersionPatternString = /^groovy-(all-)?([0-9].*)\.jar/
def items = groovyLib.listFiles ( [ accept : { File dir , String name
-> return ( name =~ groovyVersionPatternString ).find ( ) } ] as FilenameFilter
)
assert items
groovyVersion = ( items[0].name =~ groovyVersionPatternString )[0][2]
assert groovyVersion
}
else {
groovyVersion = ant.antProject.properties.groovyStandaloneVersion
}
. . .
repositories {
if ( groovyHome ) { flatDir ( name : 'groovyInstallation' , dirs : [
new File ( groovyHome , 'embeddable' ) , groovyLib ] ) }
mavenCentral ( )
}
If I unset GROOVY_HOME then it all compiles fine (it's the Gant build).
If I have GROOVY_HOME set then I get the error. So on the one hand the
problem cannot be in the code other than the above, and on the other
hand it shouldn't be in the code above either :-)
The total message without stack trace is:
Using Groovy version 1.7-beta-1-SNAPSHOT
:compile
:: problems summary ::
:::: ERRORS
unknown resolver Local
:: problems summary ::
:::: ERRORS
unknown resolver Local
Build failed with an exception.
Run with -s or -d option to get more details. Run with -f option to get
the full (very verbose) stacktrace.
Build file
'/home/users/russel/Repositories/Bazaar/Masters/Gant/Trunk_Development/build.gradle'
Execution failed for task ':compile'.
Cause: startup failed:
Script1.groovy: 6: unexpected token: task @ line 6, column 104.
1 error
BUILD FAILED
Total time: 6.985 secs
I have no idea why I get "unknown resolver Local" I deleted that line
very early this morning. Hummm... hysteresis I wonder if there is some
not compiling of Gradle files going on. I tried "gradle -C rebuild
compile" but that didn't help.
I deleted the .gradle directory and the same thing results. I guess the
cache must be somewhere else. The resolver called Local is never used
in the Gradle file. I think the fact that it is remembered in this way
is clearly wrong. I guess I should submit a bug report -- the problem
is that I need to create a useful test first and this is not it :-(
I even tried deleting ~/.gradle/cache. That got rid of the "unknown
resolver Local" message -- so there is a bug somewhere in the updating
of metadata for Gradle files.
However the compilation problem remains, so there is something about the
Gradle file that is causing this consistently.
If I comment out the line
if ( groovyHome ) { flatDir ( name : 'groovyInstallation' , dirs : [ new File (
groovyHome , 'embeddable' ) , groovyLib ] ) }
The compilation problem goes away to be replaced by the understandable
error that the Groovy jar could not be found.
So why does the above give the incomprehensible error message?
--
Russel.
=============================================================================
Dr Russel Winder Partner
xmpp: [email protected]
Concertant LLP t: +44 20 7585 2200, +44 20 7193 9203
41 Buckmaster Road, f: +44 8700 516 084 voip: sip:[email protected]
London SW11 1EN, UK m: +44 7770 465 077 skype: russel_winder
signature.asc
Description: This is a digitally signed message part
