615e7fa9edb382d5d869c2800ca706d3bb06fd80
[portal.git] / portal-FE-os / pom.xml
1 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
3         <modelVersion>4.0.0</modelVersion>
4
5         <groupId>org.onap.portal</groupId>
6         <artifactId>portal-FE-os</artifactId>
7         <version>3.4.0</version>
8
9         <properties>
10                 <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
11                 <skipnode>false</skipnode>
12                 <skipcopy>false</skipcopy>
13                 <sonar.typescript.lcov.reportPaths>coverage/lcov.info</sonar.typescript.lcov.reportPaths>
14         <sonar.sources>src</sonar.sources>
15                 <sonar.projectKey>portal-FE-os</sonar.projectKey>
16                 <sonar.projectName>portal-FE-os</sonar.projectName> 
17                 <sonar.exclusions>**/node_modules/**,**/*.spec.ts,**/*.module.ts,**/environment.prod.ts,**/*.js,**/main.ts,**/header-interceptor.ts,**/dynamic-widget.component.ts</sonar.exclusions>
18                 <sonar.test.inclusions>**/*.spec.ts</sonar.test.inclusions>
19                 <sonar.tests>src</sonar.tests>
20                 <sonar.sourceEncoding>UTF-8</sonar.sourceEncoding>
21                 <sonar.nodejs.executable>${project.basedir}\node\</sonar.nodejs.executable>
22         </properties>
23
24         <build>
25                 <plugins>
26
27                         <plugin>
28                                 <artifactId>maven-clean-plugin</artifactId>
29                                 <version>3.0.0</version>
30                                 <configuration>
31                                         <filesets>
32                                                 <fileset>
33                                                         <directory>${basedir}/dist</directory>
34                                                 </fileset>
35                                                 <!--
36                                                 <fileset>
37                                                         <directory>${basedir}/node</directory>
38                                                 </fileset>
39                                                 <fileset>
40                                                         <directory>${basedir}/node_modules</directory>
41                                                 </fileset>
42                                                 -->
43                                         </filesets>
44                                 </configuration>
45                         </plugin>
46
47                         <plugin>
48                                 <groupId>org.apache.maven.plugins</groupId>
49                                 <artifactId>maven-resources-plugin</artifactId>
50                                 <version>3.0.2</version>
51                                 <executions>
52
53                                         <execution>
54                                                 <id>copy-common</id>
55                                                 <phase>generate-resources</phase>
56                                                 <goals>
57                                                         <goal>copy-resources</goal>
58                                                 </goals>
59                                                 <configuration>
60                                                         <outputDirectory>${basedir}/src</outputDirectory>
61                                                         <overwrite>false</overwrite>
62                                                         <skip>${skipcopy}</skip>
63                                                         <resources>
64                                                                 <resource>
65                                                                         <directory>../portal-FE-common/src</directory>
66                                                                 </resource>
67                                                         </resources>
68                                                 </configuration>
69                                         </execution>
70
71                                 </executions>
72                         </plugin>
73                         
74                         <plugin>
75                                 <groupId>com.github.eirslett</groupId>
76                                 <artifactId>frontend-maven-plugin</artifactId>
77                                 <!-- Use the latest released version: https://repo1.maven.org/maven2/com/github/eirslett/frontend-maven-plugin/ -->
78                                 <version>1.3</version>
79                                 <configuration>
80                                         <skip>${skipnode}</skip>
81                                         <nodeVersion>v10.13.0</nodeVersion>
82                                         <nodeDownloadRoot>https://nodejs.org/dist/</nodeDownloadRoot>
83                                         <npmDownloadRoot>https://nodejs.org/dist/npm/</npmDownloadRoot>
84                                         <installDirectory>./</installDirectory>
85                                 </configuration>
86                                 <executions>
87                                         <execution>
88                                                 <!-- optional: you don't really need execution ids, but it looks nice 
89                                                         in your build log. -->
90                                                 <id>install node and npm</id>
91                                                 <goals>
92                                                         <goal>install-node-and-npm</goal>
93                                                 </goals>
94                                                 <phase>generate-resources</phase>
95                                         </execution>
96
97                                         <execution>
98                                                 <id>npm install</id>
99                                                 <goals>
100                                                         <goal>npm</goal>
101                                                 </goals>
102
103                                                 <phase>generate-resources</phase>
104
105                                                 <configuration>
106                                                         <arguments>install</arguments>
107                                                 </configuration>
108                                         </execution>
109                                         
110                                         <execution>
111                                                 <id>npm run test</id>
112                                                 <goals>
113                                                         <goal>npm</goal>
114                                                 </goals>
115
116                                                 <phase>generate-resources</phase>
117
118                                                 <configuration>
119                                                         <arguments>run-script test</arguments>
120                                                 </configuration>
121                                         </execution>
122
123                                         <execution>
124                                                 <id>npm build</id>
125                                                 <goals>
126                                                         <goal>npm</goal>
127                                                 </goals>
128
129                                                 <phase>generate-resources</phase>
130
131                                                 <configuration>
132                                                         <arguments>run-script build</arguments>
133                                                 </configuration>
134                                         </execution>
135
136                                 </executions>
137                         </plugin>
138                         
139                 </plugins>
140         </build>
141 </project>