OSDN Git Service

ビルド番号の生成対応
authorseraphy <seraphy@users.osdn.me>
Mon, 19 Nov 2018 16:58:45 +0000 (01:58 +0900)
committerseraphy <seraphy@users.osdn.me>
Mon, 19 Nov 2018 16:58:45 +0000 (01:58 +0900)
pom.xml
src/main/attachment/bundle/CharacterManaJ.app/Contents/Info.plist
src/main/attachment/bundle/CharacterManaJ.app/Contents/Resources/en.lproj/Localizable.strings [deleted file]
src/main/attachment/bundle/CharacterManaJ.app/Contents/Resources/ja.lproj/Localizable.strings [deleted file]
src/main/attachment/bundle/CharacterManaJ.app/Contents/Resources/splash.png [deleted file]

diff --git a/pom.xml b/pom.xml
index 2b36ec1..e8742ed 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -9,8 +9,28 @@
 \r
        <url>https://osdn.net/projects/charactermanaj/</url>\r
 \r
+       <scm>\r
+               <connection>scm:git:https://scm.osdn.net/gitroot/charactermanaj/CharacterManaJ.git</connection>\r
+               <tag>HEAD</tag>\r
+               <url>https://osdn.net/projects/charactermanaj/scm/git/CharacterManaJ/</url>\r
+       </scm>\r
+\r
+       <developers>\r
+               <developer>\r
+                       <id>seraphy</id>\r
+                       <name>seraphy</name>\r
+                       <email>seraphy@users.osdn.me</email>\r
+                       <url>https://osdn.net/users/seraphy/</url>\r
+                       <organization>seraphyware</organization>\r
+                       <roles>\r
+                               <role>architect</role>\r
+                               <role>developer</role>\r
+                       </roles>\r
+                       <timezone>Asia/Tokyo</timezone>\r
+               </developer>\r
+       </developers>\r
+\r
        <properties>\r
-               <buildBy>seraphy@users.osdn.me</buildBy>\r
                <mainClass>charactermanaj.CharacterManaJ</mainClass>\r
                <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>\r
                <maven.compiler.source>1.6</maven.compiler.source>\r
 \r
        <build>\r
                <plugins>\r
+                       <!-- 現在時刻からユニークなビルド番号を生成する\r
+                               (使うか否かに関わらず、SCMの設定が必要。\r
+                               buildNumberの連番を使う場合はローカルにプロパティファイルが作成される) -->\r
+                       <plugin>\r
+                               <groupId>org.codehaus.mojo</groupId>\r
+                               <artifactId>buildnumber-maven-plugin</artifactId>\r
+                               <version>1.4</version>\r
+                               <executions>\r
+                                       <execution>\r
+                                               <phase>validate</phase>\r
+                                               <goals>\r
+                                                       <goal>create</goal>\r
+                                               </goals>\r
+                                       </execution>\r
+                               </executions>\r
+                               <configuration>\r
+                                       <doCheck>false</doCheck>\r
+                                       <doUpdate>true</doUpdate>\r
+                                       <format>{0,date,yyyyMM}.{0,date,ddHHmm}</format>\r
+                                       <items>\r
+                                               <item>timestamp</item>\r
+                                       </items>\r
+                               </configuration>\r
+                       </plugin>\r
                        <plugin>\r
                                <!-- コンパイラープラグイン -->\r
                                <groupId>org.apache.maven.plugins</groupId>\r
                                                <manifestEntries>\r
                                                        <!-- 起動時のスプラッシュ画像 -->\r
                                                        <SplashScreen-Image>splash.png</SplashScreen-Image>\r
-                                                       <Built-By>${buildBy}</Built-By>\r
                                                        <Build-At>${maven.build.timestamp}</Build-At>\r
-                                                       <Implementation-Vendor><![CDATA[Copyright (C) ${maven.build.timestamp} ${buildBy}]]></Implementation-Vendor>\r
+                                                       <Built-By>${project.developers[0].id}</Built-By>\r
+                                                       <Build-Timestamp>${maven.build.timestamp}</Build-Timestamp>\r
+                                                       <Specification-Title>${project.name}</Specification-Title>\r
+                                                       <Specification-Version>${project.version}</Specification-Version>\r
+                                                       <Specification-Vendor>${project.organization.name}</Specification-Vendor>\r
+                                                       <Implementation-Title>${project.name}</Implementation-Title>\r
+                                                       <Implementation-Version>${project.version}.${buildNumber}</Implementation-Version>\r
+                                                       <Implementation-Vendor-Id>${project.organization.name}</Implementation-Vendor-Id>\r
+                                                       <Implementation-Vendor>${project.organization.name}</Implementation-Vendor>\r
                                                </manifestEntries>\r
                                        </archive>\r
                                </configuration>\r
                                                                        </jre>\r
                                                                        <versionInfo>\r
                                                                                <fileVersion>${project.version}</fileVersion>\r
-                                                                               <txtFileVersion>${project.version}</txtFileVersion>\r
-                                                                               <fileDescription>${project.artifactId}</fileDescription>\r
-                                                                               <copyright>${maven.build.timestamp} ${buildBy}</copyright>\r
+                                                                               <txtFileVersion>${project.version}.${buildNumber}</txtFileVersion>\r
+                                                                               <fileDescription>${project.artifactId} ${project.version} ${buildNumber}</fileDescription>\r
+                                                                               <copyright><![CDATA[${maven.build.timestamp} ${project.developers[0].id}]]></copyright>\r
                                                                                <productVersion>${project.version}</productVersion>\r
                                                                                <txtProductVersion>${project.version}</txtProductVersion>\r
                                                                                <productName>${project.artifactId}</productName>\r
                                                                <phase>package</phase>\r
                                                                <configuration>\r
                                                                        <tasks>\r
-                                                                               <delete dir="${project.build.directory}/appbundle"/>\r
-                                                                               <mkdir dir="${project.build.directory}/appbundle"/>\r
+                                                                               <delete dir="${project.build.directory}/appbundle" />\r
+                                                                               <mkdir dir="${project.build.directory}/appbundle" />\r
                                                                                <copy todir="${project.build.directory}/appbundle">\r
-                                                                                       <fileset dir="${project.basedir}/src/main/attachment/bundle">\r
-                                                                                               <include name="**/*"/>\r
+                                                                                       <fileset\r
+                                                                                               dir="${project.basedir}/src/main/attachment/bundle">\r
+                                                                                               <include name="**/*" />\r
+                                                                                               <exclude name="**/Info.plist" />\r
                                                                                        </fileset>\r
                                                                                </copy>\r
-                                                                               <copy todir="${project.build.directory}/appbundle/CharacterManaJ.app/Contents/Resources">\r
+                                                                               <copy todir="${project.build.directory}/appbundle">\r
+                                                                                       <filterset>\r
+                                                                                               <!-- ${project.developers[0].name} だと、うまく変数展開できないため -->\r
+                                                                                               <filter token="NSHumanReadableCopyright"\r
+                                                                                                       value="${maven.build.timestamp} ${project.organization.name} ${project.organization.url}" />\r
+                                                                                               <!--  内部用バージョンだが、iosではiTunes ConnectのApp一般情報のバージョンと同一であること。\r
+                                                                                                       a.b.cの3つに整数が連結された形式が推奨される。 -->\r
+                                                                                               <filter token="BundleVersion" value="${project.version}" />\r
+                                                                                               <!-- ビルド連番を表す。a.b.cの3つに整数が連結された形式が推奨とされているが、\r
+                                                                                                       実際は、ただの連番(整数値)で良い。iTunes Connectにアップロードする際に、\r
+                                                                                                       アップロードするごとに異なる値でなければならないため、連番の類が適当とされる -->\r
+                                                                                               <filter token="BundleShortVersionString" value="${buildNumber}" />\r
+                                                                                       </filterset>\r
+                                                                                       <fileset\r
+                                                                                               dir="${project.basedir}/src/main/attachment/bundle">\r
+                                                                                               <include name="**/Info.plist" />\r
+                                                                                       </fileset>\r
+                                                                               </copy>\r
+                                                                               <copy\r
+                                                                                       todir="${project.build.directory}/appbundle/CharacterManaJ.app/Contents/Resources">\r
                                                                                        <fileset dir="${project.basedir}">\r
-                                                                                               <include name="icon.icns"/>\r
+                                                                                               <include name="icon.icns" />\r
                                                                                        </fileset>\r
                                                                                        <fileset dir="${project.build.directory}">\r
-                                                                                               <include name="${project.artifactId}.jar"/>\r
+                                                                                               <include name="${project.artifactId}.jar" />\r
                                                                                        </fileset>\r
                                                                                </copy>\r
+\r
                                                                                <chmod dir="${project.build.directory}/appbundle/CharacterManaJ.app/Contents/MacOS"\r
                                                                                        perm="a+rx" includes="**/*.sh"/>\r
                                                                                <copy todir="${project.build.directory}/appbundle">\r
index 6128d40..6b35059 100644 (file)
     <key>CFBundleSignature</key>
     <string>????</string>
     <key>CFBundleVersion</key>
-    <string>1</string>
+    <string>@BundleVersion@</string>
+    <key>CFBundleShortVersionString</key>
+    <string>@BundleShortVersionString@</string>
     <key>NSHumanReadableCopyright</key>
-    <string>seraphy@users.osdn.me</string>
+    <string>@NSHumanReadableCopyright@</string>
     <key>NSHighResolutionCapable</key>
     <true/>
     <key>NSSupportsAutomaticGraphicsSwitching</key>
diff --git a/src/main/attachment/bundle/CharacterManaJ.app/Contents/Resources/en.lproj/Localizable.strings b/src/main/attachment/bundle/CharacterManaJ.app/Contents/Resources/en.lproj/Localizable.strings
deleted file mode 100755 (executable)
index 0d306aa..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-"JRELoadError" = "Unable to load Java Runtime Environment.";
-"MainClassNameRequired" = "Main class name is required.";
-"JavaDirectoryNotFound" = "Unable to enumerate Java directory contents.";
diff --git a/src/main/attachment/bundle/CharacterManaJ.app/Contents/Resources/ja.lproj/Localizable.strings b/src/main/attachment/bundle/CharacterManaJ.app/Contents/Resources/ja.lproj/Localizable.strings
deleted file mode 100755 (executable)
index 01c9722..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-"JRELoadError" = "Javaランタイムをロードできません。"
-"MainClassNameRequired" = "Main class name is required.";
-"JavaDirectoryNotFound" = "Javaディレクトリの内容にアクセスできません。";
diff --git a/src/main/attachment/bundle/CharacterManaJ.app/Contents/Resources/splash.png b/src/main/attachment/bundle/CharacterManaJ.app/Contents/Resources/splash.png
deleted file mode 100644 (file)
index 05dbb9b..0000000
Binary files a/src/main/attachment/bundle/CharacterManaJ.app/Contents/Resources/splash.png and /dev/null differ