Jenkins で Sample ジョブを作成する
「新規ジョブ作成」「ジョブ名」Sample、「Maven2/3プロジェクトのビルド」でOK。
- 「Jenkinsの管理」「システム設定」「Maven」の名前に適当な名前を設定、
- 「自動インストール」にチェック
「ソースコード管理」で「Git」を選択、「Repository URL」に C:\Users\ユーザ名\git\master を指定。
ビルド実行
JAVA_HOME が不正で(JRE を参照)tools.jar が無いとエラー発生。
- 「Jenkinsの管理」「システム設定」「JDK」で C:\Program Files\Java\jdk1.7.0_51 を指定
以下エラー発生。
- ブートストラップ・クラスパスが-source 1.6と一緒に設定されていません
- この文字は、エンコーディングMS932にマップできません
pom.xml を編集
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.5.1</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
<encoding>UTF-8</encoding>
<compilerArgument>-Xlint:all</compilerArgument>
<showWarnings>true</showWarnings> <showDeprecation>true</showDeprecation>
</configuration>
</plugin>
ビルドの成功を確認。作成した war はとりあえず保留。

人気ブログランキングへ