diff --git a/.github/workflows/deploy-docker.yml b/.github/workflows/deploy-docker.yml index e96d10f25a..5ac31ca543 100644 --- a/.github/workflows/deploy-docker.yml +++ b/.github/workflows/deploy-docker.yml @@ -47,14 +47,12 @@ jobs: uses: docker/setup-buildx-action@v1 - name: Login to DockerHub - if: github.event_name != 'pull_request' uses: docker/login-action@v1 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Login to GHCR - if: github.event_name != 'pull_request' uses: docker/login-action@v1 with: registry: ghcr.io @@ -67,7 +65,7 @@ jobs: context: . file: docker/Dockerfile platforms: linux/amd64,linux/arm64 - push: ${{ github.event_name != 'pull_request' }} + push: ${{ github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'prebuild docker image') }} tags: ${{ steps.bco-meta.outputs.tags }} labels: ${{ steps.bco-meta.outputs.labels }} env: @@ -102,7 +100,7 @@ jobs: BCO_BASE_IMAGE_VERSION=sha-${{ steps.short-sha.outputs.sha }} file: ./docker/device-manager/openhab/Dockerfile platforms: linux/amd64,linux/arm64 - push: ${{ github.event_name != 'pull_request' }} + push: ${{ github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'prebuild docker image') }} tags: ${{ steps.bco-device-meta.outputs.tags }} labels: ${{ steps.bco-device-meta.outputs.labels }} - @@ -132,6 +130,6 @@ jobs: BCO_BASE_IMAGE_VERSION=sha-${{ steps.short-sha.outputs.sha }} file: ./docker/bco-demo/Dockerfile platforms: linux/amd64,linux/arm64 - push: ${{ github.event_name != 'pull_request' }} + push: ${{ github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'prebuild docker image') }} tags: ${{ steps.bco-demo-meta.outputs.tags }} labels: ${{ steps.bco-demo-meta.outputs.labels }} diff --git a/buildSrc/build.gradle.kts b/buildSrc/build.gradle.kts index 2c35fcffe5..88f80c919c 100644 --- a/buildSrc/build.gradle.kts +++ b/buildSrc/build.gradle.kts @@ -8,7 +8,9 @@ plugins { repositories { // Use the plugin portal to apply community plugins in convention plugins. + mavenLocal() gradlePluginPortal() + google() mavenCentral() } diff --git a/buildSrc/src/main/kotlin/org.openbase.bco.gradle.kts b/buildSrc/src/main/kotlin/org.openbase.bco.gradle.kts index 6f49606f2d..087d4eb7f0 100644 --- a/buildSrc/src/main/kotlin/org.openbase.bco.gradle.kts +++ b/buildSrc/src/main/kotlin/org.openbase.bco.gradle.kts @@ -15,6 +15,7 @@ repositories { maven { url = uri("https://oss.sonatype.org/content/groups/public/") } + google() mavenCentral() } @@ -29,8 +30,8 @@ java { } dependencies { - implementation("org.jetbrains.kotlin:kotlin-reflect") - implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8") + implementation("org.jetbrains.kotlin:kotlin-reflect:_") + implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:_") testImplementation("org.junit.jupiter:junit-jupiter-api:[5.6,5.7-alpha)") testImplementation("org.junit.vintage:junit-vintage-engine:[5.6,5.7-alpha)") } diff --git a/docker/Dockerfile b/docker/Dockerfile index 006a86cef5..7b0c6aab67 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,5 +1,12 @@ # Install dependencies -FROM ubuntu:latest AS builder +FROM ubuntu:focal-20211006 AS builder + +ENV \ + JAVA_OPTS="" \ + LC_ALL="en_US.UTF-8" \ + LANG="en_US.UTF-8" \ + LANGUAGE="en_US.UTF-8" \ + JAVA_VERSION="11" WORKDIR /workspace @@ -12,6 +19,8 @@ RUN apt update && \ git \ rsync \ curl \ + locales \ + locales-all \ wget && \ apt clean @@ -25,16 +34,10 @@ RUN ./gradlew --version RUN ./prepare.sh RUN cd lib/jul && \ prefix="/tmp/" ./install.sh \ - -Dmaven.javadoc.skip=true \ - -Dmaven.wagon.http.retryHandler.count=3 \ - -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false \ - -Dmaven.wagon.httpconnectionManager.ttlSeconds=120 + -Dmaven.javadoc.skip=true # Build bco -RUN ./gradlew :bco.app.util:installDist -x test -x javadoc --no-daemon --stacktrace \ - -Dmaven.wagon.http.retryHandler.count=3 \ - -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false \ - -Dmaven.wagon.httpconnectionManager.ttlSeconds=120 +RUN ./gradlew :bco.app.util:installDist -x test -x javadoc --no-daemon --stacktrace # Switch to baseline image FROM ubuntu:latest @@ -75,8 +78,7 @@ ENV \ BCO_LOGS="/home/bco/data/log" \ BCO_BINARY="/usr/bin/bco" \ BCO_OPTIONS="" \ - JAVA_VERSION="11" \ - JAVA_OPTS="--add-opens java.base/java.util=ALL-UNNAMED" + JAVA_VERSION="11" # Basic build-time metadata as defined at http://label-schema.org LABEL org.label-schema.build-date=$BUILD_DATE \ diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 7454180f2a..e708b1c023 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/lib/external/rejoiner-0.5.0-bco.jar b/lib/external/rejoiner-0.5.0-bco.jar new file mode 100644 index 0000000000..abb4cca7ae Binary files /dev/null and b/lib/external/rejoiner-0.5.0-bco.jar differ diff --git a/lib/external/rejoiner-guice-0.5.0-bco.jar b/lib/external/rejoiner-guice-0.5.0-bco.jar new file mode 100644 index 0000000000..2450fd56f6 Binary files /dev/null and b/lib/external/rejoiner-guice-0.5.0-bco.jar differ diff --git a/lib/jul b/lib/jul index ba97567360..3069e4404d 160000 --- a/lib/jul +++ b/lib/jul @@ -1 +1 @@ -Subproject commit ba97567360fc4de2bdbffe28b25363dd9844094f +Subproject commit 3069e4404de02bfcda8096b4f8e414176cff82c1 diff --git a/module/api/graphql/build.gradle.kts b/module/api/graphql/build.gradle.kts index f7e2b4fdfc..4ef1497cc3 100644 --- a/module/api/graphql/build.gradle.kts +++ b/module/api/graphql/build.gradle.kts @@ -1,29 +1,41 @@ +import org.gradle.internal.impldep.org.junit.experimental.categories.Categories.CategoryFilter.exclude plugins { id("org.openbase.bco") - id("org.springframework.boot") version "2.6.1" + id("org.springframework.boot") id("io.spring.dependency-management") version "1.0.11.RELEASE" } dependencies { + api(project(":bco.dal.remote")) - api("com.graphql-java-kickstart:graphql-spring-boot-starter:8.0.0") { + api("org.springframework.boot:spring-boot-starter-webflux:_") + api("com.graphql-java-kickstart:graphql-spring-boot-starter:_") { exclude(group = "org.springframework.boot", module = "spring-boot-starter-tomcat") } - api("org.springframework.boot:spring-boot-starter-jetty:2.6.1") - api("org.springframework.boot:spring-boot-starter-webflux:2.6.1") - api("org.springframework:spring-webmvc:5.3.13") - api("com.google.api.graphql:rejoiner:0.3.1") { - exclude(group = "com.google.inject", module = "guice") - exclude(group = "com.graphql-java", module = "graphql-java") - exclude(group = "com.google.inject.extensions", module = "guice-multibindings") - } - api("com.google.inject.extensions:guice-multibindings:4.2.3") - api("com.google.inject:guice:5.0.1") - api("com.google.guava:guava:28.0-jre") - api("net.javacrumbs.future-converter:future-converter-java8-guava:1.2.0") - api("org.jmdns:jmdns:3.5.6") - api("io.reactivex.rxjava2:rxjava:2.2.21") + api("org.springframework.boot:spring-boot-starter-jetty:_") + api(Spring.boot.webflux) + api("org.springframework:spring-webmvc:_") + + api( rootProject.files("lib/external/rejoiner-0.5.0-bco.jar")) + api( rootProject.files("lib/external/rejoiner-guice-0.5.0-bco.jar")) +// disabled since rejoiner is linked locally. +// api("com.google.api.graphql:rejoiner-guice:_") { +// exclude(group = "com.google.inject", module = "guice") +// exclude(group = "com.graphql-java", module = "graphql-java") +// exclude(group = "com.google.inject.extensions", module = "guice-multibindings") +// } +// api("com.google.api.graphql:rejoiner:_") { +// exclude(group = "com.google.inject", module = "guice") +// exclude(group = "com.graphql-java", module = "graphql-java") +// exclude(group = "com.google.inject.extensions", module = "guice-multibindings") +// } + api("com.google.inject.extensions:guice-multibindings:_") + api("com.google.inject:guice:_") + api("com.google.guava:guava:_") + api("net.javacrumbs.future-converter:future-converter-java8-guava:_") + api("org.jmdns:jmdns:_") + api("io.reactivex.rxjava2:rxjava:_") } description = "BCO GraphQL API" diff --git a/module/api/graphql/src/main/java/org/openbase/bco/api/graphql/BcoGraphQlApiSpringBootApplication.java b/module/api/graphql/src/main/java/org/openbase/bco/api/graphql/BcoGraphQlApiSpringBootApplication.java index 746a71a1f6..8739fab36c 100644 --- a/module/api/graphql/src/main/java/org/openbase/bco/api/graphql/BcoGraphQlApiSpringBootApplication.java +++ b/module/api/graphql/src/main/java/org/openbase/bco/api/graphql/BcoGraphQlApiSpringBootApplication.java @@ -56,8 +56,13 @@ import org.reactivestreams.Publisher; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.boot.web.servlet.FilterRegistrationBean; import org.springframework.context.annotation.Bean; +import org.springframework.web.cors.CorsConfiguration; +import org.springframework.web.cors.UrlBasedCorsConfigurationSource; +import org.springframework.web.filter.CorsFilter; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; @@ -88,6 +93,23 @@ public class BcoGraphQlApiSpringBootApplication { ); } + @Value("${graphql.url:/graphql}") + private String graphqlurl; + + @Bean + public FilterRegistrationBean corsFilter() { + UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource(); + CorsConfiguration config = new CorsConfiguration(); + config.setAllowCredentials(false); + config.addAllowedOrigin("*"); + config.addAllowedHeader("*"); + config.addAllowedMethod("*"); + source.registerCorsConfiguration(graphqlurl, config); + FilterRegistrationBean bean = new FilterRegistrationBean<>(new CorsFilter(source)); + bean.setOrder(0); + return bean; + } + @Bean GraphQLSchema schema() { GraphQLSchema schema = injector.getInstance(Key.get(GraphQLSchema.class, Schema.class)); diff --git a/module/app/base/build.gradle.kts b/module/app/base/build.gradle.kts index 2c92c799c8..da2347adf3 100644 --- a/module/app/base/build.gradle.kts +++ b/module/app/base/build.gradle.kts @@ -4,7 +4,7 @@ plugins { id("org.openbase.bco") -// id("org.graalvm.buildtools.native").version("0.9.4") +// id("org.graalvm.buildtools.native") application } @@ -57,7 +57,7 @@ dependencies { api(project(":bco.app.cloud.connector")) api(project(":bco.app.influxdb.connector")) api(project(":bco.api.graphql")) - api("commons-collections:commons-collections:3.2.2") + api("commons-collections:commons-collections:_") testImplementation(project(":bco.dal.test")) testImplementation("org.junit.jupiter:junit-jupiter:[5.6,5.7-alpha)") } diff --git a/module/app/cloudconnector/build.gradle.kts b/module/app/cloudconnector/build.gradle.kts index da0ed9aa91..8c08523fbd 100644 --- a/module/app/cloudconnector/build.gradle.kts +++ b/module/app/cloudconnector/build.gradle.kts @@ -8,7 +8,7 @@ plugins { dependencies { api(project(":bco.dal.control")) - api("io.socket:socket.io-client:1.0.0") + api("io.socket:socket.io-client:_") testImplementation(project(":bco.authentication.test")) } diff --git a/module/app/util/build.gradle.kts b/module/app/util/build.gradle.kts index d3e733a164..3fd04a2111 100644 --- a/module/app/util/build.gradle.kts +++ b/module/app/util/build.gradle.kts @@ -64,7 +64,7 @@ createAdditionalScript("bco-registry-validate") { } createAdditionalScript("bco-app-adhoc-generate-trainingdata") { - mainClass.set("org.openbase.bco.app.util.launch.BCOTrainDataGeneratorLauncher") + mainClass.set("org.openbase.bco.app.util.launch.BCOAdhocTrainDataGeneratorLauncher") } createAdditionalScript("bco-console") { @@ -93,7 +93,6 @@ distributions { } } - tasks.register("deploy-bco-dist") { dependsOn("installDist") val bcoDist = System.getenv("BCO_DIST")?:"${System.getenv("HOME")}/usr" @@ -118,7 +117,7 @@ dependencies { api(project(":bco.app.influxdb.connector")) api(project(":bco.api.graphql")) api(project(":bco.dal.visual")) - api("commons-collections:commons-collections:3.2.2") + api("commons-collections:commons-collections:_") testImplementation(project(":bco.dal.test")) testImplementation("org.junit.jupiter:junit-jupiter:[5.6,5.7-alpha)") } diff --git a/module/app/util/src/main/java/org/openbase/bco/app/util/launch/BCOTrainDataGeneratorLauncher.java b/module/app/util/src/main/java/org/openbase/bco/app/util/launch/BCOAdhocTrainDataGeneratorLauncher.java similarity index 99% rename from module/app/util/src/main/java/org/openbase/bco/app/util/launch/BCOTrainDataGeneratorLauncher.java rename to module/app/util/src/main/java/org/openbase/bco/app/util/launch/BCOAdhocTrainDataGeneratorLauncher.java index efca7a3450..7aff396fc6 100644 --- a/module/app/util/src/main/java/org/openbase/bco/app/util/launch/BCOTrainDataGeneratorLauncher.java +++ b/module/app/util/src/main/java/org/openbase/bco/app/util/launch/BCOAdhocTrainDataGeneratorLauncher.java @@ -55,9 +55,9 @@ /* * @author Divine Threepwood */ -public class BCOTrainDataGeneratorLauncher { +public class BCOAdhocTrainDataGeneratorLauncher { - public static final Logger LOGGER = LoggerFactory.getLogger(BCOTrainDataGeneratorLauncher.class); + public static final Logger LOGGER = LoggerFactory.getLogger(BCOAdhocTrainDataGeneratorLauncher.class); private static final Random random = new Random(System.currentTimeMillis()); public static final long TIMEOUT = 1000; diff --git a/module/authentication/core/src/main/java/org/openbase/bco/authentication/core/AuthenticatorLauncher.java b/module/authentication/core/src/main/java/org/openbase/bco/authentication/core/AuthenticatorLauncher.java index 6f99687223..233f15398a 100644 --- a/module/authentication/core/src/main/java/org/openbase/bco/authentication/core/AuthenticatorLauncher.java +++ b/module/authentication/core/src/main/java/org/openbase/bco/authentication/core/AuthenticatorLauncher.java @@ -2,12 +2,8 @@ import org.openbase.bco.authentication.lib.AuthenticationService; import org.openbase.bco.authentication.lib.BCO; -import org.openbase.bco.authentication.lib.jp.JPAuthenticationScope; -import org.openbase.bco.authentication.lib.jp.JPCredentialsDirectory; -import org.openbase.bco.authentication.lib.jp.JPResetCredentials; -import org.openbase.bco.authentication.lib.jp.JPSessionTimeout; +import org.openbase.bco.authentication.lib.jp.*; import org.openbase.jps.core.JPService; -import org.openbase.jps.preset.JPPrefix; import org.openbase.jul.exception.CouldNotPerformException; import org.openbase.jul.exception.InstantiationException; import org.openbase.jul.pattern.launch.AbstractLauncher; @@ -45,7 +41,7 @@ public AuthenticatorLauncher() throws InstantiationException { @Override protected void loadProperties() { - JPService.registerProperty(JPPrefix.class); + JPService.registerProperty(JPBCODistributionDirectory.class); JPService.registerProperty(JPAuthenticationScope.class); JPService.registerProperty(JPResetCredentials.class); JPService.registerProperty(JPCredentialsDirectory.class); @@ -54,8 +50,8 @@ protected void loadProperties() { /** * @param args the command line arguments - * @throws java.lang.InterruptedException - * @throws org.openbase.jul.exception.CouldNotPerformException + * @throws java.lang.InterruptedException is thrown when the thread was externally interrupted. + * @throws org.openbase.jul.exception.CouldNotPerformException thrown in case the launcher could not be started. */ public static void main(final String[] args) throws InterruptedException, CouldNotPerformException { BCO.printLogo(); diff --git a/module/authentication/lib/src/main/java/org/openbase/bco/authentication/lib/AbstractProtectedStore.java b/module/authentication/lib/src/main/java/org/openbase/bco/authentication/lib/AbstractProtectedStore.java index 9ed84ed3b0..05e20f8ab1 100644 --- a/module/authentication/lib/src/main/java/org/openbase/bco/authentication/lib/AbstractProtectedStore.java +++ b/module/authentication/lib/src/main/java/org/openbase/bco/authentication/lib/AbstractProtectedStore.java @@ -166,7 +166,7 @@ public DT getEntry(final String id) throws NotAvailableException { return map.get(id); } - throw new NotAvailableException("Entry with key[" + id + "]"); + throw new NotAvailableException("Entry with key[" + id + "]."); } /** diff --git a/module/authentication/lib/src/main/java/org/openbase/bco/authentication/lib/CredentialStore.java b/module/authentication/lib/src/main/java/org/openbase/bco/authentication/lib/CredentialStore.java index 5c08f0af4d..cf2740d2b0 100644 --- a/module/authentication/lib/src/main/java/org/openbase/bco/authentication/lib/CredentialStore.java +++ b/module/authentication/lib/src/main/java/org/openbase/bco/authentication/lib/CredentialStore.java @@ -10,12 +10,12 @@ * it under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * + * * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * . @@ -24,6 +24,8 @@ import com.google.protobuf.ByteString; import com.google.protobuf.Message; +import org.openbase.bco.authentication.lib.jp.JPResetCredentials; +import org.openbase.jps.core.JPService; import org.openbase.jul.exception.CouldNotPerformException; import org.openbase.jul.exception.CouldNotTransformException; import org.openbase.jul.exception.NotAvailableException; @@ -63,7 +65,13 @@ public CredentialStore() { * @throws NotAvailableException if not credentials for the user are saved in the store. */ public LoginCredentials getCredentials(final String userId) throws NotAvailableException { - return getEntry(userId); + try { + return getEntry(userId); + } catch (NotAvailableException ex) { + throw new NotAvailableException("User", userId, "No credentials for user with Id[" + userId + "] found in credential store. " + + "This can be caused by a broken credential store. In this case try to reset the store by calling: " + + JPService.getApplicationName() + " " + JPResetCredentials.COMMAND_IDENTIFIERS[0]); + } } /** diff --git a/module/authentication/lib/src/main/java/org/openbase/bco/authentication/lib/jp/JPBCODistributionDirectory.kt b/module/authentication/lib/src/main/java/org/openbase/bco/authentication/lib/jp/JPBCODistributionDirectory.kt new file mode 100644 index 0000000000..53b39bdeb4 --- /dev/null +++ b/module/authentication/lib/src/main/java/org/openbase/bco/authentication/lib/jp/JPBCODistributionDirectory.kt @@ -0,0 +1,36 @@ +package org.openbase.bco.authentication.lib.jp + +import org.openbase.jps.core.JPService +import org.openbase.jps.exception.JPNotAvailableException +import org.openbase.jps.preset.AbstractJPDirectory +import org.openbase.jps.preset.JPSystemDirectory +import org.openbase.jps.preset.JPTmpDirectory +import org.openbase.jps.tools.FileHandler.AutoMode.Off +import org.openbase.jps.tools.FileHandler.ExistenceHandling.Must +import java.io.File + +class JPBCODistributionDirectory: AbstractJPDirectory( + arrayOf("--dist", "--distribution"), + Must, + Off +) { + init { + registerDependingProperty(JPSystemDirectory::class.java) + } + + @Throws(JPNotAvailableException::class) + override fun getPropertyDefaultValue(): File? { + if (JPService.testMode()) { + return JPService.getProperty(JPTmpDirectory::class.java).value + } + + return System.getenv("BCO_DIST") + // load prefix via system variable + ?.let { File(it) } + // use global usr folder as prefix + ?: JPService.getProperty(JPSystemDirectory::class.java).value + } + + override fun getDescription() = + "Set the application prefix, which is used for accessing binaries, shared data and templates." +} diff --git a/module/authentication/lib/src/main/java/org/openbase/bco/authentication/lib/jp/JPBCOShareDirectory.java b/module/authentication/lib/src/main/java/org/openbase/bco/authentication/lib/jp/JPBCOShareDirectory.java index c58941ea02..3b42c17b67 100644 --- a/module/authentication/lib/src/main/java/org/openbase/bco/authentication/lib/jp/JPBCOShareDirectory.java +++ b/module/authentication/lib/src/main/java/org/openbase/bco/authentication/lib/jp/JPBCOShareDirectory.java @@ -26,7 +26,6 @@ import org.openbase.jps.exception.JPServiceException; import org.openbase.jps.exception.JPValidationException; import org.openbase.jps.preset.AbstractJPDirectory; -import org.openbase.jps.preset.JPPrefix; import org.openbase.jps.tools.FileHandler; import java.io.File; @@ -47,13 +46,13 @@ public class JPBCOShareDirectory extends AbstractJPDirectory { */ public JPBCOShareDirectory() { super(COMMAND_IDENTIFIERS, EXISTENCE_HANDLING, AUTO_MODE); - registerDependingProperty(JPPrefix.class); + registerDependingProperty(JPBCODistributionDirectory.class); } @Override public File getParentDirectory() throws JPServiceException { // declare default parent - return JPService.getProperty(JPPrefix.class).getValue(); + return JPService.getProperty(JPBCODistributionDirectory.class).getValue(); } @Override diff --git a/module/authentication/test/build.gradle.kts b/module/authentication/test/build.gradle.kts index adc1942dd5..2890b2a6c0 100644 --- a/module/authentication/test/build.gradle.kts +++ b/module/authentication/test/build.gradle.kts @@ -9,7 +9,7 @@ plugins { dependencies { api(project(":bco.authentication.core")) api(project(":bco.authentication.lib")) - api("org.testcontainers:testcontainers:1.16.2") + api("org.testcontainers:testcontainers:_") } description = "BCO Authentication Test" diff --git a/module/dal/control/src/main/java/org/openbase/bco/dal/control/action/ActionImpl.java b/module/dal/control/src/main/java/org/openbase/bco/dal/control/action/ActionImpl.java index 0059abd5d0..869149c1a3 100644 --- a/module/dal/control/src/main/java/org/openbase/bco/dal/control/action/ActionImpl.java +++ b/module/dal/control/src/main/java/org/openbase/bco/dal/control/action/ActionImpl.java @@ -501,7 +501,7 @@ public Future cancel() { try { unit.reschedule(); } catch (CouldNotPerformException ex) { - // if the reschedule is not possible because of an system shutdown everything is fine, otherwise its a controller error and there is no need to inform the remote about any error if the cancellation was successful. + // if the reschedule is not possible because of a system shutdown everything is fine, otherwise its a controller error and there is no need to inform the remote about any error if the cancellation was successful. if (!ExceptionProcessor.isCausedBySystemShutdown(ex)) { ExceptionPrinter.printHistory("Reschedule of " + unit + " failed after action cancellation!", ex, LOGGER); } diff --git a/module/dal/control/src/main/java/org/openbase/bco/dal/control/layer/unit/device/DeviceManagerLauncher.java b/module/dal/control/src/main/java/org/openbase/bco/dal/control/layer/unit/device/DeviceManagerLauncher.java index c19d82dc64..9199edf4e7 100644 --- a/module/dal/control/src/main/java/org/openbase/bco/dal/control/layer/unit/device/DeviceManagerLauncher.java +++ b/module/dal/control/src/main/java/org/openbase/bco/dal/control/layer/unit/device/DeviceManagerLauncher.java @@ -21,6 +21,7 @@ * . * #L% */ +import org.openbase.bco.authentication.lib.jp.JPBCODistributionDirectory; import org.openbase.bco.dal.lib.jp.JPBenchmarkMode; import org.openbase.bco.dal.lib.jp.JPHardwareSimulationMode; import org.openbase.bco.dal.lib.jp.JPProviderControlMode; @@ -28,7 +29,6 @@ import org.openbase.bco.authentication.lib.BCO; import org.openbase.jul.pattern.launch.AbstractLauncher; import org.openbase.jps.core.JPService; -import org.openbase.jps.preset.JPPrefix; /** * @@ -42,7 +42,7 @@ public DeviceManagerLauncher() throws org.openbase.jul.exception.InstantiationEx @Override public void loadProperties() { - JPService.registerProperty(JPPrefix.class); + JPService.registerProperty(JPBCODistributionDirectory.class); JPService.registerProperty(JPHardwareSimulationMode.class); JPService.registerProperty(JPBenchmarkMode.class); JPService.registerProperty(JPProviderControlMode.class); diff --git a/module/dal/control/src/main/java/org/openbase/bco/dal/control/layer/unit/device/FallbackDeviceManagerLauncher.java b/module/dal/control/src/main/java/org/openbase/bco/dal/control/layer/unit/device/FallbackDeviceManagerLauncher.java index 28e059bb8a..528ea13797 100644 --- a/module/dal/control/src/main/java/org/openbase/bco/dal/control/layer/unit/device/FallbackDeviceManagerLauncher.java +++ b/module/dal/control/src/main/java/org/openbase/bco/dal/control/layer/unit/device/FallbackDeviceManagerLauncher.java @@ -22,12 +22,12 @@ * #L% */ +import org.openbase.bco.authentication.lib.jp.JPBCODistributionDirectory; import org.openbase.bco.dal.lib.layer.unit.device.DeviceManager; import org.openbase.bco.registry.clazz.lib.jp.JPClassRegistryScope; import org.openbase.bco.authentication.lib.BCO; import org.openbase.bco.registry.unit.lib.jp.JPUnitRegistryScope; import org.openbase.jps.core.JPService; -import org.openbase.jps.preset.JPPrefix; import org.openbase.jul.pattern.launch.AbstractLauncher; /** @@ -42,7 +42,7 @@ public FallbackDeviceManagerLauncher() throws org.openbase.jul.exception.Instant @Override public void loadProperties() { - JPService.registerProperty(JPPrefix.class); + JPService.registerProperty(JPBCODistributionDirectory.class); JPService.registerProperty(JPUnitRegistryScope.class); JPService.registerProperty(JPClassRegistryScope.class); } diff --git a/module/dal/test/src/test/java/org/openbase/bco/dal/test/layer/unit/AbstractUnitControllerTest.java b/module/dal/test/src/test/java/org/openbase/bco/dal/test/layer/unit/AbstractUnitControllerTest.java index 53f2bdcb1f..c624dc1fc2 100644 --- a/module/dal/test/src/test/java/org/openbase/bco/dal/test/layer/unit/AbstractUnitControllerTest.java +++ b/module/dal/test/src/test/java/org/openbase/bco/dal/test/layer/unit/AbstractUnitControllerTest.java @@ -110,7 +110,7 @@ public void tearDown() throws CouldNotPerformException, InterruptedException, Ti colorableLightController.cancelAllActions(); } - @Test + @Test(timeout = 30000) public void applyDataStateUpdateTest() { try { colorableLightController.applyServiceState(States.Power.ON, ServiceType.POWER_STATE_SERVICE); @@ -137,7 +137,7 @@ public void applyDataStateUpdateTest() { } } - @Test + @Test(timeout = 30000) public void applyCustomDataStateUpdateTest() { try { for (int i = 0; i < 10; i++) { @@ -173,7 +173,7 @@ public void applyCustomDataStateUpdateTest() { } } - @Test + @Test(timeout = 30000) public void applyCustomDataStateFeedbackLoopTest() { try { colorableLightController.applyServiceState(Power.OFF, ServiceType.POWER_STATE_SERVICE); @@ -217,7 +217,7 @@ public void applyCustomDataStateFeedbackLoopTest() { } } - @Test + @Test(timeout = 30000) public void rejectUpdateWhenStateIsCompatibleTest() { try { final RemoteAction mainAction = waitForExecution(colorableLightRemote.setColorState(Color.BLUE)); @@ -265,7 +265,7 @@ public void rejectUpdateWhenStateIsCompatibleTest() { } } - @Test + @Test(timeout = 30000) public void futureSyncTest() throws InterruptedException, ExecutionException, TimeoutException, CouldNotPerformException { String anotherColorableLightId = null; diff --git a/module/device/openhab/build.gradle.kts b/module/device/openhab/build.gradle.kts index c7962668f7..1b9d8ab06f 100644 --- a/module/device/openhab/build.gradle.kts +++ b/module/device/openhab/build.gradle.kts @@ -11,7 +11,6 @@ repositories { maven { url = uri("https://openhab.jfrog.io/openhab/libs-release") } - jcenter() } application { @@ -20,11 +19,11 @@ application { dependencies { api(project(":bco.dal.control")) - api("org.glassfish.jersey.core:jersey-client:2.31") - api("org.glassfish.jersey.inject:jersey-hk2:2.31") - api("org.glassfish.jersey.media:jersey-media-sse:2.31") - api("org.glassfish.jersey.security:oauth2-client:2.31") - api("org.openhab.core.bundles:org.openhab.core.io.rest.core:3.1.0") + api("org.glassfish.jersey.core:jersey-client:_") + api("org.glassfish.jersey.inject:jersey-hk2:_") + api("org.glassfish.jersey.media:jersey-media-sse:_") + api("org.glassfish.jersey.security:oauth2-client:_") + api("org.openhab.core.bundles:org.openhab.core.io.rest.core:_") } description = "BCO Openhab Device Manager" diff --git a/module/device/openhab/src/main/java/org/openbase/bco/device/openhab/sitemap/OpenHABSitemapSynchronizerLauncher.java b/module/device/openhab/src/main/java/org/openbase/bco/device/openhab/sitemap/OpenHABSitemapSynchronizerLauncher.java index e211641668..efe7d43ebc 100644 --- a/module/device/openhab/src/main/java/org/openbase/bco/device/openhab/sitemap/OpenHABSitemapSynchronizerLauncher.java +++ b/module/device/openhab/src/main/java/org/openbase/bco/device/openhab/sitemap/OpenHABSitemapSynchronizerLauncher.java @@ -23,10 +23,10 @@ * #L% */ +import org.openbase.bco.authentication.lib.jp.JPBCODistributionDirectory; import org.openbase.bco.device.openhab.jp.JPOpenHABSitemap; import org.openbase.bco.authentication.lib.BCO; import org.openbase.jps.core.JPService; -import org.openbase.jps.preset.JPPrefix; import org.openbase.jul.exception.CouldNotPerformException; import org.openbase.jul.pattern.launch.AbstractLauncher; @@ -41,7 +41,7 @@ public OpenHABSitemapSynchronizerLauncher() throws org.openbase.jul.exception.In @Override protected void loadProperties() { - JPService.registerProperty(JPPrefix.class); + JPService.registerProperty(JPBCODistributionDirectory.class); JPService.registerProperty(JPOpenHABSitemap.class); } diff --git a/module/registry/unit-registry/lib/build.gradle.kts b/module/registry/unit-registry/lib/build.gradle.kts index 0cb76c3cb0..ab9f1d55ba 100644 --- a/module/registry/unit-registry/lib/build.gradle.kts +++ b/module/registry/unit-registry/lib/build.gradle.kts @@ -13,7 +13,7 @@ dependencies { api(project(":bco.registry.class.remote")) api(project(":bco.registry.template.remote")) api(project(":bco.registry.activity.remote")) - api("org.apache.commons:commons-math3:3.6.1") + api("org.apache.commons:commons-math3:_") } description = "BCO Registry Unit Library" diff --git a/settings.gradle.kts b/settings.gradle.kts index 50b4a09f4f..0d74c7e435 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -112,7 +112,8 @@ project(":bco.device.openhab").projectDir = file("module/device/openhab") pluginManagement { plugins { - id("de.fayard.refreshVersions") version "0.23.0" + id("de.fayard.refreshVersions") version "0.40.0" +//// # available:"0.40.1" } } diff --git a/versions.properties b/versions.properties index 1acd35f298..d2777607ce 100644 --- a/versions.properties +++ b/versions.properties @@ -1,5 +1,5 @@ #### Dependencies and Plugin versions with their available updates. -#### Generated by `./gradlew refreshVersions` version 0.23.0 +#### Generated by `./gradlew refreshVersions` version 0.40.0 #### #### Don't manually edit or split the comments that start with four hashtags (####), #### they will be overwritten by refreshVersions. @@ -7,48 +7,203 @@ #### suppress inspection "SpellCheckingInspection" for whole file #### suppress inspection "UnusedProperty" for whole file -version.com.graphql-java..graphql-java-extended-scalars=17.0 -## # available=2018-10-05T23-44-12-5312ccd -## # available=2019-08-31T02-34-04-3decba9 -## # available=2021-03-30T00-21-22-0d32e2f-SNAPSHOT -## # available=2021-03-30T00-26-04-4e02150 -## # available=2021-03-30T02-07-32-573beab -## # available=2021-03-30T02-55-48-f03414a -## # available=2021-03-31T04-38-21-f03414a -## # available=2021-03-29T23-28-56-0d32e2f-SNAPSHOT -## # available=2021-04-09T04-01-28-f4f9cb9 -## # available=2021-06-29T01-19-32-8e19827 -## # available=2021-07-20T10-05-45-ac72af3 -## # available=2021-08-03T09-10-50-aff4d46 -## # available=2021-08-15T23-45-48-a9f6ec6 -## # available=2021-10-11T21-35-35-49138ff +version.com.graphql-java-kickstart..graphql-spring-boot-starter=12.0.1-SNAPSHOT + +## unused +version.junit.jupiter=[5.6,5.7-alpha) + +## unused +version.org.junit.vintage..junit-vintage-engine=[5.6,5.7-alpha) + +version.org.jmdns..jmdns=3.5.7 + +version.org.glassfish.jersey.security..oauth2-client=2.31 +## # available=2.32 +## # available=2.33 +## # available=2.34 +## # available=2.35 +## # available=3.0.0-M1 +## # available=3.0.0-M6 +## # available=3.0.0-RC2 +## # available=3.0.0 +## # available=3.0.1 +## # available=3.0.2 +## # available=3.0.3 + +version.org.glassfish.jersey.media..jersey-media-sse=2.31 +## # available=2.32 +## # available=2.33 +## # available=2.34 +## # available=2.35 +## # available=3.0.0-M1 +## # available=3.0.0-M6 +## # available=3.0.0-RC2 +## # available=3.0.0 +## # available=3.0.1 +## # available=3.0.2 +## # available=3.0.3 + +version.org.glassfish.jersey.inject..jersey-hk2=2.31 +## # available=2.32 +## # available=2.33 +## # available=2.34 +## # available=2.35 +## # available=3.0.0-M1 +## # available=3.0.0-M6 +## # available=3.0.0-RC2 +## # available=3.0.0 +## # available=3.0.1 +## # available=3.0.2 +## # available=3.0.3 + +version.org.glassfish.jersey.core..jersey-client=2.31 +## # available=2.32 +## # available=2.33 +## # available=2.34 +## # available=2.35 +## # available=3.0.0-M1 +## # available=3.0.0-M6 +## # available=3.0.0-RC2 +## # available=3.0.0 +## # available=3.0.1 +## # available=3.0.2 +## # available=3.0.3 + +version.org.apache.commons..commons-math3=3.6.1 + +version.net.javacrumbs.future-converter..future-converter-java8-guava=1.2.0 + +version.io.socket..socket.io-client=1.0.0 +## # available=1.0.1 +## # available=2.0.0 +## # available=2.0.1 + +version.io.reactivex.rxjava2..rxjava=2.2.21 + +version.commons-collections..commons-collections=3.2.2 +## # available=20030418.083655 +## # available=20031027.000000 +## # available=20040102.233541 +## # available=20040616 + +## unused +version.com.influxdb..influxdb-client-java=[1.0,1.1-alpha) + +version.com.google.inject.extensions..guice-multibindings=4.2.3 + +version.com.google.inject..guice=5.0.1 +## # available=5.0.2-SNAPSHOT +## # available=5.1.0 +## # available=5.1.1-SNAPSHOT + +version.com.google.guava..guava=28.0-jre +## # available=28.1-android +## # available=28.1-jre +## # available=28.2-android +## # available=28.2-jre +## # available=29.0-android +## # available=29.0-jre +## # available=30.0-android +## # available=30.0-jre +## # available=30.1-android +## # available=30.1-jre +## # available=30.1.1-android +## # available=30.1.1-jre +## # available=31.0-android +## # available=31.0-jre +## # available=31.0.1-android +## # available=31.0.1-jre + +version.org.testcontainers..testcontainers=1.16.3 + +version.org.springframework.boot..spring-boot-starter-webflux=2.6.3 + +version.org.springframework.boot..spring-boot-starter-jetty=2.6.3 + +version.org.springframework..spring-webmvc=5.3.15 + +version.org.openhab.core.bundles..org.openhab.core.io.rest.core=3.1.0 +## # available=3.1.1 +## # available=3.2.0 + +plugin.org.springframework.boot=2.6.2 +## # available=2.6.3 + +plugin.io.spring.dependency-management=1.0.11.RELEASE + +version.kotlin=1.6.10 +## # available=1.6.20-M1 +## # available=1.6.255-SNAPSHOT +## # available=1.7.255-SNAPSHOT version.org.openbase..jul.communication.controller=3.0-SNAPSHOT +## # available=3.0.0 +## # available=3.0.1 +## # available=3.0.2 version.org.openbase..jul.communication.mqtt=3.0-SNAPSHOT +## # available=3.0.0 +## # available=3.0.1 +## # available=3.0.2 version.org.openbase..jul.exception=3.0-SNAPSHOT +## # available=3.0.0 +## # available=3.0.1 +## # available=3.0.2 version.org.openbase..jul.extension.protobuf=3.0-SNAPSHOT +## # available=3.0.0 +## # available=3.0.1 +## # available=3.0.2 version.org.openbase..jul.extension.type.processing=3.0-SNAPSHOT +## # available=3.0.0 +## # available=3.0.1 +## # available=3.0.2 version.org.openbase..jul.extension.type.storage=3.0-SNAPSHOT +## # available=3.0.0 +## # available=3.0.1 +## # available=3.0.2 version.org.openbase..jul.extension.type.transform=3.0-SNAPSHOT +## # available=3.0.0 +## # available=3.0.1 +## # available=3.0.2 version.org.openbase..jul.extension.type.util=3.0-SNAPSHOT +## # available=3.0.0 +## # available=3.0.1 +## # available=3.0.2 version.org.openbase..jul.pattern.launch=3.0-SNAPSHOT +## # available=3.0.0 +## # available=3.0.1 +## # available=3.0.2 version.org.openbase..jul.pattern.trigger=3.0-SNAPSHOT +## # available=3.0.0 +## # available=3.0.1 +## # available=3.0.2 version.org.openbase..jul.processing=3.0-SNAPSHOT +## # available=3.0.0 +## # available=3.0.1 +## # available=3.0.2 version.org.openbase..jul.storage=3.0-SNAPSHOT +## # available=3.0.0 +## # available=3.0.1 +## # available=3.0.2 version.org.openbase..jul.visual.javafx=3.0-SNAPSHOT +## # available=3.0.0 +## # available=3.0.1 +## # available=3.0.2 version.org.openbase..jul.visual.swing=3.0-SNAPSHOT +## # available=3.0.0 +## # available=3.0.1 +## # available=3.0.2 -version.org.openbase..rct=3.0-SNAPSHOT +version.org.openbase..rct=3.0.0