10e1aa6bba5e213825ea9e36d4e39373b4817d6c
[jalview.git] / getdown / src / getdown / launcher / pom.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <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">
3   <modelVersion>4.0.0</modelVersion>
4   <parent>
5     <groupId>com.threerings.getdown</groupId>
6     <artifactId>getdown</artifactId>
7     <version>1.8.3-SNAPSHOT</version>
8   </parent>
9
10   <artifactId>getdown-launcher</artifactId>
11   <packaging>jar</packaging>
12   <name>Getdown Launcher</name>
13   <description>The Getdown app updater/launcher</description>
14
15   <repositories>
16     <repository>
17       <id>lib-repo</id>
18       <url>file://${basedir}/../lib</url>
19     </repository>
20   </repositories>
21
22   <dependencies>
23     <dependency>
24       <groupId>com.threerings.getdown</groupId>
25       <artifactId>getdown-core</artifactId>
26       <version>${project.version}</version>
27     </dependency>
28     <dependency>
29       <groupId>com.samskivert</groupId>
30       <artifactId>samskivert</artifactId>
31       <version>1.2</version>
32     </dependency>
33     <dependency>
34       <groupId>jregistrykey</groupId>
35       <artifactId>jregistrykey</artifactId>
36       <version>1.0</version>
37       <optional>true</optional>
38     </dependency>
39   </dependencies>
40
41   <build>
42     <plugins>
43       <plugin>
44         <groupId>com.github.wvengen</groupId>
45         <artifactId>proguard-maven-plugin</artifactId>
46         <version>2.0.14</version>
47         <executions>
48          <execution>
49            <phase>package</phase>
50            <goals>
51              <goal>proguard</goal>
52            </goals>
53          </execution>
54         </executions>
55         <dependencies>
56           <dependency>
57             <groupId>net.sf.proguard</groupId>
58             <artifactId>proguard-base</artifactId>
59             <version>6.0.3</version>
60             <scope>runtime</scope>
61           </dependency>
62         </dependencies>
63         <configuration>
64           <proguardVersion>6.0.3</proguardVersion>
65           <outputDirectory>${project.build.directory}</outputDirectory>
66           <outjar>${project.build.finalName}.jar</outjar>
67           <injar>${project.build.finalName}.jar</injar>
68           <assembly>
69             <inclusions>
70               <inclusion>
71                 <groupId>com.threerings.getdown</groupId>
72                 <artifactId>getdown-core</artifactId>
73               </inclusion>
74               <inclusion>
75                 <groupId>com.samskivert</groupId>
76                 <artifactId>samskivert</artifactId>
77                 <filter>
78                   !**/*.java,
79                   !**/swing/RuntimeAdjust*,
80                   !**/swing/util/ButtonUtil*,
81                   !**/util/CalendarUtil*,
82                   !**/util/Calendars*,
83                   !**/util/Log4JLogger*,
84                   !**/util/PrefsConfig*,
85                   !**/util/SignalUtil*,
86                   com/samskivert/Log.class,
87                   **/samskivert/io/**,
88                   **/samskivert/swing/**,
89                   **/samskivert/text/**,
90                   **/samskivert/util/**
91                 </filter>
92               </inclusion>
93               <inclusion>
94                 <groupId>jregistrykey</groupId>
95                 <artifactId>jregistrykey</artifactId>
96               </inclusion>
97             </inclusions>
98           </assembly>
99           <obfuscate>true</obfuscate>
100           <options>
101             <option>-keep public class com.threerings.getdown.** { *; }</option>
102             <option>-keep public class ca.beq.util.win32.registry.** { *; }</option>
103             <option>-keepattributes Exceptions, InnerClasses, Signature</option>
104           </options>
105           <libs>
106             <lib>${rt.jar.path}</lib>
107           </libs>
108           <addMavenDescriptor>false</addMavenDescriptor>
109         </configuration>
110       </plugin>
111
112       <plugin>
113         <groupId>org.apache.maven.plugins</groupId>
114         <artifactId>maven-jar-plugin</artifactId>
115         <version>3.1.0</version>
116         <configuration>
117           <archive>
118             <manifest>
119               <mainClass>com.threerings.getdown.launcher.GetdownApp</mainClass>
120             </manifest>
121             <manifestEntries>
122               <Permissions>all-permissions</Permissions>
123               <Application-Name>Getdown</Application-Name>
124               <Codebase>*</Codebase>
125               <Application-Library-Allowable-Codebase>*</Application-Library-Allowable-Codebase>
126               <Caller-Allowable-Codebase>*</Caller-Allowable-Codebase>
127               <Trusted-Library>true</Trusted-Library>
128             </manifestEntries>
129           </archive>
130         </configuration>
131       </plugin>
132
133       <plugin>
134         <groupId>org.apache.maven.plugins</groupId>
135         <artifactId>maven-shade-plugin</artifactId>
136         <version>3.2.1</version>
137         <configuration>
138           <!-- put your configurations here -->
139         </configuration>
140         <executions>
141           <execution>
142             <phase>package</phase>
143             <goals>
144               <goal>shade</goal>
145             </goals>
146           </execution>
147         </executions>
148       </plugin>
149
150
151
152
153     </plugins>
154   </build>
155
156   <profiles>
157     <!-- finagling to find rt.jar -->
158     <profile>
159       <id>non-mac-jre</id>
160       <activation>
161         <file><exists>${java.home}/../lib/rt.jar</exists></file>
162       </activation>
163       <properties>
164         <rt.jar.path>${java.home}/../lib/rt.jar</rt.jar.path>
165       </properties>
166     </profile>
167     <profile>
168       <id>non-mac-jdk</id>
169       <activation>
170         <file><exists>${java.home}/lib/rt.jar</exists></file>
171       </activation>
172       <properties>
173         <rt.jar.path>${java.home}/lib/rt.jar</rt.jar.path>
174       </properties>
175     </profile>
176     <profile>
177       <id>java-9-jdk</id>
178       <activation>
179         <file><exists>${java.home}/jmods/java.base.jmod</exists></file>
180       </activation>
181       <build>
182         <plugins>
183           <plugin>
184             <groupId>com.github.wvengen</groupId>
185             <artifactId>proguard-maven-plugin</artifactId>
186             <configuration>
187               <libs>
188                 <lib>${java.home}/jmods/java.base.jmod</lib>
189                 <lib>${java.home}/jmods/java.desktop.jmod</lib>
190                 <lib>${java.home}/jmods/java.logging.jmod</lib>
191                 <lib>${java.home}/jmods/jdk.jsobject.jmod</lib>
192               </libs>
193             </configuration>
194           </plugin>
195         </plugins>
196       </build>
197     </profile>
198   </profiles>
199 </project>