Skip to content

Commit

Permalink
analyses the dependencies, removes unused, adds used undeclared,and s…
Browse files Browse the repository at this point in the history
…cope

Signed-off-by: PatriceKammognie <[email protected]>
  • Loading branch information
PatriceKammognie committed Sep 19, 2023
2 parents aa382de + 6b60bfe commit 579e4a2
Show file tree
Hide file tree
Showing 18 changed files with 318 additions and 69 deletions.
6 changes: 3 additions & 3 deletions basyx.aasenvironment/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ The Aggregated Swagger UI for the endpoint is available at:
http://{host}:{port}/swagger-ui/index.html

For a configuration example, see [application.properties](./basyx.aasenvironment.component/src/main/resources/application.properties)
The Health Endpoint an
d CORS Documentation can be found [here](../docs/Readme.md).
The Health Endpoint and CORS Documentation can be found [here](../docs/Readme.md).

Right now, no additional input parameters modifying the output (e.g., cursor, serializationModifier) are supported.
## Preconfiguration of AAS Environments
The AAS Environment Component supports the preconfiguration of AAS Environments (e.g., XML, JSON, AASX) via the _basyx.environment_ parameter. For examples, see [application.properties](./basyx.aasenvironment.component/src/main/resources/application.properties)
97 changes: 60 additions & 37 deletions basyx.aasenvironment/basyx.aasenvironment-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
<version>${revision}</version>
</parent>

<artifactId>basyx.aasenvironment-core</artifactId>
<artifactId>
basyx.aasenvironment-core</artifactId>

<dependencies>
<dependency>
Expand All @@ -20,7 +21,7 @@
<groupId>org.eclipse.digitaltwin.basyx</groupId>
<artifactId>basyx.submodelrepository-backend-inmemory</artifactId>
<scope>test</scope>
</dependency>
</dependency>
<dependency>
<groupId>org.eclipse.digitaltwin.basyx</groupId>
<artifactId>basyx.submodelservice-core</artifactId>
Expand Down Expand Up @@ -58,7 +59,7 @@
<dependency>
<groupId>org.eclipse.digitaltwin.basyx</groupId>
<artifactId>basyx.conceptdescriptionrepository-core</artifactId>
</dependency>
</dependency>
<dependency>
<groupId>org.eclipse.digitaltwin.aas4j</groupId>
<artifactId>dataformat-json</artifactId>
Expand All @@ -78,37 +79,59 @@
<dependency>
<groupId>org.eclipse.digitaltwin.aas4j</groupId>
<artifactId>model</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>30.1.1-jre</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>4.1.2</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
</dependency>
<dependency>
<groupId>jakarta.validation</groupId>
<artifactId>jakarta.validation-api</artifactId>
</dependency>
</dependencies>
</project>
</dependency>
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>30.1.1-jre</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>4.1.2</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
</dependency>
<dependency>
<groupId>jakarta.validation</groupId>
<artifactId>jakarta.validation-api</artifactId>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<configuration>
<usedDependencies>
<dependency>junit:junit</dependency>
</usedDependencies>
</configuration>
</plugin>
</plugins>
</build>
>>>>>>> upstream/main </project>
5 changes: 5 additions & 0 deletions basyx.aasrepository/basyx.aasrepository.component/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,11 @@
<groupId>org.eclipse.digitaltwin.basyx</groupId>
<artifactId>basyx.aasservice-core</artifactId>
</dependency>
<dependency>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-autoconfigure</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@
http://localhost:${docker.host.port}/concept-descriptions</docker.container.waitForEndpoint>
</properties>

<dependencies>

<dependencies>
<dependency>
<groupId>org.eclipse.digitaltwin.basyx</groupId>
<artifactId>basyx.conceptdescriptionrepository-core</artifactId>
Expand All @@ -28,7 +27,43 @@
<groupId>org.eclipse.digitaltwin.basyx</groupId>
<artifactId>basyx.conceptdescriptionrepository-backend-inmemory</artifactId>
</dependency>

<dependency>
<groupId>org.eclipse.digitaltwin.basyx</groupId>
<artifactId>basyx.conceptdescriptionrepository-backend-mongodb</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.digitaltwin.basyx</groupId>
<artifactId>basyx.conceptdescriptionrepository-http</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>

<dependency>
<groupId>org.eclipse.digitaltwin.basyx</groupId>
<artifactId>basyx.conceptdescriptionrepository-core</artifactId>
<classifier>tests</classifier>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.eclipse.digitaltwin.basyx</groupId>
<artifactId>basyx.conceptdescriptionrepository-http</artifactId>
Expand All @@ -40,23 +75,19 @@
<artifactId>basyx.conceptdescriptionrepository-tck</artifactId>
<classifier>tests</classifier>
<scope>test</scope>
</dependency>

</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot</artifactId>
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-autoconfigure</artifactId>
</dependency>

<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
@ConditionalOnExpression("'${basyx.backend}'.equals('MongoDB')")
public class MongoDBSubmodelRepositoryConfiguration {
@Bean
public SubmodelServiceFactory getSubmodelServiceFactory() {
public SubmodelServiceFactory getInMemorySubmodelServiceFactory() {
return new InMemorySubmodelServiceFactory();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,22 +23,24 @@
* SPDX-License-Identifier: MIT
******************************************************************************/


package org.eclipse.digitaltwin.basyx.submodelrepository.http;

import org.eclipse.digitaltwin.basyx.deserialization.SubmodelElementValueJsonDeserializer;
import org.eclipse.digitaltwin.basyx.deserialization.ValueOnlyJsonDeserializer;
import org.eclipse.digitaltwin.basyx.deserialization.SpecificAssetIDValueJsonDeserializer;
import org.eclipse.digitaltwin.basyx.http.SerializationExtension;
import org.eclipse.digitaltwin.basyx.mixins.ReferenceElementValueMixIn;
import org.eclipse.digitaltwin.basyx.serialization.MultiLanguagePropertyValueSerializer;
import org.eclipse.digitaltwin.basyx.serialization.PropertyValueSerializer;
import org.eclipse.digitaltwin.basyx.serialization.SpecificAssetIDValueSerializer;
import org.eclipse.digitaltwin.basyx.serialization.SubmodelElementCollectionValueSerializer;
import org.eclipse.digitaltwin.basyx.serialization.SubmodelElementListValueSerializer;
import org.eclipse.digitaltwin.basyx.serialization.SubmodelValueOnlySerializer;
import org.eclipse.digitaltwin.basyx.serialization.ValueOnlySerializer;
import org.eclipse.digitaltwin.basyx.submodelservice.value.MultiLanguagePropertyValue;
import org.eclipse.digitaltwin.basyx.submodelservice.value.PropertyValue;
import org.eclipse.digitaltwin.basyx.submodelservice.value.ReferenceElementValue;
import org.eclipse.digitaltwin.basyx.submodelservice.value.SpecificAssetIDValue;
import org.eclipse.digitaltwin.basyx.submodelservice.value.SubmodelElementCollectionValue;
import org.eclipse.digitaltwin.basyx.submodelservice.value.SubmodelElementListValue;
import org.eclipse.digitaltwin.basyx.submodelservice.value.SubmodelElementValue;
Expand Down Expand Up @@ -68,6 +70,8 @@ public void extend(Jackson2ObjectMapperBuilder builder) {
builder.serializerByType(SubmodelElementListValue.class, new SubmodelElementListValueSerializer());
builder.mixIn(ReferenceElementValue.class, ReferenceElementValueMixIn.class);
builder.serializerByType(SubmodelValueOnly.class, new SubmodelValueOnlySerializer());
builder.deserializerByType(SpecificAssetIDValue.class, new SpecificAssetIDValueJsonDeserializer());
builder.serializerByType(SpecificAssetIDValue.class, new SpecificAssetIDValueSerializer());
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@

package org.eclipse.digitaltwin.basyx.submodelrepository.tck;

import java.io.FileNotFoundException;
import java.io.IOException;

import org.apache.hc.core5.http.ParseException;
import org.eclipse.digitaltwin.basyx.submodelrepository.http.BaSyxSubmodelHttpTestUtils;
import org.eclipse.digitaltwin.basyx.submodelservice.http.SubmodelServiceSubmodelElementsTestSuiteHTTP;
import org.junit.After;
Expand All @@ -42,16 +46,21 @@ public class SubmodelRepositorySubmodelElementsTestDefinedURL extends SubmodelSe

@Before
public void createSubmodelOnRepo() {
SubmodelTCKHelper.createSubmodelOnRepository(getURL(), createSubmodel());
SubmodelTCKHelper.createSubmodelOnRepository(url, createSubmodel());
}

@After
public void removeSubmodelFromRepo() {
SubmodelTCKHelper.deleteAllSubmodelsOnRepository(getURL());
SubmodelTCKHelper.deleteAllSubmodelsOnRepository(url);
}

@Override
protected String getURL() {
return BaSyxSubmodelHttpTestUtils.getSpecificSubmodelAccessPath(url, createSubmodel().getId());
}

@Override
public void invokeOperation() throws FileNotFoundException, IOException, ParseException {
// Not supported on OTS Components for now
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,43 @@
<groupId>org.eclipse.digitaltwin.basyx</groupId>
<artifactId>basyx.submodelrepository-backend-mongodb</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.digitaltwin.basyx</groupId>
<artifactId>basyx.submodelrepository-feature-mqtt</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.digitaltwin.basyx</groupId>
<artifactId>basyx.submodelrepository-http</artifactId>
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.digitaltwin.basyx</groupId>
<artifactId>basyx.submodelservice-core</artifactId>
<classifier>tests</classifier>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.eclipse.digitaltwin.basyx</groupId>
<artifactId>basyx.submodelrepository-http</artifactId>
Expand Down Expand Up @@ -102,13 +134,17 @@
<artifactId>maven-dependency-plugin</artifactId>
<configuration>
<usedDependencies>
<dependency> org.eclipse.digitaltwin.basyx:basyx.submodelrepository-backend-inmemory</dependency>
<dependency>
org.eclipse.digitaltwin.basyx:basyx.submodelrepository-backend-inmemory</dependency>
<dependency>org.eclipse.digitaltwin.basyx:basyx.http</dependency>
<dependency>org.junit.vintage:junit-vintage-engine</dependency>
<dependency>org.eclipse.digitaltwin.basyx:basyx.submodelrepository-http</dependency>
<dependency>
org.eclipse.digitaltwin.basyx:basyx.submodelrepository-http</dependency>
<dependency>commons-io:commons-io</dependency>
<dependency> org.eclipse.digitaltwin.basyx:basyx.submodelrepository-backend-mongodb</dependency>
<dependency> org.eclipse.digitaltwin.basyx:basyx.submodelservice-backend-inmemory</dependency>
<dependency>
org.eclipse.digitaltwin.basyx:basyx.submodelrepository-backend-mongodb</dependency>
<dependency>
org.eclipse.digitaltwin.basyx:basyx.submodelservice-backend-inmemory</dependency>
</usedDependencies>
</configuration>
</plugin>
Expand Down
1 change: 0 additions & 1 deletion basyx.submodelservice/basyx.submodelservice-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
<groupId>org.eclipse.digitaltwin.aas4j</groupId>
<artifactId>model</artifactId>
</dependency>

<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
Expand Down
Loading

0 comments on commit 579e4a2

Please sign in to comment.