111429 (1) [Avatar] Offline
#1
Hello,

I have downloaded the source code for Spring in Action book and opened the maven project using IntelliJ IDE.

I am not able to run it by right mouse click on cho2 GeneratesJobMetaData.java program that has a main and then run it.

The error is

Error:(6, 51) java: package org.springframework.batch.item.file.mapping does not exist

I tried the command below from cho2 directory.

> mvn exec:exec -Dexec.executable="com.manning.sbia.ch02.GeneratesJobMetaData" -Dexec.args="%classpath"

The error is shown below:

[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.4.0:exec (default-cli) on project ch02: Command execution failed. Cannot run program "com.manning.sbia.ch02.GeneratesJobMetaData" (in directory "/Users/vganesh/git/books/springbatch-in-action/sbia/ch02"): error=2, No such file or directory -> [Help 1]


What is the correct way to run this main program?

Thanks and regards,