uwol / proleap-cobol-parser

ProLeap ANTLR4-based parser for COBOL
MIT License
136 stars 74 forks source link

Building cobol85parser 2.3.0-SNAPSHOT fails - due to compile errors #46

Closed Reinhard-Prehofer closed 6 years ago

Reinhard-Prehofer commented 6 years ago

I tried a maven build / test / install etc on the recent snapshot offered via git:

[INFO] Scanning for projects...
[INFO] Downloading: https://devtools/artifactory/repos/org/apache/maven/wagon/wagon-ftp/maven-metadata.xml
[INFO] Downloaded: https://devtools/artifactory/repos/org/apache/maven/wagon/wagon-ftp/maven-metadata.xml (1.2 kB at 109 B/s)
[INFO] 
[INFO] ------------------------------------------------------------------------
[INFO] Building cobol85parser 2.3.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- antlr4-maven-plugin:4.7:antlr4 (run antlr) @ cobol85parser ---
[INFO] No grammars to process
[INFO] ANTLR 4: Processing source directory C:\DATEN\WS-Cobol2Java\Cobol85Parser\src\main\antlr4
[INFO] 
[INFO] --- maven-resources-plugin:3.0.2:resources (default-resources) @ cobol85parser ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO] Copying 0 resource
[INFO] 
[INFO] --- maven-compiler-plugin:3.6.1:compile (default-compile) @ cobol85parser ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 1136 source files to C:\DATEN\WS-Cobol2Java\Cobol85Parser\target\classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR : 
[INFO] -------------------------------------------------------------
[ERROR] /C:/DATEN/WS-Cobol2Java/Cobol85Parser/src/main/java/io/proleap/cobol/asg/metamodel/procedure/skip/impl/SkipStatementImpl.java:[11,38] cannot find symbol
  symbol:   class SkipStatementContext
  location: class io.proleap.cobol.Cobol85Parser
[ERROR] /C:/DATEN/WS-Cobol2Java/Cobol85Parser/src/main/java/io/proleap/cobol/asg/metamodel/procedure/skip/impl/SkipStatementImpl.java:[21,25] cannot find symbol
  symbol:   class SkipStatementContext
  location: class io.proleap.cobol.asg.metamodel.procedure.skip.impl.SkipStatementImpl
[ERROR] /C:/DATEN/WS-Cobol2Java/Cobol85Parser/src/main/java/io/proleap/cobol/asg/metamodel/procedure/skip/impl/SkipStatementImpl.java:[27,90] cannot find symbol
  symbol:   class SkipStatementContext
  location: class io.proleap.cobol.asg.metamodel.procedure.skip.impl.SkipStatementImpl
[ERROR] /C:/DATEN/WS-Cobol2Java/Cobol85Parser/src/main/java/io/proleap/cobol/asg/metamodel/procedure/eject/impl/EjectStatementImpl.java:[11,38] cannot find symbol
  symbol:   class EjectStatementContext
  location: class io.proleap.cobol.Cobol85Parser
[ERROR] /C:/DATEN/WS-Cobol2Java/Cobol85Parser/src/main/java/io/proleap/cobol/asg/metamodel/procedure/eject/impl/EjectStatementImpl.java:[21,25] cannot find symbol
  symbol:   class EjectStatementContext
  location: class io.proleap.cobol.asg.metamodel.procedure.eject.impl.EjectStatementImpl
[ERROR] /C:/DATEN/WS-Cobol2Java/Cobol85Parser/src/main/java/io/proleap/cobol/asg/metamodel/procedure/eject/impl/EjectStatementImpl.java:[25,91] cannot find symbol
  symbol:   class EjectStatementContext
  location: class io.proleap.cobol.asg.metamodel.procedure.eject.impl.EjectStatementImpl
[INFO] 6 errors 
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 32.379 s
[INFO] Finished at: 2017-12-08T10:24:11+01:00
[INFO] Final Memory: 23M/387M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.6.1:compile (default-compile) on project cobol85parser: Compilation failure: Compilation failure: 
[ERROR] /C:/DATEN/WS-Cobol2Java/Cobol85Parser/src/main/java/io/proleap/cobol/asg/metamodel/procedure/skip/impl/SkipStatementImpl.java:[11,38] cannot find symbol
[ERROR]   symbol:   class SkipStatementContext
[ERROR]   location: class io.proleap.cobol.Cobol85Parser
[ERROR] /C:/DATEN/WS-Cobol2Java/Cobol85Parser/src/main/java/io/proleap/cobol/asg/metamodel/procedure/skip/impl/SkipStatementImpl.java:[21,25] cannot find symbol
[ERROR]   symbol:   class SkipStatementContext
[ERROR]   location: class io.proleap.cobol.asg.metamodel.procedure.skip.impl.SkipStatementImpl
[ERROR] /C:/DATEN/WS-Cobol2Java/Cobol85Parser/src/main/java/io/proleap/cobol/asg/metamodel/procedure/skip/impl/SkipStatementImpl.java:[27,90] cannot find symbol
[ERROR]   symbol:   class SkipStatementContext
[ERROR]   location: class io.proleap.cobol.asg.metamodel.procedure.skip.impl.SkipStatementImpl
[ERROR] /C:/DATEN/WS-Cobol2Java/Cobol85Parser/src/main/java/io/proleap/cobol/asg/metamodel/procedure/eject/impl/EjectStatementImpl.java:[11,38] cannot find symbol
[ERROR]   symbol:   class EjectStatementContext
[ERROR]   location: class io.proleap.cobol.Cobol85Parser
[ERROR] /C:/DATEN/WS-Cobol2Java/Cobol85Parser/src/main/java/io/proleap/cobol/asg/metamodel/procedure/eject/impl/EjectStatementImpl.java:[21,25] cannot find symbol
[ERROR]   symbol:   class EjectStatementContext
[ERROR]   location: class io.proleap.cobol.asg.metamodel.procedure.eject.impl.EjectStatementImpl
[ERROR] /C:/DATEN/WS-Cobol2Java/Cobol85Parser/src/main/java/io/proleap/cobol/asg/metamodel/procedure/eject/impl/EjectStatementImpl.java:[25,91] cannot find symbol
[ERROR]   symbol:   class EjectStatementContext
[ERROR]   location: class io.proleap.cobol.asg.metamodel.procedure.eject.impl.EjectStatementImpl
[ERROR] -> [Help 1]
[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/MojoFailureException
uwol commented 6 years ago

It seems that in your project the antlr4-maven-plugin does not find any grammars, and thus does not generate the parser context Java files. Normally antlr4-maven-plugin should search for grammars in src/main/antlr4/io/proleap/cobol.

I have to take a look, what the problem with antlr4-maven-plugin might be. In my Eclipse project, at least a project clean solves mosts problems.

Reinhard-Prehofer commented 6 years ago

I rebuilt the cobol85 parser in a new project - successfully without any problems. I rather think I had a mix of old and new java sources in the old project/workspace where the errors had occurred. So I opt for closing that issue.