Multiple Errors in build.xml

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Multiple Errors in build.xml

Yasu
Hello,
   I found that bugs in build.xml prevents create-service and
create-test-suite targets from working.
There are multiple bugs
  1)  at around line 45,  there are lines that set 'normCaps' closure to
project's reference. The signature of the closure is not set to take two
parameters and here are undefined references to a local variable 'y'.  I
slightly modified the lines as follows and it seem to work.
             project.addReference('normCaps') {x, y ->
                x = x.replaceAll(' ','')
                x = x[0].toUpperCase() + x[1..-1]
                if (x.endsWith(y)) x = x[0..(x.size() - y.size()-1)]
                return x
            }

   2) "antcall"  does not seem to retain the project.references object.
Therefore, the invocation of 'create-test-suite' and 'create-test-suite'
targets are failing since these targets invokes antcall with
internal-create-test-suites target.

I dumped the content of the project.reference by adding
<groovy>project.references.each {print it}</groovy>
to the internal-create-test-suites and ran grails create-service and
create-test-suites.  The result is

   [groovy] test.classpath=org.apache.tools.ant.UnknownElement@8e32e7
   [groovy]
ant.executor=org.apache.tools.ant.helper.SingleCheckExecutor@1b000e7  
[groovy] ant.targets=[, help, init-props, init, input-domain-class,
generate-controller, generate-controller:impl, generate-views,
generate-views:impl, generate-all, create-app, create-controller,
create-service, create-domain-class, create-test-suite,
internal-create-test-suite, clean, build, test, test-app, dev, package,
package:checkj5, package:java5, war, run-app:impl,
run-app:watch-context, run-app, check-webtest-too-old, init-webtest,
create-webtest, generate-webtest, run-webtest, webtest-impl]
   [groovy] classpath=org.apache.tools.ant.UnknownElement@b76fa
   [groovy] test_classpath=org.apache.tools.ant.UnknownElement@b01d43
   [groovy] ant.PropertyHelper=org.apache.tools.ant.PropertyHelper@513cf0
   [groovy]
ant.parsing.context=org.apache.tools.ant.helper.AntXMLContext@177b3cd
   [groovy] grails=org.apache.tools.ant.Project@1bd7848
   [groovy] ant.ComponentHelper=org.apache.tools.ant.ComponentHelper@23e5d1
   [groovy]
ant.projectHelper=org.apache.tools.ant.helper.ProjectHelper2@c4fe76

As you can see, 'normCaps', 'lower' and 'upper' closures are not listed
in the dump.
Changing the <antcall target="internal-create-test-suite" />  lines to
<antcall target="internal-create-test-suite" inheritRefs="true"
inheritAll="true"/> seems to fix this.

Regards,



Reply | Threaded
Open this post in threaded view
|

Re: Multiple Errors in build.xml

Yasu
I forgot to mention one more issues related to ant.
The 'grails' shell script did not work for me in the begining.  The ant
was failing to execute <groovy> tasks.

I am still not sure about the exact cause, but adding --noconfig parameter
to the ant invocation line in the bin/grails solved the problem.

This sure is a environment dependet problem but since grails itself
ships with ant,
it makes sence to me to add '--noconfig' option to ignore the
system-wide ant
configuration.
My development environment is Fedora Core4 with ant cames as standard
rpm package.

Regards,
Reply | Threaded
Open this post in threaded view
|

Re: Multiple Errors in build.xml

graemer
Hi Yasuhiko,

Please submit patches to the JIRA list for the things you've done and
i will incorporate your changes asap

Thanks
Graeme

On 3/25/06, Yasuhiko Sakakibara <[hidden email]> wrote:

> I forgot to mention one more issues related to ant.
> The 'grails' shell script did not work for me in the begining.  The ant
> was failing to execute <groovy> tasks.
>
> I am still not sure about the exact cause, but adding --noconfig parameter
> to the ant invocation line in the bin/grails solved the problem.
>
> This sure is a environment dependet problem but since grails itself
> ships with ant,
> it makes sence to me to add '--noconfig' option to ignore the
> system-wide ant
> configuration.
> My development environment is Fedora Core4 with ant cames as standard
> rpm package.
>
> Regards,
>
Reply | Threaded
Open this post in threaded view
|

