Keycloak

Форк
0
187 строк · 7.4 Кб
1
<?xml version="1.0" encoding="UTF-8"?>
2
<project xmlns="http://maven.apache.org/POM/4.0.0"
3
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4
    xsi: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-admin-ui</artifactId>
15

16
    <name>Keycloak Admin UI</name>
17
    <description>The user inferface to administrate 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.v2/admin/resources</targetPath>
62
                <excludes>
63
                    <exclude>index.html</exclude>
64
                    <exclude>locales/**</exclude>
65
                </excludes>
66
            </resource>
67
        </resources>
68

69
        <plugins>
70
            <plugin>
71
                <groupId>com.github.eirslett</groupId>
72
                <artifactId>frontend-maven-plugin</artifactId>
73
                <executions>
74
                    <execution>
75
                        <goals>
76
                            <goal>install-node-and-pnpm</goal>
77
                        </goals>
78
                    </execution>
79
                    <execution>
80
                        <id>pnpm-install</id>
81
                        <goals>
82
                            <goal>pnpm</goal>
83
                        </goals>
84
                        <configuration>
85
                            <arguments>${pnpm.args.install}</arguments>
86
                        </configuration>
87
                    </execution>
88
                    <execution>
89
                        <id>run-build</id>
90
                        <goals>
91
                            <goal>pnpm</goal>
92
                        </goals>
93
                        <configuration>
94
                            <arguments>run build</arguments>
95
                        </configuration>
96
                    </execution>
97
                </executions>
98
            </plugin>
99
            <plugin>
100
                <groupId>com.google.code.maven-replacer-plugin</groupId>
101
                <artifactId>maven-replacer-plugin</artifactId>
102
                <executions>
103
                    <execution>
104
                        <phase>process-resources</phase>
105
                        <goals>
106
                            <goal>replace</goal>
107
                        </goals>
108
                    </execution>
109
                </executions>
110
                <configuration>
111
                    <file>dist/index.html</file>
112
                    <outputFile>target/classes/theme/keycloak.v2/admin/index.ftl</outputFile>
113
                    <regex>false</regex>
114
                    <replacements>
115
                        <replacement>
116
                            <token>src="./</token>
117
                            <value>src="${resourceUrl}/</value>
118
                        </replacement>
119
                        <replacement>
120
                            <token>href="./</token>
121
                            <value>href="${resourceUrl}/</value>
122
                        </replacement>
123
                        <replacement>
124
                            <token><![CDATA[<link rel="icon" type="image/svg+xml" href="${resourceUrl}/favicon.svg" />]]></token>
125
                            <value xml:space="preserve"><![CDATA[<link rel="icon" type="${properties.favIconType!"image/svg+xml"}" href="${resourceUrl}${properties.favIcon!"/favicon.svg"}" />]]></value>
126
                        </replacement>
127
                        <replacement>
128
                            <token><![CDATA[<meta name="description" content="Web site to manage keycloak" />]]></token>
129
                            <value xml:space="preserve"><![CDATA[<meta name="description" content="${properties.description!"Web site to manage keycloak"}" />]]></value>
130
                        </replacement>
131
                        <replacement>
132
                            <token><![CDATA[<title>Keycloak Administration UI</title>]]></token>
133
                            <value xml:space="preserve">
134
<![CDATA[
135
    <title>${properties.title!"Keycloak Administration UI"}</title>
136
    <script type="importmap">
137
      {
138
        "imports": {
139
          "react": "${resourceCommonUrl}/vendor/react/react.production.min.js",
140
          "react/jsx-runtime": "${resourceCommonUrl}/vendor/react/react-jsx-runtime.production.min.js",
141
          "react-dom": "${resourceCommonUrl}/vendor/react-dom/react-dom.production.min.js"
142
        }
143
      }
144
    </script>
145
]]></value>
146
                        </replacement>
147
                        <replacement>
148
                            <token><![CDATA[</body>]]></token>
149
                            <value xml:space="preserve">
150
<![CDATA[
151
  <script id="environment" type="application/json">
152
    {
153
      "loginRealm": "${loginRealm!"master"}",
154
      "clientId": "${clientId}",
155
      "authServerUrl": "${authServerUrl}",
156
      "authUrl": "${authUrl}",
157
      "consoleBaseUrl": "${consoleBaseUrl}",
158
      "resourceUrl": "${resourceUrl}",
159
      "masterRealm": "${masterRealm}",
160
      "resourceVersion": "${resourceVersion}",
161
      "logo": "${properties.logo!""}",
162
      "logoUrl": "${properties.logoUrl!""}"
163
    }
164
  </script>
165
</body>
166
]]>
167
</value>
168
                        </replacement>
169
                        <replacement>
170
                            <token><![CDATA[</head>]]></token>
171
                            <value xml:space="preserve">
172
<![CDATA[
173
    <#if properties.styles?has_content>
174
      <#list properties.styles?split(' ') as style>
175
      <link href="${resourceUrl}/${style}" rel="stylesheet"/>
176
      </#list>
177
    </#if>
178
  </head>
179
]]>
180
</value>
181
                        </replacement>
182
                    </replacements>
183
                </configuration>
184
            </plugin>
185
        </plugins>
186
    </build>
187
</project>

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.