Compiling with groovy plug-in

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

Compiling with groovy plug-in

bgoetzmann
First, thank you for Gradle that is very interesting!

I'm trying to compile a simple project that has java and Groovy source
code; here the content of my gradle file:

usePlugin('groovy')
sourceCompatibility=1.5
targetCompatibility=1.5

dependencies {
  addFlatDirResolver('D:/apache-servicemix-3.2.1/lib')
  compile ':servicemix-jbi:3.2.1'
}

What I try to achieve is to compile with the jar
servicemix-jbi-3.2.1.jar coming from my D:/apache-servicemix-3.2.1/lib
folder.
But by executing 'gradle compile', I get an exception about a missing
group property.

What's wrong in this gradle script?

Thank you.

Bertrand.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: Compiling with groovy plug-in

hans_d
Administrator
Hi Bertrand,

On Apr 28, 2008, at 2:16 PM, Goetzmann Bertrand wrote:
First, thank you for Gradle that is very interesting!

I'm trying to compile a simple project that has java and Groovy source
code; here the content of my gradle file:

usePlugin('groovy')
sourceCompatibility=1.5
targetCompatibility=1.5

dependencies {
  addFlatDirResolver('D:/apache-servicemix-3.2.1/lib')
  compile ':servicemix-jbi:3.2.1'
}

What I try to achieve is to compile with the jar
servicemix-jbi-3.2.1.jar coming from my D:/apache-servicemix-3.2.1/lib
folder.
But by executing 'gradle compile', I get an exception about a missing
group property.

What's wrong in this gradle script?

This is missing in the userguide. Right now you have to specify a group property.

Just add 
group = 'something' to your gradlefile

The group is needed if you upload your stuff to for example a Maven repository. It seems wrong that you have to define if such an upload is none of your use cases. I have filed an issue:


to make specifying it optional.

- Hans


Thank you.

Bertrand.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:




--
Hans Dockter
Gradle Project lead




Reply | Threaded
Open this post in threaded view
|

Re: Compiling with groovy plug-in

hans_d
Administrator
In reply to this post by bgoetzmann
Hi Betrand,

On Apr 28, 2008, at 2:16 PM, Goetzmann Bertrand wrote:
First, thank you for Gradle that is very interesting!

I'm trying to compile a simple project that has java and Groovy source
code; here the content of my gradle file:

usePlugin('groovy')
sourceCompatibility=1.5
targetCompatibility=1.5

dependencies {
  addFlatDirResolver('D:/apache-servicemix-3.2.1/lib')
  compile ':servicemix-jbi:3.2.1'
}


You need also to specify a name for the resolver and right now you have to pass a file object. Obviously being able to optionally pass a String would be a good idea :)

addFlatDirResolver('resolverName', new File('D:/apache-servicemix-3.2.1/lib'))

- Hans

--
Hans Dockter
Gradle Project lead




Reply | Threaded
Open this post in threaded view
|

Re: Compiling with groovy plug-in

hans_d
Administrator
In reply to this post by hans_d
Hi Bertrand,

On Apr 28, 2008, at 2:33 PM, Hans Dockter wrote:
Hi Bertrand,

On Apr 28, 2008, at 2:16 PM, Goetzmann Bertrand wrote:
First, thank you for Gradle that is very interesting!

I'm trying to compile a simple project that has java and Groovy source
code; here the content of my gradle file:

usePlugin('groovy')
sourceCompatibility=1.5
targetCompatibility=1.5

dependencies {
  addFlatDirResolver('D:/apache-servicemix-3.2.1/lib')
  compile ':servicemix-jbi:3.2.1'
}

What I try to achieve is to compile with the jar
servicemix-jbi-3.2.1.jar coming from my D:/apache-servicemix-3.2.1/lib
folder.
But by executing 'gradle compile', I get an exception about a missing
group property.

What's wrong in this gradle script?

This is missing in the userguide. Right now you have to specify a group property.

Just add 
group = 'something' to your gradlefile

the same has to be done for the version property.

- Hans

--
Hans Dockter
Gradle Project lead




Reply | Threaded
Open this post in threaded view
|

RE: Compiling with groovy plug-in

bgoetzmann
In reply to this post by bgoetzmann

Thank you.

It works now ; here the complete gradle file:

 

usePlugin('groovy')

 

group='metaphora'

version='1.0'

 

sourceCompatibility=1.5

targetCompatibility=1.5

 

dependencies {

  addFlatDirResolver('lib', new File('D:/apache-servicemix-3.2.1/lib'))

  compile ':servicemix-jbi:3.2.1'

}

 

 


De : Hans Dockter [mailto:[hidden email]]
Envoyé : lundi 28 avril 2008 15:10
À : [hidden email]
Objet : Re: [gradle-user] Compiling with groovy plug-in

 

Hi Bertrand,

 

On Apr 28, 2008, at 2:33 PM, Hans Dockter wrote:



Hi Bertrand,

 

On Apr 28, 2008, at 2:16 PM, Goetzmann Bertrand wrote:

First, thank you for Gradle that is very interesting!

 

I'm trying to compile a simple project that has java and Groovy source

code; here the content of my gradle file:

 

usePlugin('groovy')

sourceCompatibility=1.5

targetCompatibility=1.5

 

dependencies {

  addFlatDirResolver('D:/apache-servicemix-3.2.1/lib')

  compile ':servicemix-jbi:3.2.1'

}

 

What I try to achieve is to compile with the jar

servicemix-jbi-3.2.1.jar coming from my D:/apache-servicemix-3.2.1/lib

folder.

But by executing 'gradle compile', I get an exception about a missing

group property.

 

What's wrong in this gradle script?

 

This is missing in the userguide. Right now you have to specify a group property.

 

Just add 

group = 'something' to your gradlefile

 

the same has to be done for the version property.

 

- Hans

 

--

Hans Dockter

Gradle Project lead