Skip to main content

Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Virgo Internals"

 
(9 intermediate revisions by the same user not shown)
Line 1: Line 1:
= Building Virgo  =
+
This page may be deleted.
 
+
Virgo has its own build system known as "Virgo build" which is a collection of Any/Ivy scripts. Make sure you have '''Java 6''' or later and '''ant 1.7.1 or later''' installed.
+
 
+
== Building Individual Repositories  ==
+
 
+
To build a given git repository, first make sure that the Virgo build submodule is correctly initialised by changing directory to the repository and issuing:
+
<pre>git submodule update --init</pre>
+
then change directory into the build-xxx directory and invoke ant with the appropriate targets, usually:
+
<pre>ant clean clean-integration test</pre>
+
''Note: at the time of writing, Virgo build is still to be checked in and linked into each repository. Until that is done, you cannot build anything.''
+
 
+
This will do a fresh build and run all the unit and integration tests. It will only report "Build successful" if everything compiles cleanly and all the tests pass.
+
 
+
ant -p displays commonly used targets. Use "ant clean-ivy" to delete the ivy cache (or use git clean -dfx to get everything back to a reset state, including ditching any changes you haven't committed).
+
 
+
If you simply want to compile the runtime code, you can use "ant clean clean-integration jar" but that will not compile (or run) the tests.
+
 
+
"ant precommit" performs more extensive checks including code coverage and findbugs.
+
 
+
Building the packaged web server is somewhat different:
+
<pre>ant clean clean-integration jar package smoke-test</pre>
+
You can also use the "package" target in the kernel to build a standalone kernel:
+
<pre>ant clean clean-integration test package</pre>
+
Building the documentation is different too:
+
<pre>ant doc</pre>
+
== Dependency Management  ==
+
 
+
In general, dependencies are declared in files named ivy.xml.
+
 
+
Dependencies between Virgo components are a special case of this. The properties file build.versions in the root directory of each git repository defines the versions of the Virgo components that the build will download. Updating any of the versions in build.versions is error-prone as the same values occur in certain other files (which cannot use property substitution). To update a version in build.versions, run the "update dependency" script, for example:
+
<pre>~/virgo/web-server/scripts/update-dependency.sh -v &lt;variable&gt; -n &lt;new version&gt;&nbsp;</pre>
+
where &lt;variable&gt; is the relevant property name in build.versions and &lt;new version&gt; is the replacement version. The script will report the changes it makes and may issue warnings, so pay attention to its output.
+
 
+
Since the Virgo components form a directed, acyclic graph, changing the graph to use a new version of a specific component involves not only updating that version throughout the graph, but also updating the versions of the components which have been changed. This is the tedious process known as "rippling" and so the "ripplor" script was written to automate it. Essentially, ripplor handles the most commonly updated components and flattens the dependency graph into a linear sequence, e.g.:
+
<pre>osgi-test-stubs
+
osgi-extensions
+
util
+
test
+
medic
+
artifact-repository
+
kernel
+
web
+
apps
+
documentation
+
web-server
+
</pre>
+
So, for example, if you change the kernel and want to produce a package web server containing the updated kernel, you would run:
+
<pre>~/virgo/web-server/scripts/ripplor/ripplor.rb -r kernel
+
</pre>
+
This would build and publish a new version of the kernel, update the dependency of the web layer on the newly built kernel, build and publish a new version of the web layer, update the dependency of the Virgo-supplied applications on the newly built web layer and kernel, and so on until it builds and publishes a new version of the packaged web server.
+
 
+
''Please note at the time of writing, ripplor still needs to be converted to publish into the Eclipse infrastructure. For now, you'll have to use the "update dependency" script to perform a manual ripple.''
+

Latest revision as of 23:10, 20 April 2010

This page may be deleted.

Back to the top