Code Monkey home page Code Monkey logo

macchinetta-batch-blank's Introduction

Blank project for batch application using Macchinetta Batch Framework (2.x)

This is blank project template for batch application is provided in collaboration with Macchinetta Batch Framework (2.x) (Spring Batch + Spring + MyBatis3).

Use this as the starting point of all kinds of development activities.

This blank project can be be beneficial in following ways.

  1. The most standard and ideal baseline configuration and structure to all the development activities.

  2. Quickly jump to focus on business application.

Getting Started

To create blank project interactively.
Set the groupId, artifactId, version and package to suit your project.

For Java Config

  • for CommandPrompt(Windows)

C:\xxx>mvn archetype:generate ^
  -DarchetypeGroupId=com.github.macchinetta.blank ^
  -DarchetypeArtifactId=macchinetta-batch-archetype ^
  -DarchetypeVersion=2.5.0.1.RELEASE
  • for Bash(Unix, Linux, …​)

$ mvn archetype:generate \
  -DarchetypeGroupId=com.github.macchinetta.blank \
  -DarchetypeArtifactId=macchinetta-batch-archetype \
  -DarchetypeVersion=2.5.0.1.RELEASE

For XML Config

  • for CommandPrompt(Windows)

C:\xxx>mvn archetype:generate ^
  -DarchetypeGroupId=com.github.macchinetta.blank ^
  -DarchetypeArtifactId=macchinetta-batch-xmlconfig-archetype ^
  -DarchetypeVersion=2.5.0.1.RELEASE
  • for Bash(Unix, Linux, …​)

$ mvn archetype:generate \
  -DarchetypeGroupId=com.github.macchinetta.blank \
  -DarchetypeArtifactId=macchinetta-batch-xmlconfig-archetype \
  -DarchetypeVersion=2.5.0.1.RELEASE

Run

In order to run the blank project, execute the below command.

For Java Config

  • for CommandPrompt(Windows)

C:\xxx>cd [artifactId]
C:\xxx>mvn clean dependency:copy-dependencies -DoutputDirectory=lib package
C:\xxx>java -cp "lib/*;target/*" ^
org.springframework.batch.core.launch.support.CommandLineJobRunner ^
com.example.batch.jobs.Job01Config job01
  • for Bash(Unix, Linux, …​)

$ cd [artifactId]
$ mvn clean dependency:copy-dependencies -DoutputDirectory=lib package
$ java -cp 'lib/*:target/*' \
org.springframework.batch.core.launch.support.CommandLineJobRunner \
com.example.batch.jobs.Job01Config job01

For XML Config

  • for CommandPrompt(Windows)

C:\xxx>cd [artifactId]
C:\xxx>mvn clean dependency:copy-dependencies -DoutputDirectory=lib package
C:\xxx>java -cp "lib/*;target/*" ^
org.springframework.batch.core.launch.support.CommandLineJobRunner ^
META-INF/jobs/job01.xml job01
  • for Bash(Unix, Linux, …​)

$ cd [artifactId]
$ mvn clean dependency:copy-dependencies -DoutputDirectory=lib package
$ java -cp 'lib/*:target/*' \
org.springframework.batch.core.launch.support.CommandLineJobRunner \
META-INF/jobs/job01.xml job01

macchinetta-batch-blank's People

Contributors

macchinetta-fw avatar nota-ja avatar tiwatsuka avatar yuta-koizumi avatar

Stargazers

Uchiru avatar

Watchers

James Cloos avatar  avatar

macchinetta-batch-blank's Issues

`mvn` fails in macchinetta-batch-blankproject

Description

Running mvn in macchinetta-batch-blankproject fails with errors as follows:
macchinetta-batch-blankproject 内で mvn コマンドを実行すると以下のようなエラーが発生して失敗する:

