forked from Pi4J/pi4j-v1
-
Notifications
You must be signed in to change notification settings - Fork 0
/
BUILD.INSTRUCTIONS
100 lines (67 loc) · 4 KB
/
BUILD.INSTRUCTIONS
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
--------------------
PROJECT BUILD
--------------------
Use the following command to build the Pi4J Java libraries.
> mvn clean install
Use the following command to build the Pi4J Java libraries and the JNI native library.
(Note that building the native code requires a SSH connection to a Raspberry Pi or other
taregeted platform. The connection and credentials to access the target platform can be
defined in your maven settings XML file or included in the command line as shown below.)
{platform-name} = raspberrypi | odroid | bananapi | bananapro
FORMAT:
> mvn clean install -P {platform-name}
> mvn clean install -P {platform-name} -D{platform-name}.host=192.168.10.10
EXAMPLES:
> mvn clean install -P raspberrypi
> mvn clean install -P raspberrypi -Draspberrypi.host=192.168.10.10
> mvn clean install -P raspberrypi,ordoid
> mvn clean install -P raspberrypi,ordoid -Draspberrypi.host=192.168.10.10 -Dodroid.host=192.168.10.11
Please note that the following prerequisites are required to be installed on your RaspberryPi
before the pi4j-native project can be compiled. The pi4j-native build will attempt to install
these prerequisites automatically using apt-get:
- gcc 4.6.3 or newer (sudo apt-get install gcc)
- git-core (sudo apt-get install git-core)
- tree (sudo apt-get install tree)
Please note that the following prerequisites are required to be installed on your RaspberryPi
before the pi4j-native project can be compiled. The pi4j-native build will not install
these prerequisites automatically:
- A working JDK8 (Oracle JDK) (sudo apt-get install oracle-java8-jdk)
Use the following command to deploy a snapshot build to the OSS Maven staging repository.
(Note, you must have a "sonatype-oss-snapshot-repo" site credentials defined in your private Maven settings.xml file.)
> mvn clean deploy (Java libraries only)
> mvn clean deploy --projects pi4j-native -P all-platforms (JNI native libraries for all supported platforms)
> mvn clean deploy -P all-platforms (Java libraries and JNI native library for all supported platforms)
If changes or additions are made to the Java JNI classes, then you may need to regenerate the native JNI .H header files.
Use the following Maven command to regenerate the .H header source file.
(NOTE: This command must be executed inside the pi4j-native project, not at the parent project level.)
> mvn generate-sources --projects pi4j-native -P generate-jni-headers
--------------------
DOWNLOADS
--------------------
Use the following Maven command to deploy the downloadable artifacts to the Pi4J downloads page.
> mvn deploy -Drelease-build --projects pi4j-distribution
--------------------
SITE DOCUMENTATION
--------------------
Use the following Maven command to locally generate project site documentation:
> mvn -N clean site
Use the following Maven command to generate and deploy the project site documentation to the Github pages.
(Note, you must have a "github" site credentials defined in your private Maven settings.xml file.
Please see this README for detail on the Maven plugin performing this task: https://github.com/github/maven-plugins/blob/master/README.md)
> mvn -N clean site -Pdeploy-site
---------------------------
PUBLIC SNAPSHOT DEPLOYMENT
---------------------------
Use the following series of instructions to publish a public deployment of a snapshot build:
> mvn clean deploy -P all-platforms
> mvn -N clean site -Pdeploy-site
---------------------------
PUBLIC RELEASE DEPLOYMENT
---------------------------
Use the following series of instructions to publish a public deployment of a release build:
- remove "-SNAPSHOT" from all project pom.xml files
> mvn clean deploy -Drelease-build -Dgpg.passphrase=your-passphrase
> mvn -N clean site -Pdeploy-site,publish-site
- create source tag for release
- send release notification via @Pi4J on Twitter
- create next development source branch