Compiling JSesh in eclipse
The latest versions of JSesh (currently only available in mercurial) use maven 2. To use eclipse with maven, you need a maven plugin, m2eclipse, which is still a bit unstable. There are problems with generated java source code, and multi-modules software.
JSesh uses Cups and JLex to create the parser which will read the Manuel de Codage code. In maven, all code created automatically goes in the target/generatedSource folder.
The latest maven eclipse plugin doesn't seem to find those folders, and the "jsesh" maven module will report missing classes in eclipse.
A quick fix:
- import the JSesh-all project in eclipse (import maven project)
- open the JSesh-all module, and, on the pom.xml file, select "run as/maven install". This will create the missing files
-
Open the jsesh module and add the folders target/generatedSource/lex and target/generatedSource/cup to the jsesh eclipse project as "source folders".
- In the jsesh module, open target/generated sources
- Then right click on target/generated sources/cup, and select the menu entry "build path/use as source folder". do the same for the target/generated sources/lex folder.
The eclipse plugin also has difficulties with using maven plugin embedded in the project itself. It reports something like
Could not calculate build plan: Could not find artifact org.qenherkhopeshef:prepareJSeshRelease:pom:4.6-SNAPSHOT
Running "maven install" also solves this problem (you might need to quit and restart eclipse for the new modules to be seen, or to clear and rebuild the maven repository index in eclipse). The best way to do it is probably to run it from a text console before running eclipse.
That's it.