Merge "Fix docker image generation when not profile is selected"
authorBruno Sakoto <bruno.sakoto@bell.ca>
Tue, 23 Feb 2021 17:32:09 +0000 (17:32 +0000)
committerGerrit Code Review <gerrit@onap.org>
Tue, 23 Feb 2021 17:32:09 +0000 (17:32 +0000)
cps-application/pom.xml

index 378b671..8ea2db3 100644 (file)
@@ -34,7 +34,6 @@
 
     <properties>
         <app>org.onap.cps.Application</app>
-        <image.name>cps-service</image.name>
         <image.version>${project.version}</image.version>
         <jib-maven-plugin.version>2.6.0</jib-maven-plugin.version>
         <minimum-coverage>0.0</minimum-coverage>
                 <groupId>org.springframework.boot</groupId>
                 <artifactId>spring-boot-maven-plugin</artifactId>
             </plugin>
-            <plugin>
-                <groupId>com.google.cloud.tools</groupId>
-                <artifactId>jib-maven-plugin</artifactId>
-            </plugin>
         </plugins>
     </build>
     <profiles>
             <activation>
                 <activeByDefault>false</activeByDefault>
             </activation>
+
+            <properties>
+                <image.name>cps-service</image.name>
+            </properties>
             <dependencies>
                 <dependency>
                     <groupId>${project.groupId}</groupId>
                     <artifactId>cps-rest</artifactId>
                 </dependency>
             </dependencies>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>com.google.cloud.tools</groupId>
+                        <artifactId>jib-maven-plugin</artifactId>
+                    </plugin>
+                </plugins>
+            </build>
         </profile>
         <profile>
             <id>xnf-docker</id>
                     <artifactId>cps-nf-proxy-rest</artifactId>
                 </dependency>
             </dependencies>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>com.google.cloud.tools</groupId>
+                        <artifactId>jib-maven-plugin</artifactId>
+                    </plugin>
+                </plugins>
+            </build>
         </profile>
         <profile>
             <id>cps-xnf-docker</id>
             <activation>
-                <activeByDefault>false</activeByDefault>
+                <activeByDefault>true</activeByDefault>
             </activation>
 
             <properties>
                     <artifactId>cps-nf-proxy-rest</artifactId>
                 </dependency>
             </dependencies>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>com.google.cloud.tools</groupId>
+                        <artifactId>jib-maven-plugin</artifactId>
+                    </plugin>
+                </plugins>
+            </build>
         </profile>
     </profiles>
 </project>
\ No newline at end of file