pom.xml 6.55 KB
Newer Older
1
<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/maven-v4_0_0.xsd">
2
    <modelVersion>4.0.0</modelVersion>
3
4
    <parent>
        <groupId>org.bonitasoft.distrib</groupId>
5
        <artifactId>bonita-distrib</artifactId>
6
        <version>7.12.6-SNAPSHOT</version>
7
8
9
10
    </parent>
    <artifactId>bundle-tomcat</artifactId>
    <name>tomcat bundle</name>
    <packaging>pom</packaging>
11

12
    <properties>
13
        <zipName>BonitaCommunity-${branding.version}</zipName>
14
        <bundle.dir>${project.build.directory}/${zipName}</bundle.dir>
15
    </properties>
16

17
18
19
20
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
21
                <artifactId>maven-dependency-plugin</artifactId>
22
23
                <executions>
                    <execution>
24
                        <id>unpack-tomcat-distrib-for-bonita</id>
25
26
                        <phase>generate-resources</phase>
                        <goals>
27
                            <goal>unpack</goal>
28
29
                        </goals>
                        <configuration>
30
31
                            <artifactItems>
                                <artifactItem>
32
33
34
                                    <groupId>org.bonitasoft.distrib.tomcat</groupId>
                                    <artifactId>tomcat-distrib-for-bonita</artifactId>
                                    <version>${project.version}</version>
35
36
                                    <type>zip</type>
                                    <overWrite>true</overWrite>
37
                                    <outputDirectory>${bundle.dir}/server</outputDirectory>
38
39
                                </artifactItem>
                            </artifactItems>
40
41
42
                        </configuration>
                    </execution>
                    <execution>
43
                        <id>unpack-platform_setup</id>
44
45
46
47
48
49
50
                        <phase>generate-resources</phase>
                        <goals>
                            <goal>unpack</goal>
                        </goals>
                        <configuration>
                            <artifactItems>
                                <artifactItem>
51
52
53
                                    <groupId>org.bonitasoft.platform</groupId>
                                    <artifactId>platform-setup</artifactId>
                                    <version>${bonita.engine.version}</version>
54
55
56
57
                                    <type>zip</type>
                                    <overWrite>true</overWrite>
                                </artifactItem>
                            </artifactItems>
58
                            <outputDirectory>${bundle.dir}/setup</outputDirectory>
59
60
61
                        </configuration>
                    </execution>
                    <execution>
62
                        <id>get-bonita-war</id>
63
64
                        <phase>generate-resources</phase>
                        <goals>
65
                            <goal>copy</goal>
66
67
                        </goals>
                        <configuration>
68
69
70
71
72
73
74
75
76
77
78
                            <artifactItems>
                                <artifactItem>
                                    <groupId>org.bonitasoft.distrib</groupId>
                                    <artifactId>bonita-war</artifactId>
                                    <version>${project.version}</version>
                                    <type>war</type>
                                    <overWrite>true</overWrite>
                                    <destFileName>bonita.war</destFileName>
                                    <outputDirectory>${bundle.dir}/server/webapps</outputDirectory>
                                </artifactItem>
                            </artifactItems>
79
80
81
82
                        </configuration>
                    </execution>
                </executions>
            </plugin>
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
            <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-antrun-plugin</artifactId>
            <executions>
            <execution>
                <id>prepare-tomcat-bundle</id>
                <phase>prepare-package</phase>
                <goals>
                    <goal>run</goal>
                </goals>
                <configuration>
                    <target name="Prepare the Tomcat bundle">
                        <chmod perm="ugo+x">
                            <fileset dir="${bundle.dir}">
                                <include name="*.sh" />
                            </fileset>
                        </chmod>
                    </target>
                </configuration>
            </execution>
            </executions>
            </plugin>
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
            <plugin>
                <artifactId>maven-resources-plugin</artifactId>
                <executions>
                    <execution>
                        <id>copy-resources</id>
                        <phase>generate-resources</phase>
                        <goals>
                            <goal>copy-resources</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>${bundle.dir}</outputDirectory>
                            <resources>
                                <resource>
                                    <directory>src/main/resources</directory>
                                </resource>
                            </resources>
                        </configuration>
                    </execution>
                </executions>
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-assembly-plugin</artifactId>
                <executions>
                    <execution>
                        <id>generate-package</id>
                        <phase>package</phase>
                        <goals>
                            <goal>single</goal>
                        </goals>
                        <configuration>
                            <ignoreDirFormatExtensions>true</ignoreDirFormatExtensions>
                            <finalName>${zipName}</finalName>
                            <appendAssemblyId>false</appendAssemblyId>
                            <descriptors>
                                <descriptor>assembly.xml</descriptor>
                            </descriptors>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
148
</project>