blob: 22bcd0b6fc65ac559ed9c72d05b87d0c0f94284e [file] [log] [blame]
arjantijmsefe3cd12021-08-22 00:40:59 +02001<?xml version="1.0" encoding="UTF-8"?>
Vinay Vishal57171472018-09-18 20:22:00 +05302<!--
3
hussainnm53712522021-02-18 19:46:31 +05304 Copyright (c) 2010, 2021 Oracle and/or its affiliates. All rights reserved.
Vinay Vishal57171472018-09-18 20:22:00 +05305
6 This program and the accompanying materials are made available under the
7 terms of the Eclipse Public License v. 2.0, which is available at
8 http://www.eclipse.org/legal/epl-2.0.
9
10 This Source Code may also be made available under the following Secondary
11 Licenses when the conditions for such availability set forth in the
12 Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
13 version 2 with the GNU Classpath Exception, which is available at
14 https://www.gnu.org/software/classpath/license.html.
15
16 SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
17
18-->
19
20<!--
21 This module is meant to serve as the example of how to add additional files to the GlassFish distribution.
22-->
arjantijmsefe3cd12021-08-22 00:40:59 +020023<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">
Vinay Vishal57171472018-09-18 20:22:00 +053024 <modelVersion>4.0.0</modelVersion>
arjantijmsefe3cd12021-08-22 00:40:59 +020025
Vinay Vishal57171472018-09-18 20:22:00 +053026 <parent>
27 <groupId>org.glassfish.main.ejb</groupId>
28 <artifactId>ejb</artifactId>
Eclipse Glassfish Botad914142021-08-26 23:17:42 +000029 <version>6.2.1</version>
Vinay Vishal57171472018-09-18 20:22:00 +053030 </parent>
31
32 <artifactId>ejb-timer-databases</artifactId>
Vinay Vishal57171472018-09-18 20:22:00 +053033 <!--
34 This packaging specifies that it's a package that contains files to be added to
35 the distribution.
36
37 In this packaging mode, the build will produce a jar, like it normally does for
38 the <packaging>jar</packaging>, but the contents of this jar is then extracted
39 when the final GlassFish distribution is assembled. (But when this happens,
40 META-INF/** in the jar will be ignored.)
41
42 For a fragment to be added to the distribution, the distribution POM needs
43 to directly or indirectly depend on the fragment module. This is normally
44 done by creating a feature-level grouping POM (which allows you to bundle multiple
45 modules and treat it as a single dependency - see the webtier-all module for example),
46 and have that declare a dependency on the fragment, instead of directly
47 modifying the distribution POM.
48
49 So the idea here is that individual technology area will create their own
50 fragments that contain pieces that they need, and when the said technology
51 is bundled in GF, the corresponding fragment will be also added, thanks to
52 the transitive dependency handling in Maven.
53 -->
54 <packaging>distribution-fragment</packaging>
55
arjantijmsefe3cd12021-08-22 00:40:59 +020056 <name>GlassFish EJB timer app database init scripts</name>
57
58 <dependencies>
59 <dependency>
60 <groupId>${project.groupId}</groupId>
61 <artifactId>ejb-timer-service-app</artifactId>
62 <version>${project.version}</version>
63 <type>war</type>
64 </dependency>
65 </dependencies>
66
67 <build><!--
Vinay Vishal57171472018-09-18 20:22:00 +053068 In this module, all the files are statically stored as-is in the Subversion repository,
69 so the simple copying from src/main/resources to target/classes that Maven does by default
70 is suffice.
71
72 But in more complex scenario, one can use maven-antrun-extended-plugin and use a series of Ant tasks
73 to perform processing on resources, such as token replacement, file generation, pre-processing, etc.
74
75 The following section shows how you can do this.
76 -->
77 <plugins>
78 <plugin>
79 <groupId>org.jvnet.maven-antrun-extended-plugin</groupId>
80 <artifactId>maven-antrun-extended-plugin</artifactId>
81 <executions>
82 <execution>
83 <phase>generate-sources</phase>
84 <configuration>
85 <tasks>
86 <!-- place the ejb timer app jar into the location -->
87 <resolveArtifact artifactId="ejb-timer-service-app" tofile="target/classes/glassfish/lib/install/applications/ejb-timer-service-app.war" />
88 </tasks>
89 </configuration>
90 <goals>
91 <goal>run</goal>
92 </goals>
93 </execution>
94 </executions>
95 </plugin>
96 </plugins>
97 </build>
Vinay Vishal57171472018-09-18 20:22:00 +053098</project>