125 |
125 |
|
126 |
126 |
Installation of RSBJava
|
127 |
127 |
=======================
|
|
128 |
|
|
129 |
For the installation of |project| Java two parallel build systems exist. You can chose between both.
|
|
130 |
|
128 |
131 |
* Installation of |project| Java with `Apache Ant`_.
|
129 |
132 |
* Installation of |project| Java with `Maven`_
|
130 |
133 |
|
... | ... | |
149 |
152 |
``spread.daemon`` Location of :term:`Spread daemon` executable :file:`/vol/cit/sbin/spread`
|
150 |
153 |
================== ================================================================================= ====================================
|
151 |
154 |
|
152 |
|
All properties can be supplied on the :program:`ant` commandline
|
|
155 |
All properties can be supplied on the :program:`ant` command-line
|
153 |
156 |
using the :samp:`-D{NAME}={VALUE}` syntax or by creating a
|
154 |
157 |
:file:`build.properties` file containing lines of the form
|
155 |
158 |
:samp:`{NAME} = {VALUE}`.
|
... | ... | |
261 |
264 |
#. Checkout |project| and its immediate dependencies from
|
262 |
265 |
|repository_versioned_java|.
|
263 |
266 |
|
264 |
|
#. Run :file:`mvnprep.sh` in :file:`rsb.git.java` folder from commandline:
|
|
267 |
#. Run :file:`mvnprep.sh` which resides inside the repository root folder
|
265 |
268 |
|
266 |
269 |
.. code-block:: sh
|
267 |
270 |
|
268 |
271 |
$ cd rsb.git.java
|
269 |
272 |
$ ./mvnprep.sh
|
270 |
273 |
|
271 |
|
#. Invoke :program:`mvn` supplying build properties on the commandline
|
272 |
|
or via file:`pom.xml` (see below)
|
|
274 |
#. Invoke :program:`mvn` supplying build properties on the command-line
|
273 |
275 |
|
274 |
276 |
The following properties are used to configure the build:
|
275 |
277 |
|
... | ... | |
281 |
283 |
``spread.daemon`` Location of :term:`Spread daemon` executable :file:`/vol/cit/sbin/spread`
|
282 |
284 |
================== ================================================================================= ====================================
|
283 |
285 |
|
284 |
|
All properties can be supplied on the :program:`mvn` commandline
|
285 |
|
using the :samp:`-D{NAME}={VALUE}` syntax or by editing a
|
286 |
|
:file:`pom.xml` file containing lines of the form
|
287 |
|
:samp:`<NAME>{VALUE}</NAME>`.
|
|
286 |
All properties can be supplied on the :program:`mvn` command-line
|
|
287 |
using the :samp:`-D{NAME}={VALUE}` syntax.
|
288 |
288 |
|
289 |
289 |
An exemplary ``mvn clean package`` command, which builds the |project| jar
|
290 |
290 |
library, may look as follows:
|
... | ... | |
296 |
296 |
-Dpbuf.protopath=/vol/cit/share/rsbprotocol \
|
297 |
297 |
-Dspread.daemon=/vol/cit/sbin/spread
|
298 |
298 |
|
299 |
|
The equivalent changes can be done in :file:`pom.xml` file which then looks like this:
|
300 |
|
|
301 |
|
.. code-block:: xml
|
302 |
|
|
303 |
|
<properties>
|
304 |
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
305 |
|
<pbuf.protopath>/vol/cit/share/rsbprotocol</pbuf.protopath>
|
306 |
|
<pbuf.protoc>/usr/bin/protoc</pbuf.protoc>
|
307 |
|
<pbuf.version>2.4.1</pbuf.version>
|
308 |
|
<pbuf.outpath>target/generated-protocol</pbuf.outpath>
|
309 |
|
<spread.daemon>/vol/cit/sbin/spread</spread.daemon>
|
310 |
|
<target.java.version>1.6</target.java.version>
|
311 |
|
</properties>
|
312 |
|
|
313 |
|
|
314 |
|
In the presence of this file :file:`pom.xml` , the :program:`mvn` command reduces to:
|
315 |
|
|
316 |
|
.. code-block:: sh
|
317 |
|
|
318 |
|
$ mvn clean package
|
319 |
|
|
320 |
|
|
321 |
299 |
#. Installation of Java archive
|
322 |
300 |
|
323 |
301 |
To install |project| jars into the configured prefix (e.g., into
|
324 |
302 |
:samp:`{PREFIX}/share/java`), the following :program:`mvn` command
|
325 |
|
can be used :file:`pom.xml` is not configured as mentioned earlier:
|
|
303 |
can be used:
|
326 |
304 |
|
327 |
305 |
.. code-block:: sh
|
328 |
306 |
|
... | ... | |
331 |
309 |
-Dpbuf.protopath=/vol/cit/share/rsbprotocol \
|
332 |
310 |
-Dspread.daemon=/vol/cit/sbin/spread
|
333 |
311 |
|
334 |
|
or when :file:`pom.xml` is configured :
|
335 |
|
|
336 |
|
.. code-block:: sh
|
337 |
|
|
338 |
|
$ mvn clean install
|
339 |
|
|
340 |
312 |
Testing the Maven Installation
|
341 |
313 |
-------------------------------
|
342 |
314 |
|
... | ... | |
346 |
318 |
needs to be invoked (please note that a :term:`Spread daemon` is
|
347 |
319 |
automatically started by the :program:`mvn` script):
|
348 |
320 |
|
349 |
|
When :file:`pom.xml` is configured :
|
350 |
|
|
351 |
|
.. code-block:: sh
|
352 |
|
|
353 |
|
$ mvn clean test
|
354 |
|
|
355 |
|
or when :file:`pom.xml` is not configured :
|
356 |
|
|
357 |
321 |
.. code-block:: sh
|
358 |
322 |
|
359 |
|
$ mvn clean test \
|
|
323 |
$ mvn test \
|
360 |
324 |
-Dpbuf.protoc=/opt/local/bin/protoc \
|
361 |
325 |
-Dpbuf.protopath=/vol/cit/share/RSBProtocol \
|
362 |
326 |
-Dspread.daemon=/vol/cit/sbin/spread
|
... | ... | |
367 |
331 |
|
368 |
332 |
.. code-block:: sh
|
369 |
333 |
|
370 |
|
$ mvn clean test \
|
|
334 |
$ mvn test \
|
371 |
335 |
-Dpbuf.protoc=/opt/local/bin/protoc \
|
372 |
336 |
-Dpbuf.protopath=/vol/cit/share/RSBProtocol \
|
373 |
337 |
-Dspread.daemon=/vol/cit/sbin/spread
|
374 |
|
-
|