OSDN Git Service

チャネルサイズの計算に誤りがあった。length要素自身の長さを含めてなかった。
[charactermanaj/CharacterManaJ.git] / pom.xml
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>
5
6         <groupId>jp.seraphyware.charactermanaj</groupId>
7         <artifactId>CharacterManaJ</artifactId>
8         <version>0.9.9.9</version>
9
10         <url>https://osdn.net/projects/charactermanaj/</url>
11
12         <scm>
13                 <connection>scm:git:https://scm.osdn.net/gitroot/charactermanaj/CharacterManaJ.git</connection>
14                 <tag>HEAD</tag>
15                 <url>https://osdn.net/projects/charactermanaj/scm/git/CharacterManaJ/</url>
16         </scm>
17
18         <organization>
19                 <name>seraphyware</name>
20                 <url>https://osdn.net/projects/charactermanaj/</url>
21         </organization>
22
23         <developers>
24                 <developer>
25                         <id>seraphy</id>
26                         <name>seraphy</name>
27                         <email>seraphy@users.osdn.me</email>
28                         <url>https://osdn.net/users/seraphy/</url>
29                         <organization>seraphyware</organization>
30                         <roles>
31                                 <role>architect</role>
32                                 <role>developer</role>
33                         </roles>
34                         <timezone>Asia/Tokyo</timezone>
35                 </developer>
36         </developers>
37
38         <properties>
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>
46         </properties>
47
48         <dependencies>
49                 <!-- https://mvnrepository.com/artifact/com.apple/AppleJavaExtensions -->
50                 <dependency>
51                         <groupId>com.apple</groupId>
52                         <artifactId>AppleJavaExtensions</artifactId>
53                         <version>1.4</version>
54                         <scope>provided</scope>
55                 </dependency>
56
57                 <!-- テスト -->
58                 <dependency>
59                         <groupId>junit</groupId>
60                         <artifactId>junit</artifactId>
61                         <version>4.11</version>
62                         <scope>test</scope>
63                 </dependency>
64         </dependencies>
65
66         <build>
67                 <plugins>
68                         <!-- 現在時刻からユニークなビルド番号を生成する
69                                 (使うか否かに関わらず、SCMの設定が必要。
70                                 buildNumberの連番を使う場合はローカルにプロパティファイルが作成される) -->
71                         <plugin>
72                                 <groupId>org.codehaus.mojo</groupId>
73                                 <artifactId>buildnumber-maven-plugin</artifactId>
74                                 <version>1.4</version>
75                                 <executions>
76                                         <execution>
77                                                 <phase>validate</phase>
78                                                 <goals>
79                                                         <goal>create</goal>
80                                                 </goals>
81                                         </execution>
82                                 </executions>
83                                 <configuration>
84                                         <doCheck>false</doCheck>
85                                         <doUpdate>true</doUpdate>
86                                         <format>{0,date,yyyyMM}.{0,date,ddHHmm}</format>
87                                         <items>
88                                                 <item>timestamp</item>
89                                         </items>
90                                 </configuration>
91                         </plugin>
92                         <plugin>
93                                 <!-- コンパイラープラグイン -->
94                                 <groupId>org.apache.maven.plugins</groupId>
95                                 <artifactId>maven-compiler-plugin</artifactId>
96                                 <version>3.1</version>
97                                 <configuration>
98                                         <source>${maven.compiler.source}</source>
99                                         <target>${maven.compiler.target}</target>
100                                         <compilerArgument>-Xlint:all</compilerArgument>
101                                 </configuration>
102                         </plugin>
103                         <plugin>
104                                 <!-- 互換性チェック -->
105                                 <groupId>org.codehaus.mojo</groupId>
106                                 <artifactId>animal-sniffer-maven-plugin</artifactId>
107                                 <version>1.16</version>
108                                 <configuration>
109                                         <signature>
110                                                 <groupId>org.codehaus.mojo.signature</groupId>
111                                                 <artifactId>${animalSnifferArtifact}</artifactId>
112                                                 <version>${animalSnifferArtifactVersion}</version>
113                                         </signature>
114                                         <ignoreDependencies>true</ignoreDependencies>
115                                 </configuration>
116                                 <executions>
117                                         <execution>
118                                                 <id>check-java-api</id>
119                                                 <phase>test</phase>
120                                                 <goals>
121                                                         <goal>check</goal>
122                                                 </goals>
123                                         </execution>
124                                 </executions>
125                         </plugin>
126                         <plugin>
127                                 <!-- 実行可能jar本体のパッケージを行う (package時) -->
128                                 <groupId>org.apache.maven.plugins</groupId>
129                                 <artifactId>maven-jar-plugin</artifactId>
130                                 <version>3.1.0</version>
131                                 <configuration>
132                                         <finalName>${project.artifactId}</finalName>
133                                         <archive>
134                                                 <manifest>
135                                                         <mainClass>${mainClass}</mainClass>
136                                                         <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
137                                                         <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
138                                                 </manifest>
139                                                 <manifestEntries>
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>
152                                                 </manifestEntries>
153                                         </archive>
154                                 </configuration>
155                         </plugin>
156                 </plugins>
157         </build>
158
159         <profiles>
160                 <profile>
161                         <!-- Windowsの場合のビルド -->
162                         <id>windows-profile</id>
163                         <activation>
164                                 <os>
165                                         <family>windows</family>
166                                 </os>
167                         </activation>
168                         <properties>
169                                 <copyJrePath>${java.home}</copyJrePath>
170                         </properties>
171                         <build>
172                                 <plugins>
173                                         <plugin>
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>
180                                                 <executions>
181                                                         <execution>
182                                                                 <id>l4j-gui</id>
183                                                                 <phase>package</phase>
184                                                                 <goals>
185                                                                         <goal>launch4j</goal>
186                                                                 </goals>
187                                                                 <configuration>
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>
195                                                                         <objs>
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>
201                                                                         </objs>
202                                                                         <libs>
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>
211                                                                         </libs>
212                                                                         <jre>
213                                                                                 <path>jre</path>
214                                                                                 <minVersion>1.6.0</minVersion>
215                                                                                 <initialHeapSize>64</initialHeapSize>
216                                                                                 <maxHeapSize>128</maxHeapSize>
217                                                                         </jre>
218                                                                         <versionInfo>
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>
228                                                                         </versionInfo>
229                                                                 </configuration>
230                                                         </execution>
231                                                 </executions>
232                                         </plugin>
233                                         <plugin>
234                                                 <groupId>org.apache.maven.plugins</groupId>
235                                                 <artifactId>maven-assembly-plugin</artifactId>
236                                                 <version>2.6</version>
237                                                 <executions>
238                                                         <execution>
239                                                                 <!-- JREつきの配布用zipを生成する -->
240                                                                 <id>create-distribution-with-jre</id>
241                                                                 <phase>package</phase>
242                                                                 <goals>
243                                                                         <goal>single</goal>
244                                                                 </goals>
245                                                                 <configuration>
246                                                                         <finalName>${project.artifactId}_${project.version}_with_JRE</finalName>
247                                                                         <appendAssemblyId>false</appendAssemblyId>
248                                                                         <descriptors>
249                                                                                 <descriptor>src/main/assembly/charactermanaj_with_jre_zip.xml</descriptor>
250                                                                         </descriptors>
251                                                                 </configuration>
252                                                         </execution>
253                                                         <execution>
254                                                                 <!-- JRE無しの配布用zipを生成する -->
255                                                                 <id>create-distribution</id>
256                                                                 <phase>package</phase>
257                                                                 <goals>
258                                                                         <goal>single</goal>
259                                                                 </goals>
260                                                                 <configuration>
261                                                                         <finalName>${project.artifactId}_${project.version}</finalName>
262                                                                         <appendAssemblyId>false</appendAssemblyId>
263                                                                         <descriptors>
264                                                                                 <descriptor>src/main/assembly/charactermanaj_zip.xml</descriptor>
265                                                                         </descriptors>
266                                                                 </configuration>
267                                                         </execution>
268                                                 </executions>
269                                         </plugin>
270                                 </plugins>
271                         </build>
272                 </profile>
273
274                 <profile>
275                         <!-- MAC OSXの場合のビルド -->
276                         <id>osx-profile</id>
277                         <activation>
278                                 <os>
279                                         <family>mac</family>
280                                 </os>
281                         </activation>
282                         <properties>
283                                 <copyJrePath>${java.home}</copyJrePath>
284                         </properties>
285                         <build>
286                                 <plugins>
287                                         <plugin>
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>
292                                                 <executions>
293                                                         <execution>
294                                                                 <phase>package</phase>
295                                                                 <configuration>
296                                                                         <tasks>
297                                                                                 <delete dir="${project.build.directory}/appbundle" />
298                                                                                 <mkdir dir="${project.build.directory}/appbundle" />
299                                                                                 <copy todir="${project.build.directory}/appbundle">
300                                                                                         <fileset
301                                                                                                 dir="${project.basedir}/src/main/attachment/bundle">
302                                                                                                 <include name="**/*" />
303                                                                                                 <exclude name="**/Info.plist" />
304                                                                                         </fileset>
305                                                                                 </copy>
306                                                                                 <copy todir="${project.build.directory}/appbundle">
307                                                                                         <filterset>
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}" />
318                                                                                         </filterset>
319                                                                                         <fileset
320                                                                                                 dir="${project.basedir}/src/main/attachment/bundle">
321                                                                                                 <include name="**/Info.plist" />
322                                                                                         </fileset>
323                                                                                 </copy>
324                                                                                 <copy
325                                                                                         todir="${project.build.directory}/appbundle/CharacterManaJ.app/Contents/Resources">
326                                                                                         <fileset dir="${project.basedir}">
327                                                                                                 <include name="icon.icns" />
328                                                                                         </fileset>
329                                                                                         <fileset dir="${project.build.directory}">
330                                                                                                 <include name="${project.artifactId}.jar" />
331                                                                                         </fileset>
332                                                                                 </copy>
333
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"/>
339                                                                                         </fileset>
340                                                                                 </copy>
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"/>
345
346                                                                                 <delete file="${project.build.directory}/${project.artifactId}_${project.version}.dmg"/>
347                                                                                 <exec executable="hdiutil">
348                                                                                         <arg value="create"/>
349                                                                                         <arg value="-fs"/>
350                                                                                         <arg value="HFS+"/>
351                                                                                         <arg value="-format"/>
352                                                                                         <arg value="UDZO"/>
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"/>
358                                                                                 </exec>
359                                                                                 <exec executable="hdiutil">
360                                                                                         <arg value="internet-enable"/>
361                                                                                         <arg value="-yes"/>
362                                                                                         <arg value="${project.build.directory}/${project.artifactId}_${project.version}.dmg"/>
363                                                                                 </exec>
364
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/**"/>
372                                                                                         </fileset>
373                                                                                 </copy>
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"/>
379                                                                                         <arg value="-fs"/>
380                                                                                         <arg value="HFS+"/>
381                                                                                         <arg value="-format"/>
382                                                                                         <arg value="UDZO"/>
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"/>
388                                                                                 </exec>
389                                                                                 <exec executable="hdiutil">
390                                                                                         <arg value="internet-enable"/>
391                                                                                         <arg value="-yes"/>
392                                                                                         <arg value="${project.build.directory}/${project.artifactId}_${project.version}_with_jre.dmg"/>
393                                                                                 </exec>
394                                                                         </tasks>
395                                                                 </configuration>
396                                                                 <goals>
397                                                                         <goal>run</goal>
398                                                                 </goals>
399                                                         </execution>
400                                                 </executions>
401                                         </plugin>
402                                 </plugins>
403                         </build>
404                 </profile>
405         </profiles>
406 </project>