pom.xml 9.7 KB
Newer Older
J
jurgen 已提交
1
<?xml version="1.0" encoding="UTF-8"?>
2 3 4 5 6 7
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
         xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <modelVersion>4.0.0</modelVersion>
    <groupId>org.jkiss.dbeaver</groupId>
    <artifactId>dbeaver</artifactId>
8
    <version>1.0.0-SNAPSHOT</version>
9
    <packaging>pom</packaging>
J
jurgen 已提交
10

11
    <properties>
S
Serge Rider 已提交
12
        <dbeaver-version>21.2.2</dbeaver-version>
13
        <dbeaver-product>DBeaver</dbeaver-product>
14
        <tycho-version>2.1.0</tycho-version>
15
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
S
Serge Rider 已提交
16
        <maven.build.timestamp.format>yyyyMMddHHmm</maven.build.timestamp.format>
S
serge-rider 已提交
17

18
        <local-p2-repo.url>https://dbeaver.io/eclipse-repo</local-p2-repo.url>
S
Serge Rider 已提交
19
        <eclipse-p2-repo.url>https://download.eclipse.org/releases/2021-06/</eclipse-p2-repo.url>
20

21 22
        <key.storage.path>/etc/</key.storage.path>
        <tsa/>
23
    </properties>
J
jurgen 已提交
24

25
    <modules>
S
Serge Rider 已提交
26 27 28
        <module>bundles</module>
        <module>plugins</module>
        <module>features</module>
29
    </modules>
J
jurgen 已提交
30

31 32
    <repositories>
        <repository>
S
serge-rider 已提交
33 34
            <id>local-contrib</id>
            <url>${local-p2-repo.url}</url>
35 36
            <layout>p2</layout>
        </repository>
37
        <repository>
S
serge-rider 已提交
38 39
            <id>eclipse-p2-repo</id>
            <url>${eclipse-p2-repo.url}</url>
40 41
            <layout>p2</layout>
        </repository>
42
    </repositories>
J
jurgen 已提交
43

44
    <build>
45 46
        <sourceDirectory>${project.basedir}/src</sourceDirectory>
        <testSourceDirectory>${project.basedir}/tests</testSourceDirectory>
47
        <plugins>
J
jurgen 已提交
48

S
Serge Rider 已提交
49 50 51 52 53 54 55 56 57 58

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-resources-plugin</artifactId>
                <version>2.6</version>
                <configuration>
                    <resources>
                    </resources>
                </configuration>
            </plugin>
S
Serge Rider 已提交
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
            <!-- Tycho build -->
            <plugin>
                <groupId>org.eclipse.tycho</groupId>
                <artifactId>target-platform-configuration</artifactId>
                <version>${tycho-version}</version>
                <configuration>
                    <environments>
                        <environment>
                            <os>win32</os>
                            <ws>win32</ws>
                            <arch>x86_64</arch>
                        </environment>
                        <environment>
                            <os>linux</os>
                            <ws>gtk</ws>
                            <arch>x86_64</arch>
                        </environment>
                        <environment>
                            <os>macosx</os>
                            <ws>cocoa</ws>
                            <arch>x86_64</arch>
                        </environment>
                    </environments>
                </configuration>
S
serge-rider 已提交
84

85
            </plugin>
J
jurgen 已提交
86

87 88 89 90 91 92
            <plugin>
                <groupId>org.eclipse.tycho</groupId>
                <artifactId>tycho-maven-plugin</artifactId>
                <version>${tycho-version}</version>
                <extensions>true</extensions>
            </plugin>
S
Serge Rider 已提交
93

94 95 96 97 98
            <plugin>
                <groupId>org.eclipse.tycho</groupId>
                <artifactId>tycho-compiler-plugin</artifactId>
                <version>${tycho-version}</version>
                <configuration>
99
                    <useProjectSettings>false</useProjectSettings>
100
                    <source>1.8</source>
101
                    <target>11</target>
102
                    <compilerVersion>1.8</compilerVersion>
103 104
                    <compilerArgs>
                        <!--
S
Serge Rider 已提交
105 106 107
                            Java 11-compatibility options.
                            We still need sun.security.
                            ignore.symbol.file is a legacy flag
108 109 110 111 112 113 114 115
                        -->
                        <compilerArg>-XDignore.symbol.file=true</compilerArg>

                        <compilerArg>--add-exports</compilerArg>
                        <compilerArg>java.base/sun.security.util=ALL-UNNAMED</compilerArg>
                        <compilerArg>--add-exports</compilerArg>
                        <compilerArg>java.base/sun.security.x509=ALL-UNNAMED</compilerArg>
                    </compilerArgs>
116 117
                </configuration>
            </plugin>
J
jurgen 已提交
118

S
Serge Rider 已提交
119 120 121 122 123 124 125 126
            <!-- Set Built-By info -->
            <plugin>
                <groupId>org.eclipse.tycho</groupId>
                <artifactId>tycho-packaging-plugin</artifactId>
                <version>${tycho-version}</version>
                <configuration>
                    <archive>
                        <manifestEntries>
127 128
                            <Built-By>dbeaver.io</Built-By>
                            <Created-By>dbeaver.io</Created-By>
S
Serge Rider 已提交
129
                            <Build-Time>${maven.build.timestamp}</Build-Time>
S
Serge Rider 已提交
130 131 132 133 134 135
                        </manifestEntries>
                        <addMavenDescriptor>false</addMavenDescriptor>
                    </archive>
                </configuration>
            </plugin>

136
        </plugins>
S
Serge Rider 已提交
137

138
    </build>
S
serge-rider 已提交
139 140

    <profiles>
S
serge-rider 已提交
141
        <!-- desktop build: includes UI components and products -->
S
Serge Rider 已提交
142
        <profile>
S
serge-rider 已提交
143 144 145 146 147 148 149 150
            <id>desktop</id>
            <activation><property><name>!headless-platform</name></property></activation>
            <modules>
                <!-- Tests -->
                <module>test</module>

                <!-- Products -->
                <module>product/appstore</module>
151
                <module>product/community</module>
S
serge-rider 已提交
152 153
                <module>product/repositories</module>
            </modules>
S
Serge Rider 已提交
154 155
        </profile>

S
serge-rider 已提交
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
        <!-- Enables build for all platforms including ARM -->
        <profile>
            <id>all-platforms</id>
            <activation>
                <activeByDefault>false</activeByDefault>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.eclipse.tycho</groupId>
                        <artifactId>target-platform-configuration</artifactId>
                        <version>${tycho-version}</version>
                        <configuration>
                            <environments>
                                <environment>
                                    <os>win32</os>
                                    <ws>win32</ws>
                                    <arch>x86_64</arch>
                                </environment>
                                <environment>
                                    <os>linux</os>
                                    <ws>gtk</ws>
                                    <arch>x86_64</arch>
                                </environment>
                                <environment>
                                    <os>linux</os>
                                    <ws>gtk</ws>
                                    <arch>aarch64</arch>
                                </environment>
                                <environment>
                                    <os>macosx</os>
                                    <ws>cocoa</ws>
                                    <arch>x86_64</arch>
                                </environment>
S
Serge Rider 已提交
190 191 192 193 194
                                <environment>
                                    <os>macosx</os>
                                    <ws>cocoa</ws>
                                    <arch>aarch64</arch>
                                </environment>
S
serge-rider 已提交
195 196 197 198 199 200 201
                            </environments>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>

S
Serge Rider 已提交
202
        <!-- Profile for jars sign -->
S
serge-rider 已提交
203 204 205 206 207 208 209 210
        <profile>
            <id>sign-code</id>
            <activation>
                <activeByDefault>false</activeByDefault>
            </activation>
            <build>
                <plugins>
                    <plugin>
S
serge-rider 已提交
211 212 213 214 215 216
                        <!--
                            Jar sign can be slow, especially if you need to sign hundreds of them.
                            Performance hints:
                                - Force SHA512withRSA algorithm (https://stackoverflow.com/questions/44003975/ev-code-signing-extremely-slow)
                                - Install fast secure random generator (https://stackoverflow.com/questions/137212/how-to-deal-with-a-slow-securerandom-generator)
                         -->
S
serge-rider 已提交
217 218
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-jarsigner-plugin</artifactId>
S
Serge Rider 已提交
219
                        <version>3.0.0</version>
S
serge-rider 已提交
220 221
                        <configuration>
                            <keystore>${key.storage.path}/jar-sign.keystore</keystore>
222 223
                            <tsa>${tsa}</tsa>
                            <tsacert>dbeaver</tsacert>
S
serge-rider 已提交
224 225 226
                            <storepass>dbeaver</storepass>
                            <alias>dbeaver</alias>
                            <keypass>dbeaver</keypass>
S
serge-rider 已提交
227 228 229 230
                            <arguments>
                                <argument>-sigalg</argument>
                                <argument>SHA512withRSA</argument>
                            </arguments>
S
serge-rider 已提交
231 232 233 234 235 236 237 238 239 240 241 242 243 244 245
                        </configuration>
                        <executions>
                            <execution>
                                <id>sign</id>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

J
jurgen 已提交
246
</project>