Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 2 additions & 2 deletions .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 21
- name: Set up JDK 25
uses: actions/setup-java@v4
with:
java-version: '21'
java-version: '25'
distribution: 'temurin'
cache: maven
- name: Runs Elasticsearch
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 21
- name: Set up JDK 25
uses: actions/setup-java@v4
with:
java-version: '21'
java-version: '25'
distribution: 'temurin'
cache: maven
- name: Build with Maven
Expand All @@ -39,10 +39,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 21
- name: Set up JDK 25
uses: actions/setup-java@v4
with:
java-version: '21'
java-version: '25'
distribution: 'temurin'
cache: maven
- name: Test with Maven
Expand All @@ -59,10 +59,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 21
- name: Set up JDK 25
uses: actions/setup-java@v4
with:
java-version: '21'
java-version: '25'
distribution: 'temurin'
cache: maven
- name: Runs Elasticsearch
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# syntax=docker/dockerfile:1

FROM eclipse-temurin:21-jdk AS builder
FROM eclipse-temurin:25-jdk AS builder
WORKDIR /build
RUN apt-get update && apt-get install -y maven
COPY . .
RUN mvn --batch-mode --update-snapshots clean package -DskipTests

FROM eclipse-temurin:21-jre AS runner
FROM eclipse-temurin:25-jre AS runner
WORKDIR /app
COPY --from=builder /build/target/ChannelFinder-*.jar ./channelfinder.jar
CMD ["java", "-jar", "/app/channelfinder.jar", "--spring.config.name=application"]
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ For using docker containers there is a barebones [docker compose file](./compose

* Prerequisites

* JDK 21
* JDK 25
* Elastic version 8.11.x
* **For authN/authZ using LDAP:** LDAP server, e.g. OpenLDAP

Expand All @@ -62,7 +62,7 @@ Options:
#### Running

```bash
sudo apt-get install openjdk-21-jre git curl wget
sudo apt-get install openjdk-25-jre git curl wget
sudo systemctl start elasticsearch # Or other command to run elastic search

# Replace verison with the release you want
Expand Down Expand Up @@ -98,7 +98,7 @@ and [Eclipse](https://eclipseide.org/).

* Prerequisites

* JDK 21
* JDK 25
* Maven (via package manager or via the wrapper `./mvnw`) (version specified
in [the wrapper properties](./.mvn/wrapper/maven-wrapper.properties))

Expand Down
21 changes: 9 additions & 12 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,16 @@
</developers>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<spring.boot-version>3.4.4</spring.boot-version>
<jackson.version>2.18.3</jackson.version>
<spring.boot-version>3.5.7</spring.boot-version>
<jackson.version>3.0.1</jackson.version>
<elasticsearch.version>8.11.2</elasticsearch.version>
<junit-jupiter.version>5.10.0</junit-jupiter.version>
<skipITs>true</skipITs>
<skipITCoverage>true</skipITCoverage>
<jacoco.skip>true</jacoco.skip>
<java.version>21</java.version>
<java.version>25</java.version>
<maven.compiler.source>25</maven.compiler.source>
<maven.compiler.target>25</maven.compiler.target>
<!--suppress UnresolvedMavenProperty -->
<project.build.outputTimestamp>${git.commit.time}</project.build.outputTimestamp>
</properties>
Expand Down Expand Up @@ -84,12 +86,7 @@
<version>${elasticsearch.version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>${jackson.version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<groupId>tools.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>${jackson.version}</version>
</dependency>
Expand Down Expand Up @@ -142,7 +139,7 @@
<dependency>
<groupId>org.jacoco</groupId>
<artifactId>org.jacoco.agent</artifactId>
<version>0.8.11</version>
<version>0.8.14</version>
<scope>runtime</scope>
</dependency>

Expand Down Expand Up @@ -234,7 +231,7 @@
<plugin>
<groupId>com.spotify.fmt</groupId>
<artifactId>fmt-maven-plugin</artifactId>
<version>2.23</version>
<version>2.29</version>
<configuration>
<filesNamePattern>.*\.java</filesNamePattern>
<skipSortingImports>false</skipSortingImports>
Expand Down Expand Up @@ -307,7 +304,7 @@
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.10</version>
<version>0.8.14</version>
<executions>
<execution>
<goals>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
import com.fasterxml.jackson.databind.ObjectMapper;
import java.io.IOException;
import java.io.InputStream;
import java.net.URI;
import java.net.URISyntaxException;
import java.net.URL;
import java.util.ArrayList;
import java.util.Collection;
Expand Down Expand Up @@ -275,9 +277,14 @@ private void createSRChannels(Collection<Channel> channels, int freq) {

public void createTagsAndProperties(URL tagResource, URL propertyResource) {
// Setup the default tags
String tagsURL;
tagsURL = tagResource.toExternalForm();
try (InputStream input = new URL(tagsURL).openStream()) {
URI tagsURI;
try {
tagsURI = new URI(tagResource.toExternalForm());
} catch (URISyntaxException ex) {
logger.log(Level.SEVERE, "Cannot parse URL:", tagResource.toExternalForm());
return;
}
try (InputStream input = tagsURI.toURL().openStream()) {
List<Tag> jsonTag = mapper.readValue(input, new TypeReference<List<Tag>>() {});

jsonTag.forEach(
Expand All @@ -304,9 +311,14 @@ public void createTagsAndProperties(URL tagResource, URL propertyResource) {
}

// Setup the default properties
String propertiesURL;
propertiesURL = propertyResource.toExternalForm();
try (InputStream input = new URL(propertiesURL).openStream()) {
URI propertiesURI;
try {
propertiesURI = new URI(propertyResource.toExternalForm());
} catch (URISyntaxException ex) {
logger.log(Level.SEVERE, "Cannot parse URL:", propertyResource.toExternalForm());
return;
}
try (InputStream input = propertiesURI.toURL().openStream()) {
List<Property> jsonTag = mapper.readValue(input, new TypeReference<>() {});

jsonTag.forEach(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,7 @@ public AuthenticationProvider demoAuthProvider() {
.build());
}

DaoAuthenticationProvider provider = new DaoAuthenticationProvider();
provider.setUserDetailsService(manager);
DaoAuthenticationProvider provider = new DaoAuthenticationProvider(manager);
provider.setPasswordEncoder(encoder);
return provider;
}
Expand Down
22 changes: 1 addition & 21 deletions src/main/java/org/phoebus/channelfinder/entity/SearchResult.java
Original file line number Diff line number Diff line change
@@ -1,25 +1,5 @@
package org.phoebus.channelfinder.entity;

import com.google.common.base.Objects;
import java.util.List;

public record SearchResult(List<Channel> channels, long count) {

@Override
public String toString() {
return "SearchResult{" + "count=" + count + ", channels=" + channels + '}';
}

@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
SearchResult that = (SearchResult) o;
return count == that.count && Objects.equal(channels, that.channels);
}

@Override
public int hashCode() {
return Objects.hashCode(count, channels);
}
}
public record SearchResult(List<Channel> channels, long count) {}
5 changes: 4 additions & 1 deletion src/test/resources/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# ------------------------------------------------------------------------------

FROM eclipse-temurin:21-jre
FROM eclipse-temurin:25-jre

# Install curl, which we use for health check and is not included in temurin:25
RUN apt-get update && apt-get install -y curl

# deployment unit
COPY ../../../target/ChannelFinder-*.jar /channelfinder/ChannelFinder-*.jar
Expand Down
Loading