Re: Multiple Errors in build.xml

calathus
In reply to this post by Yasu
I observed the same problem, and sent with modified ant file in:

Re: [grails-user] linux build problem


I'm also using Linux, suse 10.0. current grails develpper seems not using linux?
anyway, this ant file does not make sense for its access to ant binary.

C

On 3/24/06, Yasuhiko Sakakibara <[hidden email]> wrote:
I forgot to mention one more issues related to ant.
The 'grails' shell script did not work for me in the begining.  The ant
was failing to execute <groovy> tasks.

I am still not sure about the exact cause, but adding --noconfig parameter
to the ant invocation line in the bin/grails solved the problem.

This sure is a environment dependet problem but since grails itself
ships with ant,
it makes sence to me to add '--noconfig' option to ignore the
system-wide ant
configuration.
My development environment is Fedora Core4 with ant cames as standard
rpm package.

Regards,

Reply | Threaded
Open this post in threaded view
|

Re: Multiple Errors in build.xml

graemer
On 3/25/06, calathus <[hidden email]> wrote:
> I observed the same problem, and sent with modified ant file in:
>
> Re: [grails-user] linux build problem
>
> I'm also using Linux, suse 10.0. current grails develpper seems not using
> linux?
I'm on windows with cygwin, others are on Mac OS X, but we can't cover
every OS unless we get more committers ;-)

Graeme

> anyway, this ant file does not make sense for its access to ant binary.
>
> C
>
>
> On 3/24/06, Yasuhiko Sakakibara <[hidden email]> wrote:
> > I forgot to mention one more issues related to ant.
> > The 'grails' shell script did not work for me in the begining.  The ant
> > was failing to execute <groovy> tasks.
> >
> > I am still not sure about the exact cause, but adding --noconfig parameter
> > to the ant invocation line in the bin/grails solved the problem.
> >
> > This sure is a environment dependet problem but since grails itself
> > ships with ant,
> > it makes sence to me to add '--noconfig' option to ignore the
> > system-wide ant
> > configuration.
> > My development environment is Fedora Core4 with ant cames as standard
> > rpm package.
> >
> > Regards,
> >
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Multiple Errors in build.xml

Yasu
Sounds like Linux still has a long way towards the world domination :)

Graeme Rocher wrote:

>On 3/25/06, calathus <[hidden email]> wrote:
>  
>
>>I observed the same problem, and sent with modified ant file in:
>>
>>Re: [grails-user] linux build problem
>>
>>I'm also using Linux, suse 10.0. current grails develpper seems not using
>>linux?
>>    
>>
>I'm on windows with cygwin, others are on Mac OS X, but we can't cover
>every OS unless we get more committers ;-)
>
>Graeme
>  
>
>>anyway, this ant file does not make sense for its access to ant binary.
>>
>>C
>>
>>
>>On 3/24/06, Yasuhiko Sakakibara <[hidden email]> wrote:
>>    
>>
>>>I forgot to mention one more issues related to ant.
>>>The 'grails' shell script did not work for me in the begining.  The ant
>>>was failing to execute <groovy> tasks.
>>>
>>>I am still not sure about the exact cause, but adding --noconfig parameter
>>>to the ant invocation line in the bin/grails solved the problem.
>>>
>>>This sure is a environment dependet problem but since grails itself
>>>ships with ant,
>>>it makes sence to me to add '--noconfig' option to ignore the
>>>system-wide ant
>>>configuration.
>>>My development environment is Fedora Core4 with ant cames as standard
>>>rpm package.
>>>
>>>Regards,
>>>
>>>      
>>>
>>    
>>

Reply | Threaded
Open this post in threaded view
|

Re: Multiple Errors in build.xml

tugwilson
In reply to this post by graemer

On 25 Mar 2006, at 11:31, Graeme Rocher wrote:

> I'm on windows with cygwin, others are on Mac OS X, but we can't cover
> every OS unless we get more committers ;-)


have you tried the free (beer) VMWare server (http://www.vmware.com/ 
products/server/)?

There are downloadable images for lots of Linux flavours and you can  
install your own (I'm just about to try to install Solaris in a VM  
image under Win2K).


John Wilson
The Wilson Partnership
web http://www.wilson.co.uk
blog http://eek.ook.org