Hi,
I'm not an expert but let me try to help you.
> What i can't find is a way to say to gradle "use this pom.xml to find the
> dependencies when compiling".
Gradle is a different build system and AFAIK you cannot declare
dependencies for your project using maven poms. You should specify
dependencies in build.gradle. BTW, under the hood, gradle uses IVY for
dependency management.
> dependencies
> {
> addMavenStyleRepo("tim-reg","file:///C:/Work/timreg/")
> }
Again, I'm not an expert but above does not make much sense to me.
It's like you specify the source of dependencies but you don't specify
any dependencies. The effect is that gradle doesn't put any
dependencies on the classpath. This is the reason of your compilation
errors.
HTH,
Szczepan Faber
On Thu, Jan 22, 2009 at 3:30 PM, james_bromley <[email protected]> wrote:
>
> hi
>
> Am trying to setup my first project using gradle to build something that is
> already setup in Maven.
>
> What i can't find is a way to say to gradle "use this pom.xml to find the
> dependencies when compiling".
>
> i.e. instead of articulating my dependencies in the build.gradle, simply use
> the pom.xml i already have.
>
> This must be because I'm being stupid ;-) or have failed to read the docs
> properly.
>
> What i'm trying is this:
>
>
> defaultTasks "compile"
>
> usePlugin('war')
>
> targetCompatibility = '1.5'
> sourceCompatibility = '1.5'
>
> dependencies
> {
> addMavenStyleRepo("tim-reg","file:///C:/Work/timreg/")
> }
>
>
> where the file path supplied is the directory containing the project
> pom.xml, and the first parameter is the artifactId specified in the pom.
>
> I guess what i'm trying to point at isn't really a repository, just a
> pom.xml. The result of running the above is something like this:
>
>
> C:\Work\globalLibs\gradle-0.5.2\bin\gradle.bat
> :init
> :resources
> :compile
> C:\Work\timreg\src\main\java\uk\co\anm\controller\DataCaptureController.java:3:
> package org.springframework.web.servlet.mvc does not exist
> import org.springframework.web.servlet.mvc.SimpleFormController;
>
> ... etc, etc
>
> 35 errors
>
> Build failed with an exception.
> Run with -s or -d option to get more details. Run with -f option to get the
> full (very verbose) stacktrace.
>
> Build file 'C:\Work\timreg\build.gradle'
>
> Execution failed for task :compile.
> Cause: Compile failed; see the compiler error output for details.
>
> BUILD FAILED
>
>
> Thanks for your any help, and sorry for not finding this myself.
>
> --
> View this message in context:
> http://www.nabble.com/Sorry%2C-definite-RTFM-tp21605223p21605223.html
> Sent from the gradle-user mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
> http://xircles.codehaus.org/manage_email
>
>
>
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email