You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@buildr.apache.org by Dan King <da...@yahoo.com> on 2011/06/23 02:57:57 UTC
Adding Groovy Runtime to Groovy App Jar
Hi,
How can I include 'groovy-all-1.8.0.jar' to my groovy application, which I'm
packaging as a jar?
I've already added:
Buildr::Groovy::Groovyc::REQUIRES.groovy.version='1.8.0'
Thanks.
-Dan
Re: Adding Groovy Runtime to Groovy App Jar
Posted by Dan King <da...@yahoo.com>.
> If you would like to include it as a jar inside your jar (?), you can use
> this:
>
> package(:jar).include(artifact(GROOVY), :path => "lib").
>
> I committed a simple integration test that shows the use of include with
> :path:
> http://svn.apache.org/viewvc/buildr/trunk/tests/include_path/
>
> It's more likely that you want to merge it, in which case this will work:
> package(:jar).merge artifact(GROOVY))
>
> I'll add a test for merge as well.
>
> Antoine
I tried "including" and "merging", but unfortunately, neither worked. Below is
my buildfile; do you see what's wrong? Also, rather than downloading a new
"groovy-all" artifact, how can I use the one already downloaded by buildr
itself? Thanks.
require 'buildr/groovy'
GROOVY_VERSION = '1.8.0'
Buildr::Groovy::Groovyc::REQUIRES.groovy.version="#{GROOVY_VERSION}"
repositories.remote << 'http://repo1.maven.org/maven2/'
repositories.remote << 'http://download.java.net/maven/2/'
repositories.remote << 'http://repository.codehaus.org/'
GROOVY_ALL = "org.codehaus.groovy:groovy-all:#{GROOVY_VERSION}"
define 'xc' do
project.version = '1.0.0'
test.using :rspec
package(:jar).merge(artifact(GROOVY_ALL))
end
# End of Buildfile
-Dan
Re: Adding Groovy Runtime to Groovy App Jar
Posted by Antoine Toulme <an...@lunar-ocean.com>.
If you would like to include it as a jar inside your jar (?), you can use
this:
package(:jar).include(artifact(GROOVY), :path => "lib").
I committed a simple integration test that shows the use of include with
:path:
http://svn.apache.org/viewvc/buildr/trunk/tests/include_path/
It's more likely that you want to merge it, in which case this will work:
package(:jar).merge artifact(GROOVY))
I'll add a test for merge as well.
Antoine
On Thu, Jun 23, 2011 at 00:57, Dan King <da...@yahoo.com> wrote:
> Hi,
>
> How can I include 'groovy-all-1.8.0.jar' to my groovy application, which
> I'm
> packaging as a jar?
>
>
> I've already added:
>
> Buildr::Groovy::Groovyc::REQUIRES.groovy.version='1.8.0'
>
> Thanks.
>
> -Dan
>
>