blob: 388972e0fb3c8380f1962db23a6bbf5838c4f352 [file] [log] [blame]
liamfallona41c8772018-09-05 15:46:31 +01001//
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====
20Building 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====
26During the build, several (a lot) of Maven dependencies will be downloaded and stored in the configured local Maven repository.
27The first standard build (and any first specific build) requires Internet access to download those dependencies.
28====
29
30[IMPORTANT]
31.Building RPM distributions
32====
33RPM images are only build if the `rpm` package is installed (Unix).
34To install `rpm` run `sudo apt-get install rpm`, then build APEX.
35====
36
37
38
39=== Standard build
40
41A standard build will build all Maven projects, including the packages.
42It will not build the APEX site oand documentation.
43
44Note: APEX has a dependency to ONAP parent projects.
45You might need to adjust your Maven M2 settings.
46The most current settings can be found in the ONAP oparent repo: link:https://git.onap.org/oparent/plain/settings.xml[Settings].
47
48Without tests, takes about 6 minutes.
49
50----
51mvn install -DskipTests
52----
53
54With standard tests, takes about 10-15 minutes.
55
56----
57mvn install
58----
59
60With all tests (requires some database and other software installed).
61
62----
63mvn install -DapexAll
64----
65
66
67=== Building the HowTo with all details
68
69
70Build the APEX stand-alone documentation
71
72----
73mvn generate-resources -N -DapexDocs
74----
75
76Then open the HowTo in a browser, for example
77
78----
79firefox target/generated-docs/html/HowTo-Build-APEX.html
80----
81
82
83=== APEX Site
84
85Building a complete site workflow (start with cleaning your local site staging directory).
86
87[IMPORTANT]
88.Building a Site takes Time
89====
90Building and staging the APEX web site can take very long.
91The stand-alone documentation will take about 2 minutes.
92The 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----
98mvn clean -DapexAll
99mvn install -DskipTests
100mvn generate-resources -N -DapexDocs
101mvn initialize site:attach-descriptor site site:stage -DapexSite
102----
103
104
105Terms & Conditions apply
106
107
108* * *
109*The ONAP APEX team*