Skip to content

Commit

Permalink
Merge branch 'main' into op-fork/jakarta-contribution
Browse files Browse the repository at this point in the history
# Conflicts:
#	basyx.aasenvironment/basyx.aasenvironment.component/Dockerfile
#	basyx.aasrepository/basyx.aasrepository.component/Dockerfile
#	basyx.conceptdescriptionrepository/basyx.conceptdescriptionrepository.component/Dockerfile
#	basyx.submodelrepository/basyx.submodelrepository.component/Dockerfile
  • Loading branch information
alexgordtop committed Nov 21, 2023
2 parents a235e81 + c6a8f06 commit 5fcab9c
Show file tree
Hide file tree
Showing 23 changed files with 112 additions and 40 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
*
*/
@Configuration
public class DummyConfig {
public class DummyDiscoveryServiceConfig {

private final String COLLECTION = "discoveryServiceHTTPTestCollection";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,7 @@ ARG JAR_FILE=target/*-exec.jar
COPY ${JAR_FILE} basyxExecutable.jar
COPY src/main/resources/application.properties application.properties
ARG PORT=8081
EXPOSE ${PORT}
ENV SERVER_PORT=${PORT}
EXPOSE ${SERVER_PORT}
HEALTHCHECK --interval=30s --timeout=3s --retries=3 --start-period=15s CMD curl --fail http://localhost:${SERVER_PORT}/actuator/health || exit 1
ENTRYPOINT ["java","-jar","basyxExecutable.jar"]
33 changes: 31 additions & 2 deletions basyx.aasenvironment/basyx.aasenvironment.component/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,42 @@
</properties>

<dependencies>

<dependency>
<groupId>org.eclipse.digitaltwin.basyx</groupId>
<artifactId>basyx.aasrepository.component</artifactId>
<classifier>tests</classifier>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.eclipse.digitaltwin.basyx</groupId>
<artifactId>basyx.aasrepository-tck</artifactId>
<classifier>tests</classifier>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.eclipse.digitaltwin.basyx</groupId>
<artifactId>basyx.submodelrepository.component</artifactId>
<classifier>tests</classifier>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.eclipse.digitaltwin.basyx</groupId>
<artifactId>basyx.submodelrepository-tck</artifactId>
<classifier>tests</classifier>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.eclipse.digitaltwin.basyx</groupId>
<artifactId>basyx.conceptdescriptionrepository-tck</artifactId>
<classifier>tests</classifier>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.eclipse.digitaltwin.basyx</groupId>
<artifactId>basyx.conceptdescriptionrepository.component</artifactId>
<classifier>tests</classifier>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.eclipse.digitaltwin.basyx</groupId>
Expand All @@ -40,12 +65,12 @@
<groupId>org.eclipse.digitaltwin.basyx</groupId>
<artifactId>basyx.http</artifactId>
</dependency>
<dependency>
<dependency>
<groupId>org.eclipse.digitaltwin.basyx</groupId>
<artifactId>basyx.submodelservice-core</artifactId>
<classifier>tests</classifier>
<scope>test</scope>
</dependency>
</dependency>
<dependency>
<groupId>org.eclipse.digitaltwin.basyx</groupId>
<artifactId>basyx.http</artifactId>
Expand Down Expand Up @@ -158,6 +183,10 @@
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
</plugin>
</plugins>
</build>
</profile>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
/*******************************************************************************
* Copyright (C) 2023 the Eclipse BaSyx Authors
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
* SPDX-License-Identifier: MIT
******************************************************************************/

package org.eclipse.digitaltwin.basyx.aasenvironment.component;

import org.eclipse.digitaltwin.basyx.aasrepository.component.AASRepositoryIT;
import org.eclipse.digitaltwin.basyx.conceptdescriptionrepository.component.ConceptDescriptionRepositoryIT;
import org.eclipse.digitaltwin.basyx.submodelrepository.component.SubmodelRepositoryIT;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;

/**
* Integration test using the Integration tests from AASRepository,
* SubmodelRepository and ConceptDescriptionRepository over the test suite
*
* @author witt
*
*/

@RunWith(Suite.class)
@Suite.SuiteClasses({ AASRepositoryIT.class, SubmodelRepositoryIT.class, ConceptDescriptionRepositoryIT.class, })
public class AASEnvironmentIT {

}
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
* SPDX-License-Identifier: MIT
******************************************************************************/

package basyx.aasenvironment.component;
package org.eclipse.digitaltwin.basyx.aasenvironment.component;

import static org.junit.Assert.assertNotNull;

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
*
*/
@Configuration
public class DummyConfig {
public class DummyAasRepositoryConfig {

@Bean
@ConditionalOnMissingBean
Expand Down
5 changes: 0 additions & 5 deletions basyx.aasrepository/basyx.aasrepository-tck/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,29 +12,24 @@
<dependency>
<groupId>org.eclipse.digitaltwin.basyx</groupId>
<artifactId>basyx.aasrepository-http</artifactId>
<scope>test</scope>
<classifier>tests</classifier>
</dependency>
<dependency>
<groupId>org.eclipse.digitaltwin.basyx</groupId>
<artifactId>basyx.http</artifactId>
<scope>test</scope>
<classifier>tests</classifier>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents.client5</groupId>
<artifactId>httpclient5</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
</project>
3 changes: 2 additions & 1 deletion basyx.aasrepository/basyx.aasrepository.component/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@ COPY ${JAR_FILE} basyxExecutable.jar
COPY src/main/resources/application.properties application.properties
ARG PORT=8081
ENV SERVER_PORT=${PORT}
EXPOSE ${PORT}
EXPOSE ${SERVER_PORT}
HEALTHCHECK --interval=30s --timeout=3s --retries=3 --start-period=15s CMD curl --fail http://localhost:${SERVER_PORT}/actuator/health || exit 1
ENTRYPOINT ["java","-jar","basyxExecutable.jar"]
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
import org.eclipse.digitaltwin.basyx.aasservice.AasServiceFactory;
import org.eclipse.digitaltwin.basyx.aasservice.feature.AasServiceFeature;
import org.eclipse.digitaltwin.basyx.aasservice.feature.DecoratedAasServiceFactory;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary;
Expand All @@ -49,6 +50,7 @@
@Configuration
public class AasRepositoryConfiguration {
@Bean
@ConditionalOnMissingBean
public static AasRepository getAasRepository(AasRepositoryFactory aasRepositoryFactory, List<AasRepositoryFeature> features) {
return new DecoratedAasRepositoryFactory(aasRepositoryFactory, features).create();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@
*
*/
public class AASRepositoryIT extends AasRepositoryTestDefinedURL {

}
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,8 @@ WORKDIR /application
ARG JAR_FILE=target/*-exec.jar
COPY ${JAR_FILE} basyxExecutable.jar
COPY src/main/resources/application.properties application.properties
ARG PORT=8081
ENV PORT=${PORT}
EXPOSE ${PORT}
HEALTHCHECK --interval=30s --timeout=3s --retries=3 --start-period=15s CMD curl --fail http://localhost:${PORT}/actuator/health || exit 1
ENTRYPOINT ["java","-jar","basyxExecutable.jar"]
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ basyx.backend = InMemory
#spring.data.mongodb.uri=mongodb://mongoAdmin:mongoPassword@localhost:27017/?authMechanism=DEFAULT

# Base Path for Spring Boot Actuator
management.endpoints.web.base-path=/
# management.endpoints.web.base-path=/

####################################################################################
# Cross-Site Resource Sharing (CORS);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@
*
*/
@Configuration
public class DummyConfig {
public class DummyConceptDescriptionRepositoryConfig {

@Bean
@ConditionalOnMissingBean
public ConceptDescriptionRepository createConceptDescriptionRepository() {
return new InMemoryConceptDescriptionRepository();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,35 +11,29 @@
<dependency>
<groupId>org.eclipse.digitaltwin.basyx</groupId>
<artifactId>basyx.conceptdescriptionrepository-http</artifactId>
<scope>test</scope>
<classifier>tests</classifier>
</dependency>
<dependency>
<groupId>org.eclipse.digitaltwin.basyx</groupId>
<artifactId>basyx.conceptdescriptionrepository-core</artifactId>
<scope>test</scope>
<classifier>tests</classifier>
</dependency>
<dependency>
<groupId>org.eclipse.digitaltwin.basyx</groupId>
<artifactId>basyx.http</artifactId>
<scope>test</scope>
<classifier>tests</classifier>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents.client5</groupId>
<artifactId>httpclient5</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ COPY src/main/resources/application.properties application.properties
ARG PORT=8081
ENV SERVER_PORT=${PORT}
EXPOSE ${PORT}
HEALTHCHECK --interval=30s --timeout=3s --retries=3 --start-period=30s CMD curl --fail http://localhost:${SERVER_PORT}/actuator/health || exit 1
ENTRYPOINT ["java","-jar","basyxExecutable.jar"]
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,14 @@
import org.eclipse.digitaltwin.basyx.conceptdescriptionrepository.ConceptDescriptionRepositoryFactory;
import org.eclipse.digitaltwin.basyx.conceptdescriptionrepository.feature.ConceptDescriptionRepositoryFeature;
import org.eclipse.digitaltwin.basyx.conceptdescriptionrepository.feature.DecoratedConceptDescriptionRepositoryFactory;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
* Provides the spring bean configuration for the {@link ConceptDescriptionRepository}
* utilizing all found features for the respective services
* Provides the spring bean configuration for the
* {@link ConceptDescriptionRepository} utilizing all found features for the
* respective services
*
* @author danish
*
Expand All @@ -45,8 +47,9 @@
public class ConceptDescriptionRepositoryConfiguration {

@Bean
@ConditionalOnMissingBean
public static ConceptDescriptionRepository getConceptDescriptionRepository(ConceptDescriptionRepositoryFactory aasRepositoryFactory, List<ConceptDescriptionRepositoryFeature> features) {
return new DecoratedConceptDescriptionRepositoryFactory(aasRepositoryFactory, features).create();
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@
*
*/
@Configuration
public class DummyConfig {
public class DummySubmodelRepositoryConfig {

@Bean
@ConditionalOnMissingBean
public SubmodelRepository createSubmodelRepository() {
return new InMemorySubmodelRepository(new InMemorySubmodelServiceFactory());
}
}
}
7 changes: 0 additions & 7 deletions basyx.submodelrepository/basyx.submodelrepository-tck/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,39 +12,32 @@
<groupId>org.eclipse.digitaltwin.basyx</groupId>
<artifactId>basyx.submodelservice-http</artifactId>
<classifier>tests</classifier>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.eclipse.digitaltwin.basyx</groupId>
<artifactId>basyx.submodelrepository-http</artifactId>
<classifier>tests</classifier>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.eclipse.digitaltwin.basyx</groupId>
<artifactId>basyx.http</artifactId>
<classifier>tests</classifier>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents.client5</groupId>
<artifactId>httpclient5</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.eclipse.digitaltwin.basyx</groupId>
<artifactId>basyx.submodelservice-http</artifactId>
<scope>test</scope>
<classifier>tests</classifier>
</dependency>
</dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@ COPY ${JAR_FILE} basyxExecutable.jar
COPY src/main/resources/application.properties application.properties
ARG PORT=8081
ENV SERVER_PORT=${PORT}
EXPOSE ${PORT}
EXPOSE ${SERVER_PORT}
HEALTHCHECK --interval=30s --timeout=3s --retries=3 --start-period=15s CMD curl --fail http://localhost:${PORT}/actuator/health || exit 1
ENTRYPOINT ["java","-jar","basyxExecutable.jar"]
Loading

0 comments on commit 5fcab9c

Please sign in to comment.