Replaced try/catch blocks with assertj - apex-pdp
[policy/apex-pdp.git] / BUILD.adoc
1 //
2 // ============LICENSE_START=======================================================
3 //  Copyright (C) 2016-2018 Ericsson. All rights reserved.
4 // ================================================================================
5 // This file is licensed under the CREATIVE COMMONS ATTRIBUTION 4.0 INTERNATIONAL LICENSE
6 // Full license text at https://creativecommons.org/licenses/by/4.0/legalcode
7 // 
8 // SPDX-License-Identifier: CC-BY-4.0
9 // ============LICENSE_END=========================================================
10 //
11 // @author Sven van der Meer (sven.van.der.meer@ericsson.com)
12 //
13
14 == Quick Guide: How to build APEX from source
15
16
17 [IMPORTANT]
18 .A Build needs Space
19 ====
20 Building APEX requires approximately 2-3 GB of hard disc space, 1 GB for the actual build with full distribution and 1-2 GB for the downloaded dependencies
21 ====
22
23 [IMPORTANT]
24 .A Build requires Internet (for first build)
25 ====
26 During the build, several (a lot) of Maven dependencies will be downloaded and stored in the configured local Maven repository.
27 The first standard build (and any first specific build) requires Internet access to download those dependencies.
28 ====
29
30 [IMPORTANT]
31 .Building RPM distributions
32 ====
33 RPM images are only build if the `rpm` package is installed (Unix).
34 To install `rpm` run `sudo apt-get install rpm`, then build APEX.
35 ====
36
37
38
39 === Standard build
40
41 A standard build will build all Maven projects, including the packages.
42 It will not build the APEX site oand documentation.
43
44 Note: APEX has a dependency to ONAP parent projects.
45 You might need to adjust your Maven M2 settings.
46 The most current settings can be found in the ONAP oparent repo: link:https://git.onap.org/oparent/plain/settings.xml[Settings].
47
48 Without tests, takes about 6 minutes.
49
50 ----
51 mvn install -DskipTests
52 ----
53
54 With standard tests, takes about 10-15 minutes.
55
56 ----
57 mvn install
58 ----
59
60 With all tests (requires some database and other software installed).
61
62 ----
63 mvn install -DapexAll
64 ----
65
66
67 === Building the HowTo with all details
68
69
70 Build the APEX stand-alone documentation
71
72 ----
73 mvn generate-resources -N -DapexDocs
74 ----
75
76 Then open the HowTo in a browser, for example
77
78 ----
79 firefox target/generated-docs/html/HowTo-Build-APEX.html
80 ----
81
82
83 === APEX Site
84
85 Building a complete site workflow (start with cleaning your local site staging directory).
86
87 [IMPORTANT]
88 .Building a Site takes Time
89 ====
90 Building and staging the APEX web site can take very long.
91 The stand-alone documentation will take about 2 minutes.
92 The sites for all modules and projects and the main APEX site can take between 10-30 minutes depending on your build machine
93 (~10 minutes without generating source and test-source reports, closer to 30 minutes with all reports).
94 ====
95
96
97 ----
98 mvn clean -DapexAll
99 mvn install -DskipTests
100 mvn generate-resources -N -DapexDocs
101 mvn initialize site:attach-descriptor site site:stage -DapexSite
102 ----
103
104
105 Terms & Conditions apply
106
107
108 * * *
109 *The ONAP APEX team*