-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathpom.xml
173 lines (169 loc) · 8.71 KB
/
pom.xml
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
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
<?xml version="1.0" encoding="UTF-8"?>
<!--
CODENVY CONFIDENTIAL
__________________
[2012] - [2015] Codenvy, S.A.
All Rights Reserved.
NOTICE: All information contained herein is, and remains
the property of Codenvy S.A. and its suppliers,
if any. The intellectual and technical concepts contained
herein are proprietary to Codenvy S.A.
and its suppliers and may be covered by U.S. and Foreign Patents,
patents in process, and are protected by trade secret or copyright law.
Dissemination of this information or reproduction of this material
is strictly forbidden unless prior written permission is obtained
from Codenvy S.A..
-->
<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>
<artifactId>maven-depmgt-pom</artifactId>
<groupId>com.codenvy.che.depmgt</groupId>
<version>3.12.3-SNAPSHOT</version>
</parent>
<groupId>com.codenvy.dashboard</groupId>
<artifactId>user-dashboard-war</artifactId>
<version>3.12.3-SNAPSHOT</version>
<name>User Dashboard :: Web App</name>
<scm>
<connection>scm:git:[email protected]:codenvy/user-dashboard.git</connection>
<developerConnection>scm:git:[email protected]:codenvy/user-dashboard.git</developerConnection>
<tag>HEAD</tag>
<url>https://github.com/codenvy/user-dashboard</url>
</scm>
<properties>
<maven.releases.repo.url>https://maven.codenvycorp.com/content/repositories/codenvy-private-releases/</maven.releases.repo.url>
<maven.snapshots.repo.url>https://maven.codenvycorp.com/content/repositories/codenvy-private-snapshots/</maven.snapshots.repo.url>
<version.license-header>codenvy-codenvy-license-resource-bundle</version.license-header>
</properties>
<repositories>
<repository>
<id>codenvy-public-repo</id>
<name>codenvy public</name>
<url>https://maven.codenvycorp.com/content/groups/public/</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>codenvy-public-repo</id>
<name>codenvy public</name>
<url>https://maven.codenvycorp.com/content/groups/public/</url>
</pluginRepository>
</pluginRepositories>
<build>
<plugins>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>2.5</version>
<configuration>
<filesets>
<fileset>
<directory>${basedir}/app/bower_components</directory>
<followSymlinks>false</followSymlinks>
</fileset>
<fileset>
<directory>${basedir}/node_modules</directory>
<followSymlinks>false</followSymlinks>
</fileset>
</filesets>
</configuration>
</plugin>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<phase>compile</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
<!-- Download NPM dependencies -->
<exec dir="${basedir}" executable="npm" failonerror="true">
<arg value="install" />
</exec>
<!-- Download Bower dependencies -->
<exec dir="${basedir}" executable="bower" failonerror="true">
<arg value="install" />
</exec>
<!-- Disable development mode -->
<replace file="${basedir}/app/scripts/app.js">
<replacetoken><![CDATA[var DEV = true;]]></replacetoken>
<replacevalue><![CDATA[var DEV = false;]]></replacevalue>
</replace>
<replace file="${basedir}/app/scripts/app.js">
<replacetoken><![CDATA[var ONPREM = true;]]></replacetoken>
<replacevalue><![CDATA[var ONPREM = false;]]></replacevalue>
</replace>
<!-- Build the application -->
<exec dir="${basedir}/target" executable="grunt" failonerror="true">
<arg value="build" />
</exec>
<!-- Build onprem -->
<replace file="${basedir}/app/scripts/app.js">
<replacetoken><![CDATA[var ONPREM = false;]]></replacetoken>
<replacevalue><![CDATA[var ONPREM = true;]]></replacevalue>
</replace>
<exec dir="${basedir}/target" executable="grunt" failonerror="true">
<arg value="onprem" />
</exec>
<!-- Change base HREF of the application that will be hosted on /dashboard -->
<replace file="${basedir}/target/user-dashboard-war/index.html">
<replacetoken><![CDATA[<base href="/">]]></replacetoken>
<replacevalue><![CDATA[<base href="/dashboard/">]]></replacevalue>
</replace>
<!-- Change base HREF of the application that will be hosted on /dashboard -->
<replace file="${basedir}/target/user-dashboard-onprem-war/index.html">
<replacetoken><![CDATA[<base href="/">]]></replacetoken>
<replacevalue><![CDATA[<base href="/dashboard/">]]></replacevalue>
</replace>
<!-- Enable back development mode -->
<replace file="${basedir}/app/scripts/app.js">
<replacetoken><![CDATA[var DEV = false;]]></replacetoken>
<replacevalue><![CDATA[var DEV = true;]]></replacevalue>
</replace>
<!-- Disable back onprem -->
<replace file="${basedir}/app/scripts/app.js">
<replacetoken><![CDATA[var ONPREM = true;]]></replacetoken>
<replacevalue><![CDATA[var ONPREM = false;]]></replacevalue>
</replace>
</target>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<id>saas</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<finalName>${project.artifactId}</finalName>
<appendAssemblyId>false</appendAssemblyId>
<descriptors>
<descriptor>${basedir}/assembly/assembly-saas.xml</descriptor>
</descriptors>
</configuration>
</execution>
<execution>
<id>onprem</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<finalName>${project.artifactId}</finalName>
<descriptors>
<descriptor>${basedir}/assembly/assembly-onprem.xml</descriptor>
</descriptors>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>