Keycloak
199 строк · 8.0 Кб
1<?xml version="1.0" encoding="UTF-8"?>
2<project xmlns="http://maven.apache.org/POM/4.0.0"3xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"4xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">5<modelVersion>4.0.0</modelVersion>6
7<parent>8<artifactId>keycloak-js-parent</artifactId>9<groupId>org.keycloak</groupId>10<version>999.0.0-SNAPSHOT</version>11<relativePath>../../pom.xml</relativePath>12</parent>13
14<artifactId>keycloak-account-ui</artifactId>15
16<name>Keycloak Account UI</name>17<description>The user inferface to manage an account on the Keycloak server.</description>18
19<profiles>20<profile>21<id>withTranslations</id>22<activation>23<property>24<name>!skipCommunityTranslations</name>25</property>26</activation>27<build>28<plugins>29<plugin>30<artifactId>maven-resources-plugin</artifactId>31<executions>32<execution>33<id>copy-resources</id>34<phase>generate-resources</phase>35<goals>36<goal>copy-resources</goal>37</goals>38<configuration>39<outputDirectory>${project.build.outputDirectory}</outputDirectory>40<resources>41<resource>42<directory>maven-resources-community</directory>43</resource>44</resources>45</configuration>46</execution>47</executions>48</plugin>49</plugins>50</build>51</profile>52</profiles>53
54<build>55<resources>56<resource>57<directory>maven-resources</directory>58</resource>59<resource>60<directory>dist</directory>61<targetPath>theme/keycloak.v3/account/resources</targetPath>62<excludes>63<exclude>index.html</exclude>64</excludes>65</resource>66</resources>67
68<plugins>69<plugin>70<groupId>com.github.eirslett</groupId>71<artifactId>frontend-maven-plugin</artifactId>72<executions>73<execution>74<goals>75<goal>install-node-and-pnpm</goal>76</goals>77</execution>78<execution>79<id>pnpm-install</id>80<goals>81<goal>pnpm</goal>82</goals>83<configuration>84<arguments>${pnpm.args.install}</arguments>85</configuration>86</execution>87<execution>88<id>run-build</id>89<goals>90<goal>pnpm</goal>91</goals>92<configuration>93<arguments>run build</arguments>94</configuration>95</execution>96</executions>97</plugin>98<plugin>99<groupId>com.google.code.maven-replacer-plugin</groupId>100<artifactId>maven-replacer-plugin</artifactId>101<executions>102<execution>103<phase>process-resources</phase>104<goals>105<goal>replace</goal>106</goals>107</execution>108</executions>109<configuration>110<file>dist/index.html</file>111<outputFile>target/classes/theme/keycloak.v3/account/index.ftl</outputFile>112<regex>false</regex>113<replacements>114<replacement>115<token>src="./</token>116<value>src="${resourceUrl}/</value>117</replacement>118<replacement>119<token>href="./</token>120<value>href="${resourceUrl}/</value>121</replacement>122<replacement>123<token><![CDATA[<link rel="icon" type="image/svg+xml" href="${resourceUrl}/favicon.svg" />]]></token>124<value xml:space="preserve"><![CDATA[<link rel="icon" type="${properties.favIconType!"image/svg+xml"}" href="${resourceUrl}${properties.favIcon!"/favicon.svg"}" />]]></value>125</replacement>126<replacement>127<token><![CDATA[<meta name="description" content="Web site to manage keycloak" />]]></token>128<value xml:space="preserve"><![CDATA[<meta name="description" content="${properties.description!"Web site to manage keycloak"}" />]]></value>129</replacement>130<replacement>131<token><![CDATA[<title>Account Management</title>]]></token>132<value xml:space="preserve">133<![CDATA[
134<title>${properties.title!"Account Management"}</title>
135<script type="importmap">
136{
137"imports": {
138"react": "${resourceCommonUrl}/vendor/react/react.production.min.js",
139"react/jsx-runtime": "${resourceCommonUrl}/vendor/react/react-jsx-runtime.production.min.js",
140"react-dom": "${resourceCommonUrl}/vendor/react-dom/react-dom.production.min.js"
141}
142}
143</script>
144]]></value>145</replacement>146<replacement>147<token><![CDATA[</body>]]></token>148<value xml:space="preserve">149<![CDATA[
150<script id="environment" type="application/json">
151{
152"authUrl": "${authUrl}",
153"realm": "${realm.name}",
154"clientId": "${clientId}",
155"resourceUrl": "${resourceUrl}",
156"logo": "${properties.logo!""}",
157"logoUrl": "${properties.logoUrl!""}",
158"locale": "${locale}",
159"features": {
160"isRegistrationEmailAsUsername": ${realm.registrationEmailAsUsername?c},
161"isEditUserNameAllowed": ${realm.editUsernameAllowed?c},
162"isInternationalizationEnabled": ${realm.isInternationalizationEnabled()?c},
163"isLinkedAccountsEnabled": ${realm.identityFederationEnabled?c},
164"isMyResourcesEnabled": ${(realm.userManagedAccessAllowed && isAuthorizationEnabled)?c},
165"deleteAccountAllowed": ${deleteAccountAllowed?c},
166"updateEmailFeatureEnabled": ${updateEmailFeatureEnabled?c},
167"updateEmailActionEnabled": ${updateEmailActionEnabled?c},
168"isViewGroupsEnabled": ${isViewGroupsEnabled?c}
169}
170}
171</script>
172</body>
173]]>
174</value>175</replacement>176<replacement>177<token><![CDATA[</head>]]></token>178<value xml:space="preserve">179<![CDATA[
180<#if properties.scripts?has_content>
181<#list properties.scripts?split(' ') as script>
182<script src="${resourceUrl}/${script}"></script>
183</#list>
184</#if>
185<#if properties.styles?has_content>
186<#list properties.styles?split(' ') as style>
187<link href="${resourceUrl}/${style}" rel="stylesheet"/>
188</#list>
189</#if>
190</head>
191]]>
192</value>193</replacement>194</replacements>195</configuration>196</plugin>197</plugins>198</build>199</project>