Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/release-6u2'
Browse files Browse the repository at this point in the history
  • Loading branch information
kankichi00 committed Sep 27, 2024
2 parents 6e98326 + f5bd23f commit 1d6232d
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 85 deletions.
31 changes: 10 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Nablarch Framework(nablarch-fw-batch-ee)のバッチExampleアプリケー
### 1.動作環境
実行環境に以下のソフトウェアがインストールされている事を前提とします。
* Java Version : 17
* Maven 3.9.0以降
* Maven 3.9.9以降

なお、このアプリケーションはH2 Database Engineを組み込んでいます。別途DBサーバのインストールは必要ありません。

Expand All @@ -22,25 +22,9 @@ Gitを使用している場合、アプリケーションを配置したいデ
Gitを使用しない場合、最新のタグからzipをダウンロードし、任意のディレクトリへ展開してください。

### 3. アプリケーションのビルド

#### 3.1. データベースのセットアップ及びエンティティクラスの作成
まず、データベースのセットアップ及びエンティティクラスの作成を行います。以下のコマンドを実行してください。
アプリケーションをビルドします。以下のコマンドを実行してください。

$cd nablarch-example-batch-ee
$mvn generate-resources

実行に成功すると、以下のようなログがコンソールに出力され、nablarch-example-batchディレクトリの下にtargetディレクトリが作成されます。

(中略)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
(中略)

#### 3.2. アプリケーションのビルド

次に、アプリケーションをビルドします。以下のコマンドを実行してください。

$mvn clean package

実行に成功すると、以下のようなログがコンソールに出力されます。
Expand All @@ -55,6 +39,13 @@ Gitを使用しない場合、最新のタグからzipをダウンロードし
(中略)


#### データベースのセットアップ及びエンティティクラスの作成について

アプリケーションを実行するためにはデータベースのセットアップ及びエンティティクラスの作成が必要ですが、これは`mvn package`の実行に含まれています。この処理は`mvn generate-resources`で個別に実行することもできます。

※gspプラグインをJava 17で実行するためにはJVMオプションの指定が必要ですが、そのオプションは`.mvn/jvm.config`で指定しています。


### 4. アプリケーションの実行

チェックアウトディレクトリにて以下のコマンドを実行すると、サンプルアプリケーションを動作させることができます。
Expand All @@ -74,9 +65,7 @@ Gitを使用しない場合、最新のタグからzipをダウンロードし
1. ``target/application-<version_no>.zip`` を任意のディレクトリに解凍する。
2. 以下のコマンドにて実行する

```
java -jar <1で解凍したディレクトリ名>/nablarch-example-batch-ee-<version_no>.jar <batch-job名>
```
$java -jar <1で解凍したディレクトリ名>/nablarch-example-batch-ee-<version_no>.jar <batch-job名>


\<batch-job名\>を変えることで、CSVからDBおよびDBからCSVへのデータ保存と、DBのTRUNCATE処理を行うことができます。
Expand Down
92 changes: 28 additions & 64 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>com.nablarch.example</groupId>
<artifactId>nablarch-example-batch-ee</artifactId>
<version>6u1</version>
<version>6u2</version>

<properties>
<!-- 利用するJavaのバージョン -->
Expand All @@ -18,7 +18,7 @@
<db.adminUser>admin</db.adminUser>
<db.user>NABLARCH_EXAMPLE</db.user>

<jberet.version>2.1.1.Final</jberet.version>
<jberet.version>2.1.4.Final</jberet.version>
</properties>

<build>
Expand All @@ -32,7 +32,7 @@
<plugin>
<groupId>jp.co.tis.gsp</groupId>
<artifactId>gsp-dba-maven-plugin</artifactId>
<version>5.0.0</version>
<version>5.1.0</version>
<dependencies>
<dependency>
<groupId>com.h2database</groupId>
Expand Down Expand Up @@ -76,7 +76,7 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>3.0.0</version>
<version>3.6.0</version>
<executions>
<execution>
<phase>generate-sources</phase>
Expand Down Expand Up @@ -109,6 +109,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.7.1</version>
<configuration>
<descriptors>
<descriptor>distribution.xml</descriptor>
Expand All @@ -129,35 +130,25 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.2</version>
<version>3.5.0</version>
<configuration>
<useManifestOnlyJar>false</useManifestOnlyJar>
</configuration>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.3</version>
<configuration>
<excludes>
<exclude>**/com/nablarch/example/app/entity/*</exclude>
</excludes>
</configuration>
</plugin>
</plugins>

<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.2</version>
<version>3.13.0</version>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.5</version>
<version>3.4.2</version>
<configuration>
<excludes>
<exclude>*.dicon</exclude>
Expand All @@ -167,14 +158,6 @@
</plugins>
</pluginManagement>

<extensions>
<extension>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-webdav-jackrabbit</artifactId>
<version>3.0.0</version>
</extension>
</extensions>

</build>

<profiles>
Expand Down Expand Up @@ -272,19 +255,31 @@
<dependency>
<groupId>org.jboss.marshalling</groupId>
<artifactId>jboss-marshalling</artifactId>
<version>2.0.12.Final</version>
<version>2.1.3.Final</version>
</dependency>

<dependency>
<groupId>org.jboss.logging</groupId>
<artifactId>jboss-logging</artifactId>
<version>3.5.3.Final</version>
</dependency>

<dependency>
<groupId>org.jboss.weld</groupId>
<artifactId>weld-core-impl</artifactId>
<version>5.0.0.SP1</version>
<version>5.0.1.Final</version>
</dependency>

<dependency>
<groupId>org.wildfly.security</groupId>
<artifactId>wildfly-elytron-security-manager</artifactId>
<version>1.19.0.Final</version>
<version>2.2.2.Final</version>
</dependency>

<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>32.1.1-jre</version>
</dependency>

<dependency>
Expand All @@ -296,7 +291,7 @@
<dependency>
<groupId>org.jboss.weld.se</groupId>
<artifactId>weld-se-core</artifactId>
<version>5.0.0.SP1</version>
<version>5.0.1.Final</version>
</dependency>

<dependency>
Expand All @@ -308,13 +303,13 @@
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.12</version>
<version>2.0.11</version>
</dependency>

<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.2.13</version>
<version>1.5.6</version>
</dependency>

<dependency>
Expand All @@ -324,12 +319,6 @@
<scope>runtime</scope>
</dependency>

<dependency>
<groupId>com.nablarch.integration</groupId>
<artifactId>slf4j-nablarch-adaptor</artifactId>
<scope>runtime</scope>
</dependency>

<dependency>
<groupId>org.glassfish.expressly</groupId>
<artifactId>expressly</artifactId>
Expand Down Expand Up @@ -359,26 +348,21 @@
<artifactId>nablarch-testing-default-configuration</artifactId>
<scope>test</scope>
</dependency>

<dependency>
<groupId>com.nablarch.integration</groupId>
<artifactId>nablarch-jboss-logging-adaptor</artifactId>
</dependency>
</dependencies>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.nablarch.profile</groupId>
<artifactId>nablarch-bom</artifactId>
<version>6u1</version>
<version>6u2</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.junit</groupId>
<artifactId>junit-bom</artifactId>
<version>5.8.2</version>
<version>5.11.0</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand All @@ -392,24 +376,4 @@
</dependencies>
</dependencyManagement>

<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-report-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<additionalparam>-Xdoclint:none</additionalparam>
</configuration>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
</plugin>
</plugins>
</reporting>

</project>

0 comments on commit 1d6232d

Please sign in to comment.