Skip to content

Commit

Permalink
Improves formatting issues (#160)
Browse files Browse the repository at this point in the history
* Maven Docker Build improvements

* Fixing build.

* Match docker healthcheck port with application running port.

* Improves formatting issues

Signed-off-by: Mohammad Ghazanfar Ali Danish <[email protected]>

---------

Signed-off-by: Mohammad Ghazanfar Ali Danish <[email protected]>
Co-authored-by: Oweis Al-Agtash <[email protected]>
  • Loading branch information
mdanish98 and oalagtash authored Dec 13, 2023
1 parent eca2af2 commit 888be31
Show file tree
Hide file tree
Showing 9 changed files with 351 additions and 310 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
Expand All @@ -12,7 +14,8 @@

<properties>
<docker.image.name>aas-discovery</docker.image.name>
<docker.container.waitForEndpoint>http://localhost:${docker.host.port}/lookup/shells</docker.container.waitForEndpoint>
<docker.container.waitForEndpoint>
http://localhost:${docker.host.port}/lookup/shells</docker.container.waitForEndpoint>
</properties>

<dependencies>
Expand Down Expand Up @@ -116,31 +119,33 @@
<profiles>
<profile>
<id>docker</id>
<activation>
<property>
<name>docker.namespace</name>
</property>
</activation>
<activation>
<property>
<name>docker.namespace</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
<configuration>
<images>
<image>
<run>
<ports>
<port>${docker.host.port}:${docker.container.port}</port>
</ports>
<wait>
<url>${docker.container.waitForEndpoint}</url>
<time>60000</time>
</wait>
</run>
</image>
</images>
</configuration>
<configuration>
<images>
<image>
<run>
<ports>
<port>
${docker.host.port}:${docker.container.port}</port>
</ports>
<wait>
<url>
${docker.container.waitForEndpoint}</url>
<time>60000</time>
</wait>
</run>
</image>
</images>
</configuration>
<executions>
<execution>
<id>build-docker</id>
Expand All @@ -149,19 +154,19 @@
<id>push-docker</id>
</execution>
<execution>
<id>docker-compose-up</id>
<phase>pre-integration-test</phase>
<goals>
<goal>start</goal>
</goals>
</execution>
<execution>
<id>docker-compose-down</id>
<phase>post-integration-test</phase>
<goals>
<goal>stop</goal>
</goals>
</execution>
<id>docker-compose-up</id>
<phase>pre-integration-test</phase>
<goals>
<goal>start</goal>
</goals>
</execution>
<execution>
<id>docker-compose-down</id>
<phase>post-integration-test</phase>
<goals>
<goal>stop</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
Expand Down
74 changes: 38 additions & 36 deletions basyx.aasenvironment/basyx.aasenvironment.component/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
<artifactId>basyx.conceptdescriptionrepository-tck</artifactId>
<classifier>tests</classifier>
<scope>test</scope>
</dependency>
</dependency>
<dependency>
<groupId>org.eclipse.digitaltwin.basyx</groupId>
<artifactId>basyx.conceptdescriptionrepository.component</artifactId>
Expand All @@ -65,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 @@ -119,31 +119,33 @@
<profiles>
<profile>
<id>docker</id>
<activation>
<property>
<name>docker.namespace</name>
</property>
</activation>
<activation>
<property>
<name>docker.namespace</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
<configuration>
<images>
<image>
<run>
<ports>
<port>${docker.host.port}:${docker.container.port}</port>
</ports>
<wait>
<url>${docker.container.waitForEndpoint}</url>
<time>60000</time>
</wait>
</run>
</image>
</images>
</configuration>
<configuration>
<images>
<image>
<run>
<ports>
<port>
${docker.host.port}:${docker.container.port}</port>
</ports>
<wait>
<url>
${docker.container.waitForEndpoint}</url>
<time>60000</time>
</wait>
</run>
</image>
</images>
</configuration>
<executions>
<execution>
<id>build-docker</id>
Expand All @@ -152,19 +154,19 @@
<id>push-docker</id>
</execution>
<execution>
<id>docker-compose-up</id>
<phase>pre-integration-test</phase>
<goals>
<goal>start</goal>
</goals>
</execution>
<execution>
<id>docker-compose-down</id>
<phase>post-integration-test</phase>
<goals>
<goal>stop</goal>
</goals>
</execution>
<id>docker-compose-up</id>
<phase>pre-integration-test</phase>
<goals>
<goal>start</goal>
</goals>
</execution>
<execution>
<id>docker-compose-down</id>
<phase>post-integration-test</phase>
<goals>
<goal>stop</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
Expand Down
40 changes: 22 additions & 18 deletions basyx.aasregistry/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
<swagger.codegen.version>3.0.42</swagger.codegen.version>
<spring.fox.version>3.0.0</spring.fox.version>
<openapi.folder.name>open-api</openapi.folder.name>
<openapi.base.name>Plattform_i40-AssetAdministrationShellRegistryServiceSpecification-V3.0.1_SSP-001-resolved.yaml
<openapi.base.name>
Plattform_i40-AssetAdministrationShellRegistryServiceSpecification-V3.0.1_SSP-001-resolved.yaml
</openapi.base.name>
<openapi.name>Plattform_i40-Registry-and-Discovery.yaml</openapi.name>
<guava.version>31.0.1-jre</guava.version>
Expand All @@ -44,13 +45,14 @@
<module>basyx.aasregistry-paths</module>
<module>basyx.aasregistry-service</module>
<module>basyx.aasregistry-service-basetests</module>
<module>basyx.aasregistry-service-kafka-events</module>
<!-- <module>basyx.aasregistry-service-kafka-events</module>-->
<module>basyx.aasregistry-service-inmemory-storage</module>
<module>basyx.aasregistry-service-mongodb-storage</module>
<module>basyx.aasregistry-service-release-log-mem</module>
<module>basyx.aasregistry-service-release-log-mongodb</module>
<module>basyx.aasregistry-service-release-kafka-mem</module>
<module>basyx.aasregistry-service-release-kafka-mongodb</module>
<!-- <module>basyx.aasregistry-service-release-kafka-mem</module>-->
<!-- <module>basyx.aasregistry-service-release-kafka-mongodb</module>-->

</modules>

<developers>
Expand Down Expand Up @@ -247,7 +249,8 @@
<profile>
<id>dockerbuild</id>
<activation>
<!-- This profile is always active if there is a Dockerfile and docker.namespace property is given -->
<!-- This profile is always active if there is a Dockerfile and
docker.namespace property is given -->
<file>
<exists>src/main/docker/Dockerfile</exists>
</file>
Expand Down Expand Up @@ -277,19 +280,20 @@
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
<configuration>
<images>
<image>
<build>
<assembly>
<descriptorRef>artifact</descriptorRef>
</assembly>
<dockerFile>Dockerfile</dockerFile>
<contextDir>${project.basedir}/src/main/docker</contextDir>
</build>
</image>
</images>
</configuration>
<configuration>
<images>
<image>
<build>
<assembly>
<descriptorRef>artifact</descriptorRef>
</assembly>
<dockerFile>Dockerfile</dockerFile>
<contextDir>
${project.basedir}/src/main/docker</contextDir>
</build>
</image>
</images>
</configuration>
<executions>
<execution>
<id>build-docker</id>
Expand Down
74 changes: 38 additions & 36 deletions basyx.aasrepository/basyx.aasrepository.component/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -124,34 +124,36 @@
<profiles>
<profile>
<id>docker</id>
<activation>
<property>
<name>docker.namespace</name>
</property>
</activation>
<activation>
<property>
<name>docker.namespace</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
<configuration>
<images>
<image>
<run>
<ports>
<port>${docker.host.port}:${docker.container.port}</port>
</ports>
<wait>
<url>${docker.container.waitForEndpoint}</url>
<time>60000</time>
</wait>
<env>
<SPRING_PROFILES_ACTIVE>integration</SPRING_PROFILES_ACTIVE>
</env>
</run>
</image>
</images>
</configuration>
<configuration>
<images>
<image>
<run>
<ports>
<port>
${docker.host.port}:${docker.container.port}</port>
</ports>
<wait>
<url>
${docker.container.waitForEndpoint}</url>
<time>60000</time>
</wait>
<env>
<SPRING_PROFILES_ACTIVE>integration</SPRING_PROFILES_ACTIVE>
</env>
</run>
</image>
</images>
</configuration>
<executions>
<execution>
<id>build-docker</id>
Expand All @@ -160,19 +162,19 @@
<id>push-docker</id>
</execution>
<execution>
<id>docker-compose-up</id>
<phase>pre-integration-test</phase>
<goals>
<goal>start</goal>
</goals>
</execution>
<execution>
<id>docker-compose-down</id>
<phase>post-integration-test</phase>
<goals>
<goal>stop</goal>
</goals>
</execution>
<id>docker-compose-up</id>
<phase>pre-integration-test</phase>
<goals>
<goal>start</goal>
</goals>
</execution>
<execution>
<id>docker-compose-down</id>
<phase>post-integration-test</phase>
<goals>
<goal>stop</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
Expand Down
Loading

0 comments on commit 888be31

Please sign in to comment.