iotivity docker build via maven 03/27103/1
authorRap <peter.rafaj@kistler.com>
Mon, 21 May 2018 10:02:50 +0000 (12:02 +0200)
committerPeter Rafaj <peter.rafaj@kistler.com>
Wed, 3 Oct 2018 09:25:59 +0000 (11:25 +0200)
Change-Id: I1a4884d673da29db40042524d49e390ebfc97f00
Signed-off-by: Peter Rafaj <peter.rafaj@kistler.com>
cloud/account/Dockerfile
cloud/account/pom.xml
cloud/interface/Dockerfile
cloud/interface/pom.xml
cloud/messagequeue/Dockerfile
cloud/messagequeue/pom.xml
cloud/pom.xml
cloud/resourcedirectory/Dockerfile
cloud/resourcedirectory/pom.xml

index ae7bd9e..a70de02 100644 (file)
@@ -25,4 +25,4 @@ ENV JAVA_JMX_OPTS "-Dcom.sun.management.jmxremote \
 
 EXPOSE 9002
 
-ENTRYPOINT exec java $JAVA_JMX_OPTS $JAVA_MEMOTY_OPTS -jar AccountServer.jar
+ENTRYPOINT exec java $JAVA_JMX_OPTS $JAVA_MEMORY_OPTS -jar AccountServer.jar
index d5ddcd9..d9800b6 100644 (file)
        <groupId>org.iotivity.cloud</groupId>
        <artifactId>CloudAccount</artifactId>
 
+       <properties>
+               <docker.image.name>iotivity/accountserver</docker.image.name>
+       </properties>
+
        <dependencies>
                <!-- Local -->
                <dependency>
                                        <overWriteIfNewer>true</overWriteIfNewer>
                                </configuration>
                        </plugin>
+                       <plugin>
+                               <groupId>io.fabric8</groupId>
+                               <artifactId>docker-maven-plugin</artifactId>
+                               <version>0.26.0</version>
+                               <configuration>
+                                       <images>
+                                               <image>
+                                                       <name>${docker.image.name}</name>
+                                                       <build>
+                                                               <dockerFileDir>${project.basedir}</dockerFileDir>
+                                                               <tags>
+                                                                       <tag>${docker.image.version}</tag>
+                                                               </tags>
+                                                       </build>
+                                               </image>
+                                       </images>
+                               </configuration>
+                       </plugin>
                </plugins>
        </build>
-
 </project>
\ No newline at end of file
index e2ef361..4f012cd 100644 (file)
@@ -29,4 +29,4 @@ ENV JAVA_JMX_OPTS "-Dcom.sun.management.jmxremote \
 
 EXPOSE 9001
 
-ENTRYPOINT exec java $JAVA_JMX_OPTS $JAVA_MEMOTY_OPTS -jar CloudInterface.jar
+ENTRYPOINT exec java $JAVA_JMX_OPTS $JAVA_MEMORY_OPTS -jar CloudInterface.jar
index f7d0688..1220d7e 100644 (file)
        <groupId>org.iotivity.cloud</groupId>
        <artifactId>CloudInterface</artifactId>
 
+       <properties>
+               <docker.image.name>iotivity/interface</docker.image.name>
+       </properties>
+
+
        <dependencies>
                <!-- Local -->
                <dependency>
                                        <overWriteIfNewer>true</overWriteIfNewer>
                                </configuration>
                        </plugin>
+                       <plugin>
+                               <groupId>io.fabric8</groupId>
+                               <artifactId>docker-maven-plugin</artifactId>
+                               <version>0.26.0</version>
+                               <configuration>
+                                       <images>
+                                               <image>
+                                                       <name>${docker.image.name}</name>
+                                                       <build>
+                                                               <dockerFileDir>${project.basedir}</dockerFileDir>
+                                                               <tags>
+                                                                       <tag>${docker.image.version}</tag>
+                                                               </tags>
+                                                       </build>
+                                               </image>
+                                       </images>
+                               </configuration>
+                       </plugin>
                </plugins>
        </build>
-
 </project>
\ No newline at end of file
index cff8457..25823cd 100644 (file)
@@ -25,4 +25,4 @@ ENV JAVA_JMX_OPTS "-Dcom.sun.management.jmxremote \
 
 EXPOSE 9003
 
-ENTRYPOINT exec java $JAVA_JMX_OPTS $JAVA_MEMOTY_OPTS -jar MessageQueue.jar
+ENTRYPOINT exec java $JAVA_JMX_OPTS $JAVA_MEMORY_OPTS -jar MessageQueue.jar
index 3a63f1e..1d0434f 100644 (file)
@@ -11,6 +11,9 @@
        <groupId>org.iotivity.cloud</groupId>
        <artifactId>CloudMessageQueue</artifactId>
 
+       <properties>
+               <docker.image.name>iotivity/messagequeue</docker.image.name>
+       </properties>
 
        <dependencies>
                <dependency>
                                        <overWriteIfNewer>true</overWriteIfNewer>
                                </configuration>
                        </plugin>
+                       <plugin>
+                               <groupId>io.fabric8</groupId>
+                               <artifactId>docker-maven-plugin</artifactId>
+                               <version>0.26.0</version>
+                               <configuration>
+                                       <images>
+                                               <image>
+                                                       <name>${docker.image.name}</name>
+                                                       <build>
+                                                               <dockerFileDir>${project.basedir}</dockerFileDir>
+                                                               <tags>
+                                                                       <tag>${docker.image.version}</tag>
+                                                               </tags>
+                                                       </build>
+                                               </image>
+                                       </images>
+                               </configuration>
+                       </plugin>
                </plugins>
        </build>
-
 </project>
\ No newline at end of file
index 24c33cb..34bf9d5 100644 (file)
   </modules>
 
   <properties>
+
+    <!-- docker image version . In case of changes use mvn -Ddocker.image.version=1.3-20 -->
+    <docker.image.version>latest</docker.image.version>
+
     <!-- Common configuration properties -->
     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
     <java.source>1.8</java.source>
         <scope>test</scope>
       </dependency>
 
-      <!-- Plugins -->
-      <!-- Not necessary -->
-      <!--<dependency>-->
-        <!--<groupId>org.apache.maven.plugins</groupId>-->
-        <!--<artifactId>maven-resources-plugin</artifactId>-->
-        <!--<version>2.4.3</version>-->
-      <!--</dependency>-->
-      <!--<dependency>-->
-        <!--<groupId>org.apache.maven.plugins</groupId>-->
-        <!--<artifactId>maven-compiler-plugin</artifactId>-->
-        <!--<version>3.1</version>-->
-      <!--</dependency>-->
     </dependencies>
   </dependencyManagement>
 
index 0625df2..63ef5a9 100644 (file)
@@ -23,4 +23,4 @@ ENV JAVA_JMX_OPTS "-Dcom.sun.management.jmxremote \
 
 EXPOSE 9004
 
-ENTRYPOINT exec java $JAVA_JMX_OPTS $JAVA_MEMOTY_OPTS -jar ResourceDirectory.jar
+ENTRYPOINT exec java $JAVA_JMX_OPTS $JAVA_MEMORY_OPTS -jar ResourceDirectory.jar
index 5d6a28f..e5974c7 100644 (file)
        <groupId>org.iotivity.cloud</groupId>
        <artifactId>CloudResourceDirectory</artifactId>
 
+
+       <properties>
+               <docker.image.name>iotivity/resourcedirectory</docker.image.name>
+       </properties>
+
        <dependencies>
                <!-- Local -->
                <dependency>
                                        <overWriteIfNewer>true</overWriteIfNewer>
                                </configuration>
                        </plugin>
+                       <plugin>
+                               <groupId>io.fabric8</groupId>
+                               <artifactId>docker-maven-plugin</artifactId>
+                               <version>0.26.0</version>
+                               <configuration>
+                                       <images>
+                                               <image>
+                                                       <name>${docker.image.name}</name>
+                                                       <build>
+                                                               <dockerFileDir>${project.basedir}</dockerFileDir>
+                                                               <tags>
+                                                                       <tag>${docker.image.version}</tag>
+                                                               </tags>
+                                                       </build>
+                                               </image>
+                                       </images>
+                               </configuration>
+                       </plugin>
                </plugins>
        </build>
-
 </project>
\ No newline at end of file