Am 19.01.11 00:48, schrieb Rene Groeschke:
> Hi Sean,
>
> Am 19.01.11 00:05, schrieb Sean Van Buggenum:
>> Hi Rene, and thanks for the reply.
>>
>> What you said here: "with these informations you can resolve your
>> artifact from a common maven repository"
>>
>> Are you saying that I need to understand maven before I can understand
>> how to setup gradle?
> No you definitely needn't understand the whole maven hell before setting
> up your gradle setup. But Gradle adopted some concepts which are are
> orginally invented by maven.
> One of these concepts is the unique identification of an artifact. As I
> told you, take a look at chapter 32 of the gradle userguide.
>> And that I need to have some sort of "common maven repository" to do this?
>> I am coming from ant, not maven.
> No you are not forced to use a maven repository, you can still use
> references to a local directory as you did it with ant I suppose. But
> it's defnitely worth to take a look on later on ;-).
>> Or can I not perhaps set it up like any other custom ant task? (which
>> would seem perhaps much easier ... ) ??
> You can change the provided example to use plain jar files from a lib
> directory. It should look like this:
> -----------
>
> repositories {
>       flatDir name: 'localRepository', dirs: 'libs'
> }
>
> configurations {
>     ftpAntTask
> }
>
> dependencies {
>     ftpAntTask ":ant-commons-net:1.7.0"
>     ftpAntTask ":commons-net:1.4.0"
> }
>
> task ftp << {
>     ant {
>         taskdef(name: 'ftp',
>                 classname: 'org.apache.tools.ant.taskdefs.optional.net.FTP',
>                 classpath: configurations.ftpAntTask.asPath)
>         ftp(server: "ftp.apache.org", userid: "anonymous", password: 
> "[email protected]") {
>             fileset(dir: "htdocs/manual")
>         }
>     }
> }
>
> -----------
> The example above assumes, that you have the files
> ant-commons-net-1.7.0.jar and commons-net-1.4.0.jar in the libs
> directory of the project.
> Gradle needs to know where your thirdparty libs are located. The
> repository closure contains a defnition of a flat directory (the libs
> folder in your project) to be used by gradle.
> After that you define the needed dependencies in the dependencies
> closure. The String ":ant-commons-net:1.7.0" referes to an artifact with
> the name "ant-commons-net" with the version "1.7.0" As a default, gradle
> now looks for a file with the pattern "[name]-[version].jar" in your
> libs folder and adds this to the ftpAntTask configuration.
BTW. to change the pattern for resolving files you should take a look at
Chapter 9.2. of the gradle userguide.

regards,
René

-- 
------------------------------------
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


Reply via email to