Skip to content
Merged
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/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
- name: Set up JDK 17
uses: actions/setup-java@v1
with:
java-version: '11'
java-version: '17'
- name: Build
run: mvn --batch-mode install
4 changes: 2 additions & 2 deletions .github/workflows/build_latest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
- name: Set up JDK 17
uses: actions/setup-java@v1
with:
java-version: '11'
java-version: '17'
- name: Build
run: mvn --batch-mode install -DskipTests

Expand Down
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ sudo: required
language: java
dist: xenial
jdk:
- openjdk11
- openjdk17

services:
- xvfb
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ https://control-system-studio.readthedocs.io


## Requirements
- [JDK11 or later, suggested is OpenJDK](http://jdk.java.net/12).
- [JDK17 or later, suggested is OpenJDK](https://adoptium.net/en-GB/temurin/archive/?version=17).
- [maven 3.x](https://maven.apache.org/) or [ant](http://ant.apache.org/)


Expand All @@ -27,7 +27,7 @@ mvn clean verify -f dependencies/pom.xml
Define the JAVA_HOME environment variable to point to your Java installation directory.
Mac OS users should use something like:
```
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk-11.0.5+10/Contents/Home
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk-17.0.10+7/Contents/Home
```
Verify through:
```
Expand Down Expand Up @@ -73,13 +73,13 @@ Download Eclipse Oxygen 4.7.1a or later from http://download.eclipse.org/eclipse

Start Eclipse like this:

export JAVA_HOME=/path/to/your/jdk-9-or-later
export JAVA_HOME=/path/to/your/jdk-17-or-later
export PATH="$JAVA_HOME/bin:$PATH"
eclipse/eclipse -consoleLog

Check Eclipse Preferences:

* Java, Installed JREs: JDK 9-or-later should be the default
* Java, Installed JREs: JDK 17-or-later should be the default
* Java, Compiler: JDK Compliance should be "9" or higher


Expand Down Expand Up @@ -108,7 +108,7 @@ In Help/Eclipse Marketplace, search for Maven Integration for Eclipse Luna or ne
Use File/Import/Maven/Existing Maven Projects to import the phoebus source code.

There can be a compiler error because the "JRE System Library" in the Package Explorer shows "[J2SE-1.4]".
Right click on the affected projects (greeting-app, probe), Build Path, Configure Build Path, Libraries, Edit the JRE System Library to use the Workspace default (jdk-9).
Right click on the affected projects (greeting-app, probe), Build Path, Configure Build Path, Libraries, Edit the JRE System Library to use the Workspace default (jdk-17).
Restart Eclipse IDE.

Can now start product/src/main/java/org.phoebus.product/Launcher.java.
Expand All @@ -129,7 +129,7 @@ To run the Phoebus application:

* Run | Edit Configurations...
* Select + | Application
* Module: Your JRE 11
* Module: Your JRE 17
* Classpath `-cp`: select `product` from drop-down
* Main class: `org.phoebus.product.Launcher`
* Set the name to Phoebus
Expand Down
2 changes: 1 addition & 1 deletion app/eslog/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-client</artifactId>
<version>5.17.3</version>
<version>5.18.2</version>
</dependency>

<dependency>
Expand Down
2 changes: 1 addition & 1 deletion app/logbook/ui/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>31.0.1-jre</version>
<version>${guava.version}</version>
</dependency>
<dependency>
<groupId>org.jfxtras</groupId>
Expand Down
40 changes: 0 additions & 40 deletions app/save-and-restore/model/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -73,44 +73,4 @@
<scope>test</scope>
</dependency>
</dependencies>


<build>
<plugins>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.5</version>
<executions>
<execution>
<id>default-prepare-agent</id>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>default-report</id>
<phase>prepare-package</phase>
<goals>
<goal>report</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.0.1</version>

<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
16 changes: 12 additions & 4 deletions dependencies/phoebus-target/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -501,22 +501,22 @@
<dependency>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit</artifactId>
<version>6.6.0.202305301015-r</version>
<version>${jgit.version}</version>
</dependency>
<dependency>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit.archive</artifactId>
<version>6.6.0.202305301015-r</version>
<version>${jgit.version}</version>
</dependency>
<dependency>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit.ssh.jsch</artifactId>
<version>6.6.0.202305301015-r</version>
<version>${jgit.version}</version>
</dependency>
<dependency>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit.ssh.apache</artifactId>
<version>6.6.0.202305301015-r</version>
<version>${jgit.version}</version>
</dependency>
<!-- Spring Boot -->
<dependency>
Expand Down Expand Up @@ -580,6 +580,14 @@
<artifactId>javax.json-api</artifactId>
<version>1.1.4</version>
</dependency>

<!-- https://mvnrepository.com/artifact/org.apache.activemq/activemq-client -->
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-client</artifactId>
<version>5.18.2</version>
</dependency>

</dependencies>

<build>
Expand Down
6 changes: 4 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -86,15 +86,17 @@
<log4j-to-slf4j.version>2.17.1</log4j-to-slf4j.version>
<derby.version>10.16.1.1</derby.version>
<jython.version>2.7.3</jython.version>
<jgit.version>6.7.0.202309050840-r</jgit.version>
<maven.compiler.target>17</maven.compiler.target>
</properties>
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.6.2</version>
<configuration>
<source>11</source>
<target>11</target>
<source>17</source>
<target>17</target>
<fork>true</fork>
<compilerArgs>
<arg>-J--add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED</arg>
Expand Down
8 changes: 4 additions & 4 deletions services/alarm-config-logger/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -59,22 +59,22 @@
<dependency>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit</artifactId>
<version>6.6.0.202305301015-r</version>
<version>${jgit.version}</version>
</dependency>
<dependency>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit.archive</artifactId>
<version>6.6.0.202305301015-r</version>
<version>${jgit.version}</version>
</dependency>
<dependency>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit.ssh.jsch</artifactId>
<version>6.6.0.202305301015-r</version>
<version>${jgit.version}</version>
</dependency>
<dependency>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit.ssh.apache</artifactId>
<version>6.6.0.202305301015-r</version>
<version>${jgit.version}</version>
</dependency>
<!--JUL bindings for sfl4j-->
<dependency>
Expand Down
35 changes: 0 additions & 35 deletions services/save-and-restore/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -158,41 +158,6 @@
<filtering>true</filtering>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.5</version>
<executions>
<execution>
<id>default-prepare-agent</id>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>default-report</id>
<phase>prepare-package</phase>
<goals>
<goal>report</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.0.1</version>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>

<profiles>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,18 @@
*/
package org.phoebus.service.saveandrestore;

/**
* Custom {@link Exception} used to indicate that a wanted {@link org.phoebus.applications.saveandrestore.model.Node}
* requested by client could not be found.
*/
public class NodeNotFoundException extends RuntimeException {

private static final long serialVersionUID = -1828621412391490962L;


/**
*
* @param message Some error message...
*/
public NodeNotFoundException(String message) {
super(message);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,18 @@
*/
package org.phoebus.service.saveandrestore;

/**
* Custom {@link Exception} used to indicate that a {@link org.phoebus.applications.saveandrestore.model.Snapshot}
* request by client could not be found.
*/
public class SnapshotNotFoundException extends RuntimeException {

private static final long serialVersionUID = -980968730210448760L;


/**
*
* @param message Suitable error message.
*/
public SnapshotNotFoundException(String message) {
super(message);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (C) 2018 European Spallation Source ERIC.
* Copyright (C) 2024 European Spallation Source ERIC.
* <p>
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
Expand All @@ -17,21 +17,22 @@
*/
package org.phoebus.service.saveandrestore.application;

import com.fasterxml.jackson.databind.annotation.JsonAppend.Prop;
import org.phoebus.service.saveandrestore.migration.MigrateRdbToElastic;
import org.phoebus.service.saveandrestore.persistence.dao.impl.elasticsearch.ElasticsearchDAO;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.core.env.PropertiesPropertySource;
import org.springframework.scheduling.annotation.EnableScheduling;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Properties;

/**
* Save-and-restore service main class.
*/
@SpringBootApplication(scanBasePackages = "org.phoebus.service.saveandrestore")
@EnableScheduling
@EnableAutoConfiguration
Expand All @@ -48,6 +49,10 @@ private static void help() {
System.out.println();
}

/**
* Main class
* @param args Program arguments. Specifying -help will print options.
*/
public static void main(String[] args) {

// load the default properties
Expand Down Expand Up @@ -87,7 +92,6 @@ public static void main(String[] args) {
}



context = SpringApplication.run(Application.class, args);

if (runMigration) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
import java.util.Properties;
import java.util.logging.Logger;

/**
* Helper class to read application properties.
*/
public class PropertiesHelper {

static Properties prop = new Properties();
Expand All @@ -26,6 +29,10 @@ public class PropertiesHelper {
}
}

/**
*
* @return Properties read from application properties file.
*/
public static Properties getProperties() {
return prop;
}
Expand Down
Loading