-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathpom.xml
More file actions
424 lines (394 loc) · 18.1 KB
/
Copy pathpom.xml
File metadata and controls
424 lines (394 loc) · 18.1 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
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
<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://www.w3.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.lucee</groupId>
<artifactId>hibernate-extension</artifactId>
<version>5.6.15.19-SNAPSHOT</version>
<packaging>jar</packaging>
<name>Hibernate Extension</name>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<maven.build.timestamp.format>yyyy-MM-dd HH:mm:ss</maven.build.timestamp.format>
<build.timestamp>${maven.build.timestamp}</build.timestamp>
<bundlename>org.lucee.hibernate.extension</bundlename>
<release.url>https://central.sonatype.com/api/v1/publisher/deployments/download/</release.url>
<snapshot.url>https://central.sonatype.com/repository/maven-snapshots/</snapshot.url>
</properties>
<scm>
<url>https://github.com/lucee/extension-hibernate</url>
<connection>scm:git:git://github.com/lucee/extension-hibernate.git</connection>
<developerConnection>scm:git:git@github.com:lucee/extension-hibernate.git</developerConnection>
<tag>${project.version}</tag>
</scm>
<licenses>
<license>
<name>The GNU Lesser General Public License, Version 2.1</name>
<url>http://www.gnu.org/licenses/lgpl-2.1.txt</url>
<distribution>repo</distribution>
</license>
</licenses>
<developers>
<developer>
<id>micstriit</id>
<name>Michael Offner</name>
<email>michael@lucee.org</email>
<organization>Lucee Association Switzerland</organization>
<organizationUrl>http://lucee.org</organizationUrl>
<roles>
<role>Project-Administrator</role>
<role>Developer</role>
</roles>
<timezone>+1</timezone>
</developer>
</developers>
<description>Hibernate ORM (Hibernate in short) is an object-relational mapping library for the Java language,
providing a framework for mapping an object-oriented domain model to a traditional relational database.
Hibernate solves object-relational impedance mismatch problems by replacing direct persistence-related
database accesses with high-level object handling functions.</description>
<url>https://github.com/lucee/extension-hibernate</url>
<!-- ============================== Dependencies ============================== -->
<dependencies>
<!-- Lucee (provided — not bundled) -->
<dependency>
<groupId>org.lucee</groupId>
<artifactId>lucee</artifactId>
<version>5.4.6.9</version>
<scope>provided</scope>
</dependency>
<!-- Hibernate core (pulls antlr, dom4j, hibernate-commons-annotations transitively) -->
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>5.6.15.Final</version>
<exclusions>
<!-- Use simple JTA, not JBoss spec (needs javax.interceptor) -->
<exclusion>
<groupId>org.jboss.spec.javax.transaction</groupId>
<artifactId>jboss-transaction-api_1.2_spec</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- Simple JTA (no javax.interceptor dependency) -->
<dependency>
<groupId>javax.transaction</groupId>
<artifactId>jta</artifactId>
<version>1.1</version>
</dependency>
<!-- Hibernate EHCache integration -->
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-ehcache</artifactId>
<version>5.6.15.Final</version>
<exclusions>
<exclusion>
<groupId>net.sf.ehcache</groupId>
<artifactId>ehcache</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- EHCache (Lucee repackaged — specific package structure required) -->
<dependency>
<groupId>net.sf.ehcache.internal</groupId>
<artifactId>ehcache-core</artifactId>
<version>2.10.9.2</version>
</dependency>
<!-- SLF4J API (Hibernate depends on it) -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.36</version>
</dependency>
<!-- Bean Validation API (Hibernate 5.6's TypeSafeActivator has hard javax.validation
imports — Lucee 7+ exposes jakarta.validation via boot delegation, Hibernate
thinks BV is available, then fails loading the javax classes) -->
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
<version>1.1.0.Final</version>
</dependency>
<!-- JAXB (needed for Hibernate XML mapping) -->
<dependency>
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
<version>2.3.3</version>
</dependency>
<dependency>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-runtime</artifactId>
<version>2.3.9</version>
</dependency>
</dependencies>
<!-- ============================== Repositories ============================== -->
<repositories>
<repository>
<id>terracotta</id>
<url>https://repo.terracotta.org/maven2/</url>
</repository>
<repository>
<id>sonatype-central-snapshots</id>
<name>Sonatype Central Snapshots</name>
<url>https://central.sonatype.com/repository/maven-snapshots</url>
<snapshots>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
</snapshots>
</repository>
</repositories>
<!-- ============================== Build ============================== -->
<build>
<sourceDirectory>source/java/src</sourceDirectory>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
<targetPath>${project.build.directory}/extension-resources</targetPath>
</resource>
<!-- Include META-INF/services in the compiled jar -->
<resource>
<directory>source/java/src</directory>
<includes>
<include>META-INF/services/*</include>
</includes>
</resource>
</resources>
<plugins>
<!-- 1. Read build.properties -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>properties-maven-plugin</artifactId>
<version>1.2.1</version>
<executions>
<execution>
<phase>initialize</phase>
<goals>
<goal>read-project-properties</goal>
</goals>
<configuration>
<files>
<file>${project.basedir}/build.properties</file>
</files>
</configuration>
</execution>
</executions>
</plugin>
<!-- 2. Compile -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.13.0</version>
</plugin>
<!-- 3. Rename manifest, copy FLD -->
<plugin>
<groupId>com.coderplus.maven.plugins</groupId>
<artifactId>copy-rename-maven-plugin</artifactId>
<version>1.0.1</version>
<executions>
<execution>
<id>rename-manifest</id>
<phase>process-resources</phase>
<goals>
<goal>rename</goal>
</goals>
<configuration>
<sourceFile>${project.build.directory}/extension-resources/extension-manifest.txt</sourceFile>
<destinationFile>${project.build.directory}/extension-resources/META-INF/MANIFEST.MF</destinationFile>
</configuration>
</execution>
<execution>
<id>copy-fld</id>
<phase>process-resources</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<sourceFile>${project.basedir}/source/fld/ormFunctions.fld</sourceFile>
<destinationFile>${project.build.directory}/extension-resources/flds/ormFunctions.fld</destinationFile>
</configuration>
</execution>
<execution>
<id>rename-lex</id>
<phase>verify</phase>
<goals>
<goal>rename</goal>
</goals>
<configuration>
<sourceFile>${project.build.directory}/${project.artifactId}-${project.version}.zip</sourceFile>
<destinationFile>${project.build.directory}/${project.artifactId}-${project.version}.lex</destinationFile>
</configuration>
</execution>
</executions>
</plugin>
<!-- 4. Create extension jar with OSGi manifest -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.4.2</version>
<configuration>
<archive>
<manifestFile>source/java/src/META-INF/MANIFEST.MF</manifestFile>
<manifestEntries>
<Bundle-SymbolicName>${bundlename}</Bundle-SymbolicName>
<Bundle-Version>${project.version}</Bundle-Version>
<Built-Date>${build.timestamp}</Built-Date>
</manifestEntries>
</archive>
</configuration>
</plugin>
<!-- 5. Shade ALL deps into one fat jar (same approach as Ortus) -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.6.0</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<manifestEntries>
<Bundle-SymbolicName>${bundlename}</Bundle-SymbolicName>
<Bundle-Version>${project.version}</Bundle-Version>
<Built-Date>${build.timestamp}</Built-Date>
<!-- Required: Hibernate's Version.getVersionString() reads this at runtime.
Without it, the shaded jar reports [WORKING] instead of the real version. -->
<Implementation-Version>5.6.15.Final</Implementation-Version>
</manifestEntries>
</transformer>
</transformers>
<!-- Relocate ehcache classes to a private namespace so they never
conflict with the ehcache Lucee extension's OSGi-exported copy.
Without this, both bundles have net.sf.ehcache.* classes loaded by
different BundleClassLoaders → ClassCastException. -->
<relocations>
<relocation>
<pattern>net.sf.ehcache</pattern>
<shadedPattern>org.lucee.extension.orm.hibernate.shaded.net.sf.ehcache</shadedPattern>
</relocation>
</relocations>
<createDependencyReducedPom>false</createDependencyReducedPom>
</configuration>
</execution>
</executions>
</plugin>
<!-- 6. Copy fat jar to target/jars/ with bundle name -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>3.1.0</version>
<executions>
<execution>
<id>copy-extension-jar</id>
<phase>package</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
<mkdir dir="${project.build.directory}/jars"/>
<copy file="${project.build.directory}/${project.artifactId}-${project.version}.jar"
tofile="${project.build.directory}/jars/${bundlename}-${project.version}.jar"/>
</target>
</configuration>
</execution>
</executions>
</plugin>
<!-- 6. Assemble .lex -->
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.7.1</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
<configuration>
<descriptors>
<descriptor>src/assembly/lex.xml</descriptor>
</descriptors>
<finalName>${project.artifactId}-${project.version}</finalName>
<appendAssemblyId>false</appendAssemblyId>
<attach>false</attach>
</configuration>
</plugin>
<!-- 7. Attach .lex as artifact -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>3.6.0</version>
<executions>
<execution>
<id>attach-lex</id>
<phase>verify</phase>
<goals>
<goal>attach-artifact</goal>
</goals>
<configuration>
<artifacts>
<artifact>
<file>${project.build.directory}/${project.artifactId}-${project.version}.lex</file>
<type>lex</type>
</artifact>
</artifacts>
</configuration>
</execution>
</executions>
</plugin>
<!-- Central Publishing -->
<plugin>
<groupId>org.sonatype.central</groupId>
<artifactId>central-publishing-maven-plugin</artifactId>
<version>0.10.0</version>
<extensions>true</extensions>
<configuration>
<publishingServerId>ossrh</publishingServerId>
<autoPublish>true</autoPublish>
</configuration>
</plugin>
</plugins>
</build>
<!-- ============================== Profiles ============================== -->
<profiles>
<profile>
<id>release-sign-artifacts</id>
<activation>
<property>
<name>performRelease</name>
<value>true</value>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>3.0.1</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
<configuration>
<files>
<file>${project.build.directory}/${project.artifactId}-${project.version}.lex</file>
</files>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>