Skip to content

Commit 7e09c5a

Browse files
authored
[O2-B1476] Migrate project to using maven instead of ant (#13)
* migrates the project to using maven * removes `lib` and `lib64` and manually generated proto files * uses maven to gather dependencies (as opposed to lib) and generate proto files * adds GH action for ensuring mvn compile, validate and package are passing for macos and ubuntu
1 parent c58c732 commit 7e09c5a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+238
-3213
lines changed
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Compile, Validate and Package BKP-LHC-Client on Multiple OS
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
8+
jobs:
9+
compile:
10+
runs-on: ${{ matrix.os }}
11+
strategy:
12+
matrix:
13+
os: [ubuntu-latest, macos-latest]
14+
steps:
15+
- name: Checkout code
16+
uses: actions/checkout@v5
17+
- name: Set up JDK 21
18+
uses: actions/setup-java@v5
19+
with:
20+
distribution: 'temurin'
21+
java-version: '21'
22+
- name: Compile with Maven
23+
run: |
24+
if [[ "${{ runner.os }}" == "Linux" ]]; then
25+
mvn clean compile -Dos.version=linux-x86_64
26+
elif [[ "${{ runner.os }}" == "macOS" ]]; then
27+
mvn clean compile -Dos.version=osx-x86_64
28+
fi
29+
- name: Validate Maven Project
30+
run: |
31+
if [[ "${{ runner.os }}" == "Linux" ]]; then
32+
mvn validate -Dos.version=linux-x86_64
33+
elif [[ "${{ runner.os }}" == "macOS" ]]; then
34+
mvn validate -Dos.version=osx-x86_64
35+
fi
36+
- name: Package with Maven (Fat JAR)
37+
run: |
38+
if [[ "${{ runner.os }}" == "Linux" ]]; then
39+
mvn clean package -Dos.version=linux-x86_64
40+
elif [[ "${{ runner.os }}" == "macOS" ]]; then
41+
mvn clean package -Dos.version=osx-x86_64
42+
fi

.gitignore

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,17 @@
1-
bin
2-
AliDip2BK.jar
3-
.idea
4-
STATE
5-
AliDip2BK.iml
6-
RunsHistory
7-
out/
1+
## Maven build output
2+
target/
3+
4+
## IDE files
5+
.idea/
6+
.vscode/
7+
*.iml
8+
.classpath
9+
.project
10+
.settings/
11+
12+
## OS files
13+
.DS_Store
14+
Thumbs.db
15+
16+
## Protobuf generated sources (if not needed in VCS)
17+
bin

README.md

Lines changed: 12 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,18 @@
1-
# AliDip2BK
1+
# BKP-LHC-Client
22

3-
Initial Repository based on work from @iclegrand in repository: https://github.com/iclegrand/AliDip2BK
3+
Repository based on work from @iclegrand in repository: https://github.com/iclegrand/AliDip2BK
44

5-
Collect selected Info from the CERN DIP system (LHC & ALICE -DCS) and publish them into the Bookkeeping/InfoLogger systems
6-
7-
A detailed description for this project is provided by Roberto in this document:
5+
Projects consumes selected messages from the CERN DIP system (LHC & ALICE -DCS) and publishes them into the O2 systems. A detailed description for this project is provided by Roberto in this document:
86
https://codimd.web.cern.ch/G0TSXqA1R8iPqWw2w2wuew
97

8+
### Requirements
9+
- This program requires java 11 on a 64 bit system (this is a constrain from the DIP library)
10+
- maven
1011

11-
This program requires java 11 on a 64 bit system
12-
(this is a constrain from the DIP library)
13-
14-
To test the java version run
15-
java -version
16-
17-
The run configuration is defined in the AliDip2BK.properties file.
18-
19-
To run the program :
20-
21-
sh runAliDip2BK.sh
22-
23-
When the the program is stopped, it enters into the shutdown mode and it will
24-
unsubscribe to the DIP data providers will wait to process the DipData queue
25-
and saves the state of the fills and runs.
12+
### Maven Commands for dev,tst,deployments
13+
```bash
14+
mvn <clean> compile -Dos.version={os_version}
15+
mvn <clean> package -Dos.version={os_version}
16+
```
2617

18+
E.g. os_version `macosx-x86_64`

build.xml

Lines changed: 0 additions & 27 deletions
This file was deleted.

lib/kafka-clients-3.1.0.jar

-4.69 MB
Binary file not shown.

lib/protobuf-java-3.20.0.jar

-1.61 MB
Binary file not shown.

lib/slf4j-api-1.7.30.jar

-40.5 KB
Binary file not shown.

lib/slf4j-simple-1.7.30.jar

-14.9 KB
Binary file not shown.

lib64/PlatformDependent.a

-144 KB
Binary file not shown.

lib64/PlatformDependent.lib

-142 KB
Binary file not shown.

0 commit comments

Comments
 (0)