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>
22 <email>seraphy@users.osdn.me</email>
23 <url>https://osdn.net/users/seraphy/</url>
24 <organization>seraphyware</organization>
26 <role>architect</role>
27 <role>developer</role>
29 <timezone>Asia/Tokyo</timezone>
34 <mainClass>charactermanaj.CharacterManaJ</mainClass>
35 <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
36 <maven.compiler.source>1.6</maven.compiler.source>
37 <maven.compiler.target>1.6</maven.compiler.target>
38 <animalSnifferArtifact>java16</animalSnifferArtifact>
39 <animalSnifferArtifactVersion>1.1</animalSnifferArtifactVersion>
40 <maven.build.timestamp.format>yyyy-MM-dd</maven.build.timestamp.format>
44 <!-- https://mvnrepository.com/artifact/com.apple/AppleJavaExtensions -->
46 <groupId>com.apple</groupId>
47 <artifactId>AppleJavaExtensions</artifactId>
48 <version>1.4</version>
49 <scope>provided</scope>
54 <groupId>junit</groupId>
55 <artifactId>junit</artifactId>
56 <version>4.11</version>
63 <!-- 現在時刻からユニークなビルド番号を生成する
64 (使うか否かに関わらず、SCMの設定が必要。
65 buildNumberの連番を使う場合はローカルにプロパティファイルが作成される) -->
67 <groupId>org.codehaus.mojo</groupId>
68 <artifactId>buildnumber-maven-plugin</artifactId>
69 <version>1.4</version>
72 <phase>validate</phase>
79 <doCheck>false</doCheck>
80 <doUpdate>true</doUpdate>
81 <format>{0,date,yyyyMM}.{0,date,ddHHmm}</format>
83 <item>timestamp</item>
89 <groupId>org.apache.maven.plugins</groupId>
90 <artifactId>maven-compiler-plugin</artifactId>
91 <version>3.1</version>
93 <source>${maven.compiler.source}</source>
94 <target>${maven.compiler.target}</target>
95 <compilerArgument>-Xlint:all</compilerArgument>
100 <groupId>org.codehaus.mojo</groupId>
101 <artifactId>animal-sniffer-maven-plugin</artifactId>
102 <version>1.16</version>
105 <groupId>org.codehaus.mojo.signature</groupId>
106 <artifactId>${animalSnifferArtifact}</artifactId>
107 <version>${animalSnifferArtifactVersion}</version>
109 <ignoreDependencies>true</ignoreDependencies>
113 <id>check-java-api</id>
122 <!-- 実行可能jar本体のパッケージを行う (package時) -->
123 <groupId>org.apache.maven.plugins</groupId>
124 <artifactId>maven-jar-plugin</artifactId>
125 <version>3.1.0</version>
127 <finalName>${project.artifactId}</finalName>
130 <mainClass>${mainClass}</mainClass>
131 <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
132 <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
135 <!-- 起動時のスプラッシュ画像 -->
136 <SplashScreen-Image>splash.png</SplashScreen-Image>
137 <Build-At>${maven.build.timestamp}</Build-At>
138 <Built-By>${project.developers[0].id}</Built-By>
139 <Build-Timestamp>${maven.build.timestamp}</Build-Timestamp>
140 <Specification-Title>${project.name}</Specification-Title>
141 <Specification-Version>${project.version}</Specification-Version>
142 <Specification-Vendor>${project.organization.name}</Specification-Vendor>
143 <Implementation-Title>${project.name}</Implementation-Title>
144 <Implementation-Version>${project.version}.${buildNumber}</Implementation-Version>
145 <Implementation-Vendor-Id>${project.organization.name}</Implementation-Vendor-Id>
146 <Implementation-Vendor>${project.organization.name}</Implementation-Vendor>
156 <!-- Windowsの場合のビルド -->
157 <id>windows-profile</id>
160 <family>windows</family>
164 <copyJrePath>${java.home}</copyJrePath>
169 <!-- Launch4jによるjarファイルのexe化を行う. http://launch4j.sourceforge.net/docs.html
170 プラグインが1.7.24の場合、使用するのはLaunch4j 3.12 である。
171 https://github.com/lukaszlenart/launch4j-maven-plugin/blob/master/pom.xml -->
172 <groupId>com.akathist.maven.plugins.launch4j</groupId>
173 <artifactId>launch4j-maven-plugin</artifactId>
174 <version>1.7.24</version>
178 <phase>package</phase>
180 <goal>launch4j</goal>
183 <headerType>gui</headerType>
184 <outfile>target/${project.artifactId}.exe</outfile>
185 <jar>target/${project.artifactId}.jar</jar>
186 <errTitle>Failed to execute the ${project.artifactId}</errTitle>
187 <icon>icon.ico</icon>
190 <minVersion>1.5.0</minVersion>
191 <initialHeapSize>64</initialHeapSize>
192 <maxHeapSize>128</maxHeapSize>
195 <fileVersion>${project.version}</fileVersion>
196 <txtFileVersion>${project.version}.${buildNumber}</txtFileVersion>
197 <fileDescription>${project.artifactId} ${project.version} ${buildNumber}</fileDescription>
198 <copyright><![CDATA[${maven.build.timestamp} ${project.developers[0].id}]]></copyright>
199 <productVersion>${project.version}</productVersion>
200 <txtProductVersion>${project.version}</txtProductVersion>
201 <productName>${project.artifactId}</productName>
202 <internalName>${project.artifactId}</internalName>
203 <originalFilename>${project.artifactId}.exe</originalFilename>
210 <groupId>org.apache.maven.plugins</groupId>
211 <artifactId>maven-assembly-plugin</artifactId>
212 <version>2.6</version>
215 <!-- JREつきの配布用zipを生成する -->
216 <id>create-distribution-with-jre</id>
217 <phase>package</phase>
222 <finalName>${project.artifactId}_${project.version}_with_JRE</finalName>
223 <appendAssemblyId>false</appendAssemblyId>
225 <descriptor>src/main/assembly/charactermanaj_with_jre_zip.xml</descriptor>
230 <!-- JRE無しの配布用zipを生成する -->
231 <id>create-distribution</id>
232 <phase>package</phase>
237 <finalName>${project.artifactId}_${project.version}</finalName>
238 <appendAssemblyId>false</appendAssemblyId>
240 <descriptor>src/main/assembly/charactermanaj_zip.xml</descriptor>
251 <!-- MAC OSXの場合のビルド -->
259 <copyJrePath>${java.home}</copyJrePath>
264 <!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-antrun-plugin -->
265 <groupId>org.apache.maven.plugins</groupId>
266 <artifactId>maven-antrun-plugin</artifactId>
267 <version>1.8</version>
270 <phase>package</phase>
273 <delete dir="${project.build.directory}/appbundle" />
274 <mkdir dir="${project.build.directory}/appbundle" />
275 <copy todir="${project.build.directory}/appbundle">
277 dir="${project.basedir}/src/main/attachment/bundle">
278 <include name="**/*" />
279 <exclude name="**/Info.plist" />
282 <copy todir="${project.build.directory}/appbundle">
284 <!-- ${project.developers[0].name} だと、うまく変数展開できないため -->
285 <filter token="NSHumanReadableCopyright"
286 value="${maven.build.timestamp} ${project.organization.name} ${project.organization.url}" />
287 <!-- 内部用バージョンだが、iosではiTunes ConnectのApp一般情報のバージョンと同一であること。
288 a.b.cの3つに整数が連結された形式が推奨される。 -->
289 <filter token="BundleVersion" value="${project.version}" />
290 <!-- ビルド連番を表す。a.b.cの3つに整数が連結された形式が推奨とされているが、
291 実際は、ただの連番(整数値)で良い。iTunes Connectにアップロードする際に、
292 アップロードするごとに異なる値でなければならないため、連番の類が適当とされる -->
293 <filter token="BundleShortVersionString" value="${buildNumber}" />
296 dir="${project.basedir}/src/main/attachment/bundle">
297 <include name="**/Info.plist" />
301 todir="${project.build.directory}/appbundle/CharacterManaJ.app/Contents/Resources">
302 <fileset dir="${project.basedir}">
303 <include name="icon.icns" />
305 <fileset dir="${project.build.directory}">
306 <include name="${project.artifactId}.jar" />
310 <chmod dir="${project.build.directory}/appbundle/CharacterManaJ.app/Contents/MacOS"
311 perm="a+rx" includes="**/*.sh"/>
312 <copy todir="${project.build.directory}/appbundle">
313 <fileset dir="${project.basedir}/src/main/attachment">
314 <include name="README_mac.txt"/>
318 <delete file="${project.build.directory}/${project.artifactId}_${project.version}.dmg"/>
319 <exec executable="hdiutil">
320 <arg value="create"/>
323 <arg value="-format"/>
325 <arg value="-srcfolder"/>
326 <arg value="${project.build.directory}/appbundle"/>
327 <arg value="-volname"/>
328 <arg value="${project.artifactId}_${project.version}.dmg"/>
329 <arg value="${project.build.directory}/${project.artifactId}_${project.version}.dmg"/>
331 <exec executable="hdiutil">
332 <arg value="internet-enable"/>
334 <arg value="${project.build.directory}/${project.artifactId}_${project.version}.dmg"/>
337 <delete dir="${project.build.directory}/appbundle/CharacterManaJ.app/Contents/Plugins/JRE"/>
338 <copy todir="${project.build.directory}/appbundle/CharacterManaJ.app/Contents/Plugins/JRE">
339 <fileset dir="${copyJrePath}">
340 <include name="**/*"/>
341 <exclude name="man/**"/>
342 <exclude name="demo/**"/>
343 <exclude name="include/**"/>
346 <chmod dir="${project.build.directory}/appbundle/CharacterManaJ.app/Contents/Plugins/JRE"
347 perm="a+rx" includes="bin/*"/>
348 <delete file="${project.build.directory}/${project.artifactId}_${project.version}_with_jre.dmg"/>
349 <exec executable="hdiutil">
350 <arg value="create"/>
353 <arg value="-format"/>
355 <arg value="-srcfolder"/>
356 <arg value="${project.build.directory}/appbundle"/>
357 <arg value="-volname"/>
358 <arg value="${project.artifactId}_${project.version}.dmg"/>
359 <arg value="${project.build.directory}/${project.artifactId}_${project.version}_with_jre.dmg"/>
361 <exec executable="hdiutil">
362 <arg value="internet-enable"/>
364 <arg value="${project.build.directory}/${project.artifactId}_${project.version}_with_jre.dmg"/>