You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@buildr.apache.org by Travis Jensen <tr...@gmail.com> on 2010/09/07 20:51:17 UTC

Eclipse web projects

I'm trying to build an Eclipse web project out of a Buildr war package.  I
have some jars in a lib folder that I need to include in the classpath that
I would like to turn into an Eclipse resource variable.  This is my project
definition in my buildfile:

  define "myserver" do
    eclipse.natures ECLIPSE_WEB_NATURES
    eclipse.builders ECLIPSE_WEB_BUILDERS
    eclipse.classpath_variables { :KIWI_SRC => 'lib' }

    compile.with project('mylib').package, MAIL_APIS, SERVLET_API

    package(:war).libs += project('mylib').compile.dependencies
    package(:war)
  end

When I run "buildr package", I get this error:

SyntaxError : /Users/travis/Dropbox/src/clicklock/kiwi/src/buildfile:45:
syntax error, unexpected tASSOC, expecting '}'
    eclipse.classpath_variables { :LIBS_SRC => 'lib' }
                                              ^
/Library/Ruby/Gems/1.8/gems/buildr-1.4.1/lib/buildr/core/application.rb:398:in
`raw_load_buildfile'
/Library/Ruby/Gems/1.8/gems/buildr-1.4.1/lib/buildr/core/application.rb:218:in
`load_buildfile'
/Library/Ruby/Gems/1.8/gems/buildr-1.4.1/lib/buildr/core/application.rb:213:in
`load_buildfile'

What am I doing wrong with the classpath_variables? Is there anything else
I'm missing or doing wrong?

Thanks.

tj

*Travis Jensen*
***
*Read the Software Maven @ http://softwaremaven.innerbrane.com/
Read my LinkedIn profile @ http://www.linkedin.com/in/travisjensen
Read my Twitter mumblings @ http://twitter.com/SoftwareMaven
Send me email @ travis.jensen@gmail.com

**What kind of guy calls himself the Software Maven???**

Re: Eclipse web projects

Posted by Alex Boisvert <al...@gmail.com>.
(Resending since I got a bounce)

Hi Travis,

Looks like the doc is incorrect, you shouldn't use curly braces when calling
classpath_variables,

e.g. eclipse.classpath_variables :KIWI_SRC => 'lib'

I'll fix the rdoc.

alex

On Tue, Sep 7, 2010 at 11:51 AM, Travis Jensen <tr...@gmail.com>wrote:

> I'm trying to build an Eclipse web project out of a Buildr war package.  I
> have some jars in a lib folder that I need to include in the classpath that
> I would like to turn into an Eclipse resource variable.  This is my project
> definition in my buildfile:
>
>  define "myserver" do
>    eclipse.natures ECLIPSE_WEB_NATURES
>    eclipse.builders ECLIPSE_WEB_BUILDERS
>    eclipse.classpath_variables { :KIWI_SRC => 'lib' }
>
>    compile.with project('mylib').package, MAIL_APIS, SERVLET_API
>
>    package(:war).libs += project('mylib').compile.dependencies
>    package(:war)
>  end
>
> When I run "buildr package", I get this error:
>
> SyntaxError : /Users/travis/Dropbox/src/clicklock/kiwi/src/buildfile:45:
> syntax error, unexpected tASSOC, expecting '}'
>    eclipse.classpath_variables { :LIBS_SRC => 'lib' }
>                                              ^
>
> /Library/Ruby/Gems/1.8/gems/buildr-1.4.1/lib/buildr/core/application.rb:398:in
> `raw_load_buildfile'
>
> /Library/Ruby/Gems/1.8/gems/buildr-1.4.1/lib/buildr/core/application.rb:218:in
> `load_buildfile'
>
> /Library/Ruby/Gems/1.8/gems/buildr-1.4.1/lib/buildr/core/application.rb:213:in
> `load_buildfile'
>
> What am I doing wrong with the classpath_variables? Is there anything else
> I'm missing or doing wrong?
>
> Thanks.
>
> tj
>
> *Travis Jensen*
> ***
> *Read the Software Maven @ http://softwaremaven.innerbrane.com/
> Read my LinkedIn profile @ http://www.linkedin.com/in/travisjensen
> Read my Twitter mumblings @ http://twitter.com/SoftwareMaven
> Send me email @ travis.jensen@gmail.com
>
> **What kind of guy calls himself the Software Maven???**
>