On Thu, Sep 10, 2009 at 7:11 AM, Narco <[email protected]> wrote:

>
> dependsOn(':app')
>
> I`ve tried another ways of defining that app is dependency project with no
> success. When I call "gradle ejb-module-session:compile" I see that app
> gets
> compiled but its output classes are not added to ejb classpath. I believe
> that should work automatically. So the ejb compilation fails.
>
>
I think this is another conceptual problem.  The dependsOn above declares a
project dependency (I think that's what they are called).  It basically just
automatically links tasks with the same name between this project and the
dependsOn project (which is why you saw app getting compiled).  I don't
think that is what you were wanting here.  Seems like you want a compile
dependency.  For that, use

dependencies {
   compile project(':app')
}

"compile" is the name of a default configuration that the java plugin
provides.  There is also a runtime, testCompile and testRuntime that can be
useful.  What the "compile" configuration causes is for all of it's given
dependencies to be put on the current project's compile-time classpath.  To
do this, to described artifacts must be downloaded from a repo, or if they
are project dependencies, they get built (in this case, app will not only
get compiled, but jarred and put into the local repo cache).

-- 
John Murph
Automated Logic Research Team

Reply via email to