1 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
\r
2 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
\r
3 <modelVersion>4.0.0</modelVersion>
\r
5 <groupId>jp.seraphyware.charactermanaj</groupId>
\r
6 <artifactId>CharacterManaJ</artifactId>
\r
7 <version>0.9.9.8</version>
\r
9 <url>https://osdn.net/projects/charactermanaj/</url>
\r
12 <buildBy>seraphy@users.osdn.me</buildBy>
\r
13 <mainClass>charactermanaj.CharacterManaJ</mainClass>
\r
14 <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
\r
15 <maven.compiler.source>1.5</maven.compiler.source>
\r
16 <maven.compiler.target>1.5</maven.compiler.target>
\r
17 <animalSnifferArtifact>java15</animalSnifferArtifact>
\r
18 <animalSnifferArtifactVersion>1.0</animalSnifferArtifactVersion>
\r
19 <maven.build.timestamp.format>yyyy-MM-dd</maven.build.timestamp.format>
\r
23 <!-- https://mvnrepository.com/artifact/com.apple/AppleJavaExtensions -->
\r
25 <groupId>com.apple</groupId>
\r
26 <artifactId>AppleJavaExtensions</artifactId>
\r
27 <version>1.4</version>
\r
28 <scope>provided</scope>
\r
33 <groupId>junit</groupId>
\r
34 <artifactId>junit</artifactId>
\r
35 <version>4.11</version>
\r
43 <!-- コンパイラープラグイン -->
\r
44 <groupId>org.apache.maven.plugins</groupId>
\r
45 <artifactId>maven-compiler-plugin</artifactId>
\r
46 <version>3.1</version>
\r
48 <source>${maven.compiler.source}</source>
\r
49 <target>${maven.compiler.target}</target>
\r
50 <compilerArgument>-Xlint:all</compilerArgument>
\r
55 <groupId>org.codehaus.mojo</groupId>
\r
56 <artifactId>animal-sniffer-maven-plugin</artifactId>
\r
57 <version>1.16</version>
\r
60 <groupId>org.codehaus.mojo.signature</groupId>
\r
61 <artifactId>${animalSnifferArtifact}</artifactId>
\r
62 <version>${animalSnifferArtifactVersion}</version>
\r
64 <ignoreDependencies>true</ignoreDependencies>
\r
68 <id>check-java-api</id>
\r
77 <!-- 実行可能jar本体のパッケージを行う (package時) -->
\r
78 <groupId>org.apache.maven.plugins</groupId>
\r
79 <artifactId>maven-jar-plugin</artifactId>
\r
80 <version>2.6</version>
\r
82 <finalName>${project.artifactId}</finalName>
\r
85 <mainClass>${mainClass}</mainClass>
\r
86 <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
\r
87 <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
\r
90 <!-- 起動時のスプラッシュ画像 -->
\r
91 <SplashScreen-Image>splash.png</SplashScreen-Image>
\r
92 <Built-By>${buildBy}</Built-By>
\r
93 <Build-At>${maven.build.timestamp}</Build-At>
\r
94 <Implementation-Vendor><![CDATA[Copyright (C) ${maven.build.timestamp} ${buildBy}]]></Implementation-Vendor>
\r
104 <!-- Windowsの場合のビルド -->
\r
105 <id>windows-profile</id>
\r
108 <family>windows</family>
\r
112 <jre.dir>${java.home}</jre.dir>
\r
117 <!-- Launch4jによるjarファイルのexe化を行う. http://launch4j.sourceforge.net/docs.html -->
\r
118 <groupId>org.bluestemsoftware.open.maven.plugin</groupId>
\r
119 <artifactId>launch4j-plugin</artifactId>
\r
120 <version>1.5.0.0</version>
\r
124 <phase>package</phase>
\r
126 <goal>launch4j</goal>
\r
129 <headerType>gui</headerType>
\r
130 <outfile>target/${project.artifactId}.exe</outfile>
\r
131 <jar>target/${project.artifactId}.jar</jar>
\r
132 <errTitle>Failed to execute the ${project.artifactId}</errTitle>
\r
133 <icon>icon.ico</icon>
\r
136 <minVersion>1.5.0</minVersion>
\r
137 <initialHeapSize>64</initialHeapSize>
\r
138 <maxHeapSize>128</maxHeapSize>
\r
141 <fileVersion>${project.version}</fileVersion>
\r
142 <txtFileVersion>${project.version}</txtFileVersion>
\r
143 <fileDescription>${project.artifactId}</fileDescription>
\r
144 <copyright>${maven.build.timestamp} ${buildBy}</copyright>
\r
145 <productVersion>${project.version}</productVersion>
\r
146 <txtProductVersion>${project.version}</txtProductVersion>
\r
147 <productName>${project.artifactId}</productName>
\r
148 <internalName>${project.artifactId}</internalName>
\r
149 <originalFilename>${project.artifactId}.exe</originalFilename>
\r
156 <groupId>org.apache.maven.plugins</groupId>
\r
157 <artifactId>maven-assembly-plugin</artifactId>
\r
158 <version>2.6</version>
\r
161 <!-- JREつきの配布用zipを生成する -->
\r
162 <id>create-distribution-with-jre</id>
\r
163 <phase>package</phase>
\r
165 <goal>single</goal>
\r
168 <finalName>${project.artifactId}_${project.version}_with_JRE.zip</finalName>
\r
169 <appendAssemblyId>false</appendAssemblyId>
\r
171 <descriptor>src/main/assembly/charactermanaj_with_jre_zip.xml</descriptor>
\r
176 <!-- JRE無しの配布用zipを生成する -->
\r
177 <id>create-distribution</id>
\r
178 <phase>package</phase>
\r
180 <goal>single</goal>
\r
183 <finalName>${project.artifactId}_${project.version}.zip</finalName>
\r
184 <appendAssemblyId>false</appendAssemblyId>
\r
186 <descriptor>src/main/assembly/charactermanaj_zip.xml</descriptor>
\r
197 <!-- MAC OSXの場合のビルド -->
\r
198 <id>osx-profile</id>
\r
201 <family>mac</family>
\r
205 <!-- ${hava.home}は、
\r
206 /Library/Java/JavaVirtualMachines/jdkXXX.jdk/Contents/Home/jre/ を指すので
\r
207 /Library/Java/JavaVirtualMachines/jdkXXX.jdk/ を指すように親を3つ戻す -->
\r
208 <copyJrePath>${java.home}/../../../</copyJrePath>
\r
213 <!-- MacのAppBundleを作成する
\r
214 https://github.com/federkasten/appbundle-maven-plugin
\r
215 https://stackoverflow.com/questions/39193868/bundle-java-program-for-mac-users-with-maven-from-gnu-linux
\r
217 <groupId>sh.tak.appbundler</groupId>
\r
218 <artifactId>appbundle-maven-plugin</artifactId>
\r
219 <version>1.2.0</version>
\r
221 <mainClass>${mainClass}</mainClass>
\r
222 <iconFile>icon.icns</iconFile>
\r
223 <workingDirectory>$APP_ROOT/../</workingDirectory>
\r
224 <generateDiskImageFile>true</generateDiskImageFile>
\r
226 <jvmOption>-splash:$APP_ROOT/Contents/Resources/splash.png</jvmOption>
\r
227 <jvmOption>-Xms96m</jvmOption>
\r
228 <jvmOption>-Xmx128m</jvmOption>
\r
230 <additionalResources>
\r
232 <directory>src/main/attachment</directory>
\r
234 <include>README_mac.txt</include>
\r
238 <directory>src/main/attachment/bundle</directory>
\r
240 <include>**/*</include>
\r
243 </additionalResources>
\r
249 <diskImageFile>${project.build.directory}/${project.artifactId}_${project.version}.dmg</diskImageFile>
\r
251 <phase>package</phase>
\r
253 <goal>bundle</goal>
\r
257 <id>MakeDMGWithJRE</id>
\r
259 <jrePath>${copyJrePath}</jrePath>
\r
260 <diskImageFile>${project.build.directory}/${project.artifactId}_${project.version}_with_JRE.dmg</diskImageFile>
\r
262 <phase>package</phase>
\r
264 <goal>bundle</goal>
\r