1 <project xmlns="http://maven.apache.org/POM/4.0.0"
2 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4 <modelVersion>4.0.0</modelVersion>
6 <groupId>jp.seraphyware.charactermanaj</groupId>
7 <artifactId>CharacterManaJ</artifactId>
8 <version>0.9.9.9</version>
10 <url>https://osdn.net/projects/charactermanaj/</url>
13 <connection>scm:git:https://scm.osdn.net/gitroot/charactermanaj/CharacterManaJ.git</connection>
15 <url>https://osdn.net/projects/charactermanaj/scm/git/CharacterManaJ/</url>
19 <name>seraphyware</name>
20 <url>https://osdn.net/projects/charactermanaj/</url>
27 <email>seraphy@users.osdn.me</email>
28 <url>https://osdn.net/users/seraphy/</url>
29 <organization>seraphyware</organization>
31 <role>architect</role>
32 <role>developer</role>
34 <timezone>Asia/Tokyo</timezone>
39 <mainClass>charactermanaj.CharacterManaJ</mainClass>
40 <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
41 <maven.compiler.source>1.6</maven.compiler.source>
42 <maven.compiler.target>1.6</maven.compiler.target>
43 <animalSnifferArtifact>java16</animalSnifferArtifact>
44 <animalSnifferArtifactVersion>1.1</animalSnifferArtifactVersion>
45 <maven.build.timestamp.format>yyyy-MM-dd</maven.build.timestamp.format>
49 <!-- https://mvnrepository.com/artifact/com.apple/AppleJavaExtensions -->
51 <groupId>com.apple</groupId>
52 <artifactId>AppleJavaExtensions</artifactId>
53 <version>1.4</version>
54 <scope>provided</scope>
59 <groupId>junit</groupId>
60 <artifactId>junit</artifactId>
61 <version>4.11</version>
68 <!-- 現在時刻からユニークなビルド番号を生成する
69 (使うか否かに関わらず、SCMの設定が必要。
70 buildNumberの連番を使う場合はローカルにプロパティファイルが作成される) -->
72 <groupId>org.codehaus.mojo</groupId>
73 <artifactId>buildnumber-maven-plugin</artifactId>
74 <version>1.4</version>
77 <phase>validate</phase>
84 <doCheck>false</doCheck>
85 <doUpdate>true</doUpdate>
86 <format>{0,date,yyyyMM}.{0,date,ddHHmm}</format>
88 <item>timestamp</item>
94 <groupId>org.apache.maven.plugins</groupId>
95 <artifactId>maven-compiler-plugin</artifactId>
96 <version>3.1</version>
98 <source>${maven.compiler.source}</source>
99 <target>${maven.compiler.target}</target>
100 <compilerArgument>-Xlint:all</compilerArgument>
105 <groupId>org.codehaus.mojo</groupId>
106 <artifactId>animal-sniffer-maven-plugin</artifactId>
107 <version>1.16</version>
110 <groupId>org.codehaus.mojo.signature</groupId>
111 <artifactId>${animalSnifferArtifact}</artifactId>
112 <version>${animalSnifferArtifactVersion}</version>
114 <ignoreDependencies>true</ignoreDependencies>
118 <id>check-java-api</id>
127 <!-- 実行可能jar本体のパッケージを行う (package時) -->
128 <groupId>org.apache.maven.plugins</groupId>
129 <artifactId>maven-jar-plugin</artifactId>
130 <version>3.1.0</version>
132 <finalName>${project.artifactId}</finalName>
135 <mainClass>${mainClass}</mainClass>
136 <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
137 <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
140 <!-- 起動時のスプラッシュ画像 -->
141 <SplashScreen-Image>splash.png</SplashScreen-Image>
142 <Build-At>${maven.build.timestamp}</Build-At>
143 <Built-By>${project.developers[0].id}</Built-By>
144 <Build-Timestamp>${maven.build.timestamp}</Build-Timestamp>
145 <Specification-Title>${project.name}</Specification-Title>
146 <Specification-Version>${project.version}</Specification-Version>
147 <Specification-Vendor>${project.organization.name}</Specification-Vendor>
148 <Implementation-Title>${project.name}</Implementation-Title>
149 <Implementation-Version>${project.version}.${buildNumber}</Implementation-Version>
150 <Implementation-Vendor-Id>${project.organization.name}</Implementation-Vendor-Id>
151 <Implementation-Vendor>${project.organization.name}</Implementation-Vendor>
161 <!-- Windowsの場合のビルド -->
162 <id>windows-profile</id>
165 <family>windows</family>
169 <copyJrePath>${java.home}</copyJrePath>
174 <!-- Launch4jによるjarファイルのexe化を行う. http://launch4j.sourceforge.net/docs.html
175 プラグインが1.7.25の場合、使用するのはLaunch4j 3.12 である。
176 https://github.com/lukaszlenart/launch4j-maven-plugin/blob/master/pom.xml -->
177 <groupId>com.akathist.maven.plugins.launch4j</groupId>
178 <artifactId>launch4j-maven-plugin</artifactId>
179 <version>1.7.25</version>
183 <phase>package</phase>
185 <goal>launch4j</goal>
188 <headerType>gui</headerType>
189 <outfile>target/${project.artifactId}.exe</outfile>
190 <jar>target/${project.artifactId}.jar</jar>
191 <errTitle>Failed to execute the ${project.artifactId}</errTitle>
192 <icon>icon.ico</icon>
193 <downloadUrl>https://adoptopenjdk.net/</downloadUrl>
194 <supportUrl>https://osdn.net/projects/charactermanaj/</supportUrl>
196 <!-- 標準のLaunch4jの起動をカスタマイズして、JREがバンドル位置にも
197 レジストリにも見つからなかった場合は、ユーザーに場所の選択を問い合わせる -->
198 <obj>src/Launch4JStub/w32api/crt2.o</obj>
199 <obj>src/Launch4JStub/head/head.o</obj>
200 <obj>src/Launch4JStub/head/guihead.o</obj>
203 <lib>src/Launch4jStub/w32api/libmingw32.a</lib>
204 <lib>src/Launch4jStub/w32api/libgcc.a</lib>
205 <lib>src/Launch4jStub/w32api/libmsvcrt.a</lib>
206 <lib>src/Launch4jStub/w32api/libkernel32.a</lib>
207 <lib>src/Launch4jStub/w32api/libuser32.a</lib>
208 <lib>src/Launch4jStub/w32api/libadvapi32.a</lib>
209 <lib>src/Launch4jStub/w32api/libshell32.a</lib>
210 <lib>src/Launch4jStub/w32api/libshfolder.a</lib>
214 <minVersion>1.6.0</minVersion>
215 <initialHeapSize>64</initialHeapSize>
216 <maxHeapSize>128</maxHeapSize>
219 <fileVersion>${project.version}</fileVersion>
220 <txtFileVersion>${project.version}.${buildNumber}</txtFileVersion>
221 <fileDescription>${project.artifactId} ${project.version} ${buildNumber}</fileDescription>
222 <copyright><![CDATA[${maven.build.timestamp} ${project.developers[0].id}]]></copyright>
223 <productVersion>${project.version}</productVersion>
224 <txtProductVersion>${project.version}</txtProductVersion>
225 <productName>${project.artifactId}</productName>
226 <internalName>${project.artifactId}</internalName>
227 <originalFilename>${project.artifactId}.exe</originalFilename>
234 <groupId>org.apache.maven.plugins</groupId>
235 <artifactId>maven-assembly-plugin</artifactId>
236 <version>2.6</version>
239 <!-- JREつきの配布用zipを生成する -->
240 <id>create-distribution-with-jre</id>
241 <phase>package</phase>
246 <finalName>${project.artifactId}_${project.version}_with_JRE</finalName>
247 <appendAssemblyId>false</appendAssemblyId>
249 <descriptor>src/main/assembly/charactermanaj_with_jre_zip.xml</descriptor>
254 <!-- JRE無しの配布用zipを生成する -->
255 <id>create-distribution</id>
256 <phase>package</phase>
261 <finalName>${project.artifactId}_${project.version}</finalName>
262 <appendAssemblyId>false</appendAssemblyId>
264 <descriptor>src/main/assembly/charactermanaj_zip.xml</descriptor>
275 <!-- MAC OSXの場合のビルド -->
283 <copyJrePath>${java.home}</copyJrePath>
288 <!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-antrun-plugin -->
289 <groupId>org.apache.maven.plugins</groupId>
290 <artifactId>maven-antrun-plugin</artifactId>
291 <version>1.8</version>
294 <phase>package</phase>
297 <delete dir="${project.build.directory}/appbundle" />
298 <mkdir dir="${project.build.directory}/appbundle" />
299 <copy todir="${project.build.directory}/appbundle">
301 dir="${project.basedir}/src/main/attachment/bundle">
302 <include name="**/*" />
303 <exclude name="**/Info.plist" />
306 <copy todir="${project.build.directory}/appbundle">
308 <!-- ${project.developers[0].name} だと、うまく変数展開できないため -->
309 <filter token="NSHumanReadableCopyright"
310 value="${maven.build.timestamp} ${project.organization.name} ${project.organization.url}" />
311 <!-- 内部用バージョンだが、iosではiTunes ConnectのApp一般情報のバージョンと同一であること。
312 a.b.cの3つに整数が連結された形式が推奨される。 -->
313 <filter token="BundleVersion" value="${project.version}" />
314 <!-- ビルド連番を表す。a.b.cの3つに整数が連結された形式が推奨とされているが、
315 実際は、ただの連番(整数値)で良い。iTunes Connectにアップロードする際に、
316 アップロードするごとに異なる値でなければならないため、連番の類が適当とされる -->
317 <filter token="BundleShortVersionString" value="${buildNumber}" />
320 dir="${project.basedir}/src/main/attachment/bundle">
321 <include name="**/Info.plist" />
325 todir="${project.build.directory}/appbundle/CharacterManaJ.app/Contents/Resources">
326 <fileset dir="${project.basedir}">
327 <include name="icon.icns" />
329 <fileset dir="${project.build.directory}">
330 <include name="${project.artifactId}.jar" />
334 <chmod dir="${project.build.directory}/appbundle/CharacterManaJ.app/Contents/MacOS"
335 perm="a+rx" includes="JavaLaunch"/>
336 <copy todir="${project.build.directory}/appbundle">
337 <fileset dir="${project.basedir}/src/main/attachment">
338 <include name="README_mac.txt"/>
341 <chmod dir="${project.build.directory}/appbundle/CharacterManaJ.app/Contents/Characters"
342 perm="g+srw" type="dir"/>
343 <chmod dir="${project.build.directory}/appbundle/CharacterManaJ.app/Contents/Characters"
344 perm="g+rw" includes="**/*" type="file"/>
346 <delete file="${project.build.directory}/${project.artifactId}_${project.version}.dmg"/>
347 <exec executable="hdiutil">
348 <arg value="create"/>
351 <arg value="-format"/>
353 <arg value="-srcfolder"/>
354 <arg value="${project.build.directory}/appbundle"/>
355 <arg value="-volname"/>
356 <arg value="${project.artifactId}_${project.version}.dmg"/>
357 <arg value="${project.build.directory}/${project.artifactId}_${project.version}.dmg"/>
359 <exec executable="hdiutil">
360 <arg value="internet-enable"/>
362 <arg value="${project.build.directory}/${project.artifactId}_${project.version}.dmg"/>
365 <delete dir="${project.build.directory}/appbundle/CharacterManaJ.app/Contents/Plugins/JRE"/>
366 <copy todir="${project.build.directory}/appbundle/CharacterManaJ.app/Contents/Plugins/JRE">
367 <fileset dir="${copyJrePath}">
368 <include name="**/*"/>
369 <exclude name="man/**"/>
370 <exclude name="demo/**"/>
371 <exclude name="include/**"/>
374 <chmod dir="${project.build.directory}/appbundle/CharacterManaJ.app/Contents/Plugins/JRE"
375 perm="a+rx" includes="bin/*"/>
376 <delete file="${project.build.directory}/${project.artifactId}_${project.version}_with_jre.dmg"/>
377 <exec executable="hdiutil">
378 <arg value="create"/>
381 <arg value="-format"/>
383 <arg value="-srcfolder"/>
384 <arg value="${project.build.directory}/appbundle"/>
385 <arg value="-volname"/>
386 <arg value="${project.artifactId}_${project.version}.dmg"/>
387 <arg value="${project.build.directory}/${project.artifactId}_${project.version}_with_jre.dmg"/>
389 <exec executable="hdiutil">
390 <arg value="internet-enable"/>
392 <arg value="${project.build.directory}/${project.artifactId}_${project.version}_with_jre.dmg"/>