summaryrefslogtreecommitdiffstats
path: root/rulemgt-frontend/pom.xml
blob: 3b94e972e7b4b2d27f133c3cbf8355c2b6de8431 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
<?xml version="1.0"?>
<!--

    Copyright 2018 ZTE Corporation.

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

        http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.

-->
<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 http://maven.apache.org/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>org.onap.holmes.rule-management</groupId>
    <artifactId>holmes-rulemgt-parent</artifactId>
    <version>1.2.0-SNAPSHOT</version>
  </parent>

  <artifactId>holmes-rulemgt-frontend</artifactId>
  <name>holmes-rulemgt-frontend</name>
  <packaging>pom</packaging>

  <build>
    <plugins>
      <plugin>
        <groupId>com.github.eirslett</groupId>
        <artifactId>frontend-maven-plugin</artifactId>
        <version>1.6</version>
        <executions>
          <execution>
            <id>install node and npm</id>
            <goals>
              <goal>install-node-and-npm</goal>
            </goals>
            <phase>generate-resources</phase>
          </execution>
          <execution>
            <id>npm install</id>
            <goals>
              <goal>npm</goal>
            </goals>
            <phase>generate-resources</phase>
            <configuration>
              <arguments>install</arguments>
            </configuration>
          </execution>
          <execution>
            <id>prod</id>
            <goals>
              <goal>npm</goal>
            </goals>
            <configuration>
              <arguments>run-script prod</arguments>
              <arguments>run-script prod</arguments>
            </configuration>
            <phase>generate-resources</phase>
          </execution>
        </executions>
        <configuration>
          <skip>${skip.node.and.npm.installation}</skip>
          <nodeVersion>v10.6.0</nodeVersion>
          <npmVersion>6.1.0</npmVersion>
          <installDirectory>./</installDirectory>
          <workingDirectory>./</workingDirectory>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-war-plugin</artifactId>
        <configuration>
          <failOnMissingWebXml>false</failOnMissingWebXml>
          <warSourceExcludes>
            src/**,
            config/**,
            foo/**,
            i18n/**,
            node/**,
            node_modules/**,
            public/**,
            *.json,
            *.js
          </warSourceExcludes>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-assembly-plugin</artifactId>
        <version>3.0.0</version>
        <configuration>
          <finalName>holmes-rulemgt-frontend-${project.version}</finalName>
          <descriptors>
            <descriptor>assembly.xml</descriptor>
          </descriptors>
          <appendAssemblyId>false</appendAssemblyId>
          <outputDirectory>target/</outputDirectory>
        </configuration>
        <executions>
          <execution>
            <id>holmes-rulemgt-frontend</id>
            <phase>package</phase>
            <goals>
              <goal>single</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
  <profiles>
    <profile>
      <id>local</id>
      <properties>
        <skip.node.and.npm.installation>true</skip.node.and.npm.installation>
      </properties>
    </profile>
    <profile>
      <id>normal</id>
      <activation>
        <activeByDefault>true</activeByDefault>
      </activation>
      <properties>
        <skip.node.and.npm.installation>false</skip.node.and.npm.installation>
      </properties>
    </profile>
  </profiles>
</project>