-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpom.xml
More file actions
218 lines (209 loc) · 9.46 KB
/
pom.xml
File metadata and controls
218 lines (209 loc) · 9.46 KB
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
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (C) 2002-2024 Jahia Solutions Group SA. All rights reserved.
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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>javascript-modules</artifactId>
<groupId>org.jahia.modules</groupId>
<version>1.3.0-SNAPSHOT</version>
</parent>
<artifactId>javascript-modules-engine</artifactId>
<name>Javascript Modules Engine</name>
<packaging>bundle</packaging>
<description>This is the engine allowing Javascript modules to run on a Jahia server.</description>
<properties>
<jahia-module-signature>MCwCFBxB4vGsxUMixwt1lr7SDEpdlG1QAhQ4lN6qoFOY6gw8nurd2WgTe6DqlQ==</jahia-module-signature>
<require-capability>osgi.ee;filter:="(&(osgi.ee=JavaSE)(version>=17))"</require-capability>
<yarn-build>build</yarn-build>
<export-package>
org.graalvm.*;version="${graalvm.version}",
com.oracle.truffle.*;version="${graalvm.version}",
com.oracle.js.*;version="${graalvm.version}"
</export-package>
</properties>
<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>javascript-modules-library</artifactId>
<type>pom</type>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>javascript-modules-engine-java</artifactId>
</dependency>
<dependency>
<groupId>org.graalvm.sdk</groupId>
<artifactId>graal-sdk</artifactId>
</dependency>
<dependency>
<groupId>org.graalvm.truffle</groupId>
<artifactId>truffle-api</artifactId>
</dependency>
<dependency>
<groupId>org.graalvm.js</groupId>
<artifactId>js</artifactId>
</dependency>
<dependency>
<groupId>org.graalvm.regex</groupId>
<artifactId>regex</artifactId>
</dependency>
<dependency>
<groupId>org.graalvm.tools</groupId>
<artifactId>chromeinspector</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<instructions>
<_dsannotations>*</_dsannotations>
<!-- those OSGI dependencies are not provided by Jahia and should be embedded in the bundle -->
<Embed-Dependency>bndlib,chromeinspector,commons-pool2,pax-swissbox-bnd,graal-sdk,truffle-api,js,icu4j,regex</Embed-Dependency>
</instructions>
<!-- because the Java classes of javascript-modules-engine-java are unpacked into the target/classes folder, -->
<!-- the dependency can and should be excluded to avoid duplicates -->
<excludeDependencies>javascript-modules-engine-java</excludeDependencies>
</configuration>
</plugin>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<configuration>
<filesets>
<fileset>
<!-- equivalent of 'yarn clean-server' -->
<directory>${project.basedir}/src/main/resources/META-INF/js/</directory>
</fileset>
<fileset>
<!-- equivalent of 'yarn clean-client' -->
<directory>${project.basedir}/src/main/resources/javascript/</directory>
</fileset>
</filesets>
</configuration>
</plugin>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>unpack-javascript-modules-engine-java</id>
<!-- unzip the .jar with the Java classes so from an OSGI standpoint, it's equivalent to have the Java sources in this module -->
<phase>process-resources</phase>
<goals>
<goal>unpack</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>${project.groupId}</groupId>
<artifactId>javascript-modules-engine-java</artifactId>
<outputDirectory>${project.build.directory}/classes</outputDirectory>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId>
<configuration>
<environmentVariables>
<NODE_OPTIONS>--openssl-legacy-provider</NODE_OPTIONS>
</environmentVariables>
</configuration>
<executions>
<execution>
<id>npm install node and yarn</id>
<phase>initialize</phase>
<goals>
<goal>install-node-and-yarn</goal>
</goals>
</execution>
<execution>
<id>yarn install</id>
<phase>initialize</phase>
<goals>
<goal>yarn</goal>
</goals>
</execution>
<execution>
<id>yarn post-install</id>
<phase>generate-resources</phase>
<goals>
<goal>yarn</goal>
</goals>
<configuration>
<arguments>${yarn-build}</arguments>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.cyclonedx</groupId>
<artifactId>cyclonedx-maven-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>makeAggregateBom</goal>
</goals>
</execution>
</executions>
<configuration>
<projectType>library</projectType>
<schemaVersion>1.4</schemaVersion>
<includeBomSerialNumber>true</includeBomSerialNumber>
<includeCompileScope>true</includeCompileScope>
<includeProvidedScope>false</includeProvidedScope>
<includeRuntimeScope>true</includeRuntimeScope>
<includeSystemScope>false</includeSystemScope>
<includeTestScope>false</includeTestScope>
<includeLicenseText>false</includeLicenseText>
<outputReactorProjects>true</outputReactorProjects>
<outputFormat>json</outputFormat>
<outputName>java-bom.cdx</outputName>
</configuration>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>dev</id>
<properties>
<yarn-build>build:development</yarn-build>
</properties>
</profile>
<profile>
<id>release-prepare</id>
<build>
<plugins>
<plugin>
<!-- by default on CI environment, yarn has the "immutable" option set -->
<!-- however, during the release preparation process (i.e. with the "release-prepare" profile enabled),
it must be explicitly disabled to recompute the checksums in the yarn.lock files after the version change -->
<groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId>
<configuration>
<arguments>--no-immutable</arguments>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>