I have a piece of code which has JRecord related components and Maven cannot find the dependency for cb2xml, so all the code is red. I looked for info on the internet, but could not find much. So ICobolIOBuilder
, JRecordInterface1
and everything related to JRecord cannot be found.
I will post my code, can anyone help me with the dependencies?
final ICobolIOBuilder ioBldr = JRecordInterface1.COBOL
.newIOBuilder(copyBookFile)
.setFont("cp273")
.setDialect(ICopybookDialects.FMT_MAINFRAME);
final AbstractLineReader reader = ioBldr.newReader(dataFile);
AbstractLine l;
while ((l = reader.read()) != null) {
System.out.println(">>>>>" + l.getFullLine());
System.out.print("<<<<<");
final FieldIterator iter = l.getFieldIterator(0);
while (iter.hasNext()) {
final AbstractFieldValue field = iter.next();
System.out.print("|" + field.getFieldDetail().getName() + "=" + field.asString());
}
System.out.println("");
}
reader.close();
The dependencies related to Cobol I have are:
<dependency>
<groupId>net.sf.cobol2j</groupId>
<artifactId>cobol2j</artifactId>
<version>1.5.4</version>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>2.6</version>
</dependency>
Please add following dependency in pom.xml file
Add repository:
It will download all necessary files from Pentaho Now you can do maven update and maven clean install