Hi Allan,
On Apr 29, 2008, at 4:52 PM, Allan Lewis wrote:
Thanks for the quick reply, Hans.
My situation is a little more complex, in that I'd like to have the
code
from project1/buildSrc available as an artifact at the end of the
day. Here
is my actual situation:
root
+buildSrc
+generator
+modeling
+tests
The structure above should produce 2 components, a code generator,
and some
classes useful for working with UML models. Both generator and
modeling
will wind up being released as artifacts when I do a release. The
tests
project is really testing the integration of these components,
which is why
I have it broken out into its own project.
It seems that what I want is a plugin under buildSrc that
references some of
the classes in both 'generator' and 'modeling'. The 'tests'
project would
then use this plugin to generate the artifacts to be used in testing.
Here is my current Maven structure:
-generator
-modeling
-maven-plugin (depends on both of the above)
-tests (uses maven-plugin)
Is that clearer? Any further advice?
Here is how I understand your dependencies.
The maven-plugin has a compile dependency on generator and modeling.
The maven-plugin contains the actuals tests. The tests project just
triggers those tests. The generator and modeling project are
independent.
Is this right?
Are the tests in the Maven plugin JUnit or TestNG tests?
I just want to be sure before I get into any details.
- Hans
hdockter wrote:
Hi Allan,
On Apr 29, 2008, at 3:50 PM, Allan Lewis wrote:
I have a project setup as below:
root
+project1
+project2
+unit-test
2 sub-projects, along with another unit/integration test project
which
depends on both of the other projects. In addition, project1 is a
code
generator, which the unit-test project needs to execute to generate
some of
the sources to be tested. So, in other words, what is the best way
for me
to structure things so that I can both build project1 and
incorporate it
into my build for later projects? I playes around a bit with
adding some
plugins/tasks to buildSrc, but wasn't able to get things working.
buildSrc is the way to go. I have forgotten to mention in the user's
guide that buildSrc has to be in the root project. The binaries of
buildSrc are available to all subproject build scripts. If we
encounter use cases were it would be much better that each subproject
can have its own buildSrc we might modify this.
root/settings.xml:
include 'project2', 'unit-test'
root/buildSrc/src/main/java ...sources of your former project1
root/buildSrc/src/test/java ...if there are tests
root/unit-test/gradlefile;
dependencies {
compile project(':project2')
}
I'm delighted that people start using the multi-project functionality
of Gradle.
Please don't hesitate to ask as many questions as necessary to get
your stuff running.
- Hans
Thanks for any help, and congrats on a great new tool. I'm
currently
looking at migrating an existing Maven build over to Gradle.
--
View this message in context: http://www.nabble.com/Advice-on-multi-
project-build-source-setup-tp16960881p16960881.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
--
View this message in context: http://www.nabble.com/Advice-on-multi-
project-build-source-setup-tp16960881p16962364.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