$ cd macchinetta-batch-blankproject/
$ mvn clean package
[INFO] Scanning for projects...
Downloading from central: http://repo1.maven.org/maven2/org/springframework/boot/spring-boot-dependencies/2.1.2.RELEASE/spring-boot-dependencies-2.1.2.RELEASE.pom
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[ERROR] Non-resolvable import POM: Could not transfer artifact org.springframework.boot:spring-boot-dependencies:pom:2.1.2.RELEASE from/to central (http://repo1.maven.org/maven2/): Failed to transfer file http://repo1.maven.org/maven2/org/springframework/boot/spring-boot-dependencies/2.1.2.RELEASE/spring-boot-dependencies-2.1.2.RELEASE.pom with status code 501 @ line 50, column 25
[ERROR] 'dependencies.dependency.version' for org.hibernate.validator:hibernate-validator:jar is missing. @ line 71, column 21
[ERROR] 'dependencies.dependency.version' for org.glassfish:javax.el:jar is missing. @ line 76, column 21
[ERROR] 'dependencies.dependency.version' for ch.qos.logback:logback-classic:jar is missing. @ line 82, column 21
[ERROR] 'dependencies.dependency.version' for com.h2database:h2:jar is missing. @ line 88, column 21
[ERROR] 'dependencies.dependency.version' for org.postgresql:postgresql:jar is missing. @ line 94, column 21
 @
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR]   The project xxxxxx.yyyyyy.zzzzzz:projectName:2.1.1.RELEASE (/Users/nota/repos/Macchinetta/macchinetta-batch-blank/macchinetta-batch-blankproject/pom.xml) has 6 errors
[ERROR]     Non-resolvable import POM: Could not transfer artifact org.springframework.boot:spring-boot-dependencies:pom:2.1.2.RELEASE from/to central (http://repo1.maven.org/maven2/): Failed to transfer file http://repo1.maven.org/maven2/org/springframework/boot/spring-boot-dependencies/2.1.2.RELEASE/spring-boot-dependencies-2.1.2.RELEASE.pom with status code 501 @ line 50, column 25 -> [Help 2]
[ERROR]     'dependencies.dependency.version' for org.hibernate.validator:hibernate-validator:jar is missing. @ line 71, column 21
[ERROR]     'dependencies.dependency.version' for org.glassfish:javax.el:jar is missing. @ line 76, column 21
[ERROR]     'dependencies.dependency.version' for ch.qos.logback:logback-classic:jar is missing. @ line 82, column 21
[ERROR]     'dependencies.dependency.version' for com.h2database:h2:jar is missing. @ line 88, column 21
[ERROR]     'dependencies.dependency.version' for org.postgresql:postgresql:jar is missing. @ line 94, column 21
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException

Possible Solutions

It seems caused because the Maven Central repository stopped supporting http protocol since 2020-01-15.
これは,Maven Central リポジトリーが 2020-01-15 以降 http プロトコルをサポートしなくなったことに起因するものと考えられる。

Thus, it should be solved by replacing http://repo1.maven.org/maven2/ in macchinetta-batch-blankproject/pom.xml with https://repo1.maven.org/maven2/:
すなわち,macchinetta-batch-blankproject/pom.xml 内の http://repo1.maven.org/maven2/https://repo1.maven.org/maven2/ に置き換えることで,この問題は解決すると考えられる:

diff --git macchinetta-batch-blankproject/pom.xml macchinetta-batch-blankproject/pom.xml
index 2fd67ab..95ff82c 100644
--- macchinetta-batch-blankproject/pom.xml
+++ macchinetta-batch-blankproject/pom.xml
@@ -30,7 +30,7 @@
             </snapshots>
             <id>central</id>
             <name>Maven Central repository</name>
-            <url>http://repo1.maven.org/maven2/</url>
+            <url>https://repo1.maven.org/maven2/</url>
         </repository>
     </repositories>

Affects Version/s

All versions that refers http://repo1.maven.org/maven2/ in pom.xml.
pom.xml で http://repo1.maven.org/maven2/ を参照している全てのバージョン。

Fix Version/s

(To be written later by project member)

Issue Links

(None)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.