Create fat jar
authorJoanna Jeremicz <joanna.jeremicz@nokia.com>
Thu, 20 Feb 2020 11:14:03 +0000 (12:14 +0100)
committerJoanna Jeremicz <joanna.jeremicz@nokia.com>
Thu, 20 Feb 2020 11:15:12 +0000 (12:15 +0100)
with shade plugin

Issue-ID: AAF-996
Signed-off-by: Joanna Jeremicz <joanna.jeremicz@nokia.com>
Change-Id: I7664a4c26232682e519d0c0a31f84104e6faa5a1

certServiceClient/Dockerfile
certServiceClient/pom.xml

index 8b2d170..9da4729 100644 (file)
@@ -10,4 +10,4 @@ USER certServiceClient:certServiceClient
 
 COPY target/aaf-certservice-client-${VERSION}.jar ./opt/onap/aaf/certservice/aaf-certservice-client.jar
 
-ENTRYPOINT ["echo","================================ THIS IS CERT-SERVICE-CLIENT CONTAINER RUNNING ================================"]
+ENTRYPOINT ["java","-jar","./opt/onap/aaf/certservice/aaf-certservice-client.jar"]
index 7ba9b5e..f32501b 100644 (file)
                             </images>
                         </configuration>
                     </plugin>
+                    <plugin>
+                        <groupId>org.apache.maven.plugins</groupId>
+                        <artifactId>maven-shade-plugin</artifactId>
+                        <version>3.2.2</version>
+                        <executions>
+                            <execution>
+                                <phase>package</phase>
+                                <goals>
+                                    <goal>shade</goal>
+                                </goals>
+                                <configuration>
+                                    <transformers>
+                                        <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
+                                            <mainClass>org.onap.aaf.certservice.client.CertServiceClientApp</mainClass>
+                                        </transformer>
+                                    </transformers>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
                 </plugins>
             </build>
         </profile>