Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Several housekeeping tasks
- Updated maven plugin versions
- Removed duplicate CI job
- Included test classes in Checkstyle checks
- Fixed Checkstyle violations
- Removed obsolete elements from POM file
  • Loading branch information
sophokles73 committed Aug 12, 2025
commit c892c30c0349aa6574c088c32eda5a4ca22b7ac7
19 changes: 17 additions & 2 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
# ********************************************************************************
# Copyright (c) 2024 Contributors to the Eclipse Foundation
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
#
# This program and the accompanying materials are made available under the
# terms of the Apache License Version 2.0 which is available at
# https://www.apache.org/licenses/LICENSE-2.0
#
# SPDX-License-Identifier: Apache-2.0
# *******************************************************************************/

name: Verify PR

on:
Expand All @@ -10,9 +23,11 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Set up JDK 17
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
Expand Down
21 changes: 18 additions & 3 deletions .github/workflows/build_deploy.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,17 @@
name: Continuous Integration
# ********************************************************************************
# Copyright (c) 2024 Contributors to the Eclipse Foundation
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
#
# This program and the accompanying materials are made available under the
# terms of the Apache License Version 2.0 which is available at
# https://www.apache.org/licenses/LICENSE-2.0
#
# SPDX-License-Identifier: Apache-2.0
# *******************************************************************************/

name: Publish SNAPSHOT to Maven Central

on:
push:
Expand All @@ -12,10 +25,12 @@ jobs:
contents: write

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: 'recursive'

- name: Set up Apache Maven Central
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with: # configure settings.xml
distribution: 'temurin'
java-version: '17'
Expand Down
21 changes: 18 additions & 3 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
# ********************************************************************************
# Copyright (c) 2024 Contributors to the Eclipse Foundation
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
#
# This program and the accompanying materials are made available under the
# terms of the Apache License Version 2.0 which is available at
# https://www.apache.org/licenses/LICENSE-2.0
#
# SPDX-License-Identifier: Apache-2.0
# *******************************************************************************/

name: "CodeQL"

on:
Expand Down Expand Up @@ -28,16 +41,18 @@ jobs:
fail-fast: false
matrix:
include:
# Analyzes Java code directly from the codebase without a build
# use autobuild to also include types generated from proto3 files
- language: java-kotlin
build-mode: none # analyzes Java only
build-mode: autobuild
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: 'recursive'

# Setup java 17.
- name: Set up JDK 17
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
Expand Down
13 changes: 13 additions & 0 deletions .github/workflows/coverage-comment-pr.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
# ********************************************************************************
# Copyright (c) 2024 Contributors to the Eclipse Foundation
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
#
# This program and the accompanying materials are made available under the
# terms of the Apache License Version 2.0 which is available at
# https://www.apache.org/licenses/LICENSE-2.0
#
# SPDX-License-Identifier: Apache-2.0
# *******************************************************************************/

name: Add coverage comment to PR

on:
Expand Down
21 changes: 18 additions & 3 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
# ********************************************************************************
# Copyright (c) 2024 Contributors to the Eclipse Foundation
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
#
# This program and the accompanying materials are made available under the
# terms of the Apache License Version 2.0 which is available at
# https://www.apache.org/licenses/LICENSE-2.0
#
# SPDX-License-Identifier: Apache-2.0
# *******************************************************************************/

name: Java Test and Coverage

on:
Expand All @@ -17,9 +30,11 @@ jobs:

- name: Checkout code
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
with:
submodules: 'recursive'

- name: Set up Apache Maven Central
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with: # configure settings.xml
distribution: 'temurin'
java-version: '17'
Expand All @@ -41,12 +56,12 @@ jobs:
INDEX_PATH="target/site/jacoco/index.html"
export COVERAGE_PERCENTAGE=$(grep -oP '(?<=<td class="ctr2">).*?(?=%</td>)' $INDEX_PATH | sed 's/ //g')
export COVERAGE_PERCENTAGE=$(printf "%.2f" "$COVERAGE_PERCENTAGE")
echo "COVERAGE_PERCENTAGE= $COVERAGE_PERCENTAGE" >> $GITHUB_ENV
echo "COVERAGE_PERCENTAGE=$COVERAGE_PERCENTAGE" >> $GITHUB_ENV
echo "COVERAGE_PERCENTAGE: $COVERAGE_PERCENTAGE"


- name: Upload JaCoCo Coverage report
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
with:
name: coverage-report
path: target/site/jacoco
Expand Down
22 changes: 17 additions & 5 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
# ********************************************************************************
# Copyright (c) 2024 Contributors to the Eclipse Foundation
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
#
# This program and the accompanying materials are made available under the
# terms of the Apache License Version 2.0 which is available at
# https://www.apache.org/licenses/LICENSE-2.0
#
# SPDX-License-Identifier: Apache-2.0
# *******************************************************************************/

name: Java Linting

on:
Expand All @@ -12,18 +25,17 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: 'recursive'

- name: Set up JDK 17
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: maven

- name: Install dependencies
run: mvn install -DskipTests

- name: Run Checkstyle
run: mvn checkstyle:check

Expand Down
18 changes: 16 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,17 @@
name: Release to maven central
# ********************************************************************************
# Copyright (c) 2024 Contributors to the Eclipse Foundation
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
#
# This program and the accompanying materials are made available under the
# terms of the Apache License Version 2.0 which is available at
# https://www.apache.org/licenses/LICENSE-2.0
#
# SPDX-License-Identifier: Apache-2.0
# *******************************************************************************/

name: Release to Maven Central

on:
workflow_dispatch:
Expand All @@ -19,10 +32,11 @@ jobs:

- uses: actions/checkout@v4
with:
submodules: 'recursive'
token: ${{ secrets.BOT_GITHUB_TOKEN }}

- name: Set up Apache Maven Central
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with: # configure settings.xml
distribution: 'temurin'
java-version: '17'
Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "up-spec"]
path = up-spec
url = https://github.com/eclipse-uprotocol/up-spec
40 changes: 30 additions & 10 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

== Overview

This library implements the https://github.com/eclipse-uprotocol/uprotocol-spec/blob/main/languages.adoc[uProtocol Language Specific Library Requirements] for Java defined in https://github.com/eclipse-uprotocol/uprotocol-spec/tree/main[uProtocol Specifications]. The library is organized into packages that are described in <<sdk-packages>> below and organized by the layers of the protocol.
This is the https://github.com/eclipse-uprotocol/uprotocol-spec/blob/v1.6.0-alpha.3/languages.adoc[uProtocol v1.6.0-alpha.3 Language Library] for the Java programming language. The library is organized into packages that are described in <<sdk-packages>> below and organized by the layers of the protocol.

Each package contains a README.adoc file that describes the purpose of the package and how to use it.

Expand All @@ -27,35 +27,55 @@ To pull the Library from maven central, setting ${uprotocol.version} to the late
=== Using The Library

.SDK Packages
[#sdk-packages,width=100%,cols="1,2,5",options="header"]
[#sdk-packages,width=100%,cols="1,5,2",options="header"]
|===

| Package | Protocol Layer | Purpose
| Package | Purpose | Reference

| xref:src/main/java/org/eclipse/uprotocol/communication/README.adoc[`*client*`]
| https://github.com/eclipse-uprotocol/up-spec/tree/main/up-l3[Application Layer (uP-L3)]
| Top level client-facing interfaces to communication with USubscription, UDiscovery, and UTwin services.
| https://github.com/eclipse-uprotocol/up-spec/tree/v1.6.0-alpha.3/up-l3[Application Layer (uP-L3)]

| xref:src/main/java/org/eclipse/uprotocol/communication/README.adoc[`*communication*`]
| https://github.com/eclipse-uprotocol/up-spec/tree/main/up-l2[communication layer (uP-L2)]
| Common implementation of communication messaging patterns (publisher, subscriber, Rpcclient, RpcServer, etc..) tha t is build on top of the L1 transport interface (see below)
| Common implementation of communication messaging patterns (publisher, subscriber, RpcClient, RpcServer, etc..) that are built on top of the L1 transport interface (see below).
| https://github.com/eclipse-uprotocol/up-spec/tree/v1.6.0-alpha.3/up-l2[Communication Layer (uP-L2)]

| link:src/main/java/org/eclipse/uprotocol/transport/README.adoc[`*transport*`]
| https://github.com/eclipse-uprotocol/uprotocol-spec/blob/main/up-l1/README.adoc[Transport Layer (uP-L1)]
| Interface and data model for how to send() and receive() messages in a common way across various transport technologies (ex. zenoh, mqtt, http, etc...). the interface is implemented by transports (ex. up-transport-android-java), and the interface is then used to build the uProtocol layer 2 communication layer implementation.
| https://github.com/eclipse-uprotocol/uprotocol-spec/blob/v1.6.0-alpha.3/up-l1/README.adoc[Transport Layer (uP-L1)]

| link:src/main/java/org/eclipse/uprotocol/uri/README.adoc[`*uuri*`]
| Basics
| uProtocol addressing scheme (UUri) builders, validators, and serializers.
| Basics


| link:src/main/java/org/eclipse/uprotocol/uuid/README.adoc[`*uuid*`]
| Basics
| uProtocol unique identifier builders, validators, and serializers.
| Basics

| link:src/main/java/org/eclipse/uprotocol/cloudevent/README.adoc[`*cloudevent*`]
| Legacy
| A representation of uProtocol messages used in older versions of the specifications kept for backwards compatibility.
| Legacy

|===

=== Building from Source

. Clone the repository:
+
[source,console]
----
git clone --recurse-submodules https://github.com/eclipse-uprotocol/up-java.git
----
. Navigate to the project directory:
+
[source,console]
----
cd up-java
----
. Build the project using Maven:
+
[source,console]
----
mvn clean install
----
12 changes: 11 additions & 1 deletion checkstyle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,16 @@
<module name="NestedIfDepth">
<property name="max" value="3"/>
</module>
<module name="JavadocMethod">
<property name="accessModifiers" value="public,protected"/>
</module>
<module name="JavadocStyle">
<property name="checkEmptyJavadoc" value="true" />
<property name="scope" value="protected" />
</module>
<module name="JavadocType">
<property name="allowMissingParamTags" value="true" />
<property name="scope" value="protected" />
</module>
</module>
</module>

Loading