Hi,
Am 07.01.11 08:53, schrieb Michael Jerger:
> Hi Rene,
>
>>> * 2'nd dim: Project dependencies - I've seen the "dependencies" section
>>> but ---> where can a find, which dependencies can be defined (I found
>>> compile, testCompile in docu)? - which dependency types exists at all?
>>> ---> How are they linked up to configurations (are theyl)?
>> the available dependency configurations are depending on the type of
>> project you're building. The java plugin for example adds some of them.
>> see chapter "dependency management" at
>> http://gradle.org/java_plugin.html for details.
> exactly what I was searching for - thanks :-)
>
>> They are configurations.
>> so if you want to introduce your own configuration you can do this by
>> adding:
>>
>> configurations{
>> myownconfig
>> }
> Sonds good - where can I find configurations (class?) in the gradle source
> (not
> found in org.gradle or org.gradle.api)? Or are configurations plain grovy
> closures?
Have a look at the Gradle DSL Reference at
http://gradle.org/0.9/docs/dsl/org.gradle.api.artifacts.Configuration.html
>>> ---> Lets assume, I want use sth. like maven scopes and want to have
>>>
>>> runtime dependencies (affects packing, testing, and transient
>>> dependecy
>>>
>>> resolution) or
>>>
>>> aspectj dependencies (to control which aspects are woven), how can I
>>>
>>> introduce such dependency types?
>> I wrote an aspectj plugin for gradle and an blog article about aspectj
>> support with gradle. have a look at
>> http://www.breskeby.com/2010/02/using-gradle-with-aspectj/ and
>> http://www.breskeby.com/2010/03/speed-up-your-build-with-gradle/
> I've allready seen this - thats on my "to read and use" list :-)
>
>>> * 3'rd dim: (My so called) configurations - these configartions I use to
>>> generate for example different .war files out of one project for
>>> different servers. So this dimension affects only the
>>> artefact-generation (assembly in gradels words).
>>> ---> How can I map this concept to gradle?
>> you can add several tasks of type "War" to your build file to create
>> multiple war files out of one project. have a look at the
>> http://gradle.org/0.9/docs/dsl/org.gradle.api.tasks.bundling.War.html
>> for details about the War task.
> There is described, how to configure war generator in detail - but this means
> there is no dedicatet orthogonal concept for my kind of configurations build
> in
> in gradle?
With the flexibility of gradle, it's easy to achieve what you need.
First have a look at the war plugin
http://gradle.org/0.9.1/docs/userguide/war_plugin.html
To add an additional war task and add a war specific property directory
just you can do something like:
task secondWar(type:War){
baseName = 'specificWar'
from 'specificPropertyDirectory'
}
This task creates a war file as described in the war-plugin section in
the userguide. Additionally the directory 'specificPropertyDirectory' is
added to the archive. The second web archive is named 'specificWar' in
the example above.
> If I want to realize my build task dependencies (as described in
> http://www.jerger.org/resources/bilder/BuildTaskDependencies.png), the right
> starting point is to write my own plugin - am I right?
You should start with the gradle java plugin. this plugin ships with
some standard task that should fit your needs. see
http://gradle.org/0.9.1/docs/userguide/java_plugin.html#N1175B for details.
Furthermore gradle has buildin tasks for code analysis. see chapter
"code quality plugin" at
http://gradle.org/0.9.1/docs/userguide/code_quality_plugin.html
To add code coverage informations, you can augment the test task. We use
Emma for code coverage informations and I described that at
http://www.breskeby.com/2010/04/add-emma-code-coverage-reporting-to-your-gradle-build/
--
------------------------------------
Rene Groeschke
[email protected]
http://www.breskeby.com
http://twitter.com/breskeby
------------------------------------
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email