Hi Jerod,
On Jan 7, 2009, at 8:52 PM, JerodLass wrote:
My settings file follows. I'm declaring usePlugin(com.me.Plugin)
from the
build.gradle file in the main build script, as well as
usePlugin(com.me.Plugin2) in each subproject build.gradle. The
error occurs
at the top of one of the build files that is fired off, but it's my
understanding that 'com' is an unknown property because the plugins
are not
being set up properly when they are encountered in the settings file.
Groovy (and thus Gradle) gives in IMO a slightly irritating error
message. What it means I think, is that the com.me.Plugin or
com.me.Plugin2 class is for some reason not in the build script
classpath.
The build executes marvelously with the same files when I move them
up a
level and change include to includeFlat.
What do you mean here?
Does each project need its own
settings file when includeFlat is used?
No
That would be one explanation for
this error, if it is not caused by the ProjectBuild (virtual top-
level)
build script. I would like to implement the exact same hierarchy as
I had
before except with the top-level scripts in a the ProjectBuild
subdirectory
to avoid loose files in cvs and generally to be tidy.
I have set up a similar scenario and created a custom plugin which I
added to the build script classpath via the settings.gradle file. And
everything works.
Do I understand correctly, that you are executing the build from
within the ProjectBuild folder?
- Hans
settings.gradle:
includeFlat 'SubProject1', 'SubProject2'
println "Build started: ${new Date()}"
props = System.properties
props['http.proxyHost'] = 'webproxy.me.com'
props['http.proxyPort'] = '80'
addMavenStyleRepo('MyRepo', 'http://serv1.me.com/maven-repo/')
dependencies("com.me.gradlebuilds:MavenPlugin:1.5")
dependencies("com.me.gradlebuilds:ModulePlugin:2.2")
dependencies("com.me.gradlebuilds:EARPlugin:2.3")
dependencies("com.me.gradlebuilds:EJBPlugin:2.2")
dependencies("com.me.gradlebuilds:WebPlugin:2.1")
addMavenRepo()
dependencies("org.apache.ivy:ivy:2.0.0-beta2")
dependencies("com.jcraft:jsch:0.1.38")
hdockter wrote:
Hi Jerod,
great to hear from you again.
On Jan 5, 2009, at 5:24 PM, JerodLass wrote:
it's been a while, but...
I'm moving to 0.5 from 0.3 (with very little difficulty, I might
add) and
I'd like to take advantage of the arbitrary multi-project layouts.
As such,
I have changed:
-D Project
-D SubProject1
-D SubProject2
-F build.gradle
-F settings.gradle
to:
-D Project
-D SubProject1
-D SubProject2
-D ProjectBuild
-F build.gradle
-F settings.gradle
and I modified the settings.gradle file from include to
includeFlat. It
appears to find and run the files correctly, and my timestamp in the
settings file is printed, but by the time it gets to the
build.gradle file,
the usePlugin declaration for com.jerod.EARMainPlugin, which was
declared in
the settings file, throws an error: Property 'com' not found for
project :.
It is an interesting error message. Could you paste your settings
file. In general, the usePlugin declaration is only possible in the
build.gradle file. You can apply it to all projects by declaring in
the build.gradle of the ProjectBuild:
allprojects {
usePlugin('com.jerod.EARMainPlugin')
}
I am running the command "gradle clean libs" from the ProjectBuild
directory, but I would like to be able to run it from the Project
root
directory because that would fit better with my CIS. At any rate,
how can I
change my settings or build file so the plugin declarations are
recognized?
You can do from Project:
gradle -pProjectBuild clean libs
- Hans
--
Hans Dockter
Gradle Project lead
http://www.gradle.org
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email
--
View this message in context:
http://www.nabble.com/arbitrary-multi-project-layouts-tp21294101p21338985.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
--
Hans Dockter
Gradle Project lead
http://www.gradle.org
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email