Closed hit56 closed 7 years ago
Hi Erik,
I mean in the folder "jcore-base/jcore-types/src/main/java/" there can not find Sentence.java.
When I compile the whole project. This file can't compiled successful: https://github.com/JULIELab/jcore-base/blob/master/jcore-jsbd-ae/src/main/java/de/julielab/jcore/ae/jsbd/main/SentenceAnnotator.java
The 40th line in that file is: import de.julielab.jcore.types.Sentence;
The IntelliJ IDEA shows the ERROR: Cannot resolve symbol 'Sentence'.
Thank you for your answer.
Hi hit56,
ah, I understand. As you may know, UIMA creates the actual Java classes from the Type System descriptors. You would need to use the UIMA JCasGen tool to create the classes. For this, the convenience descriptor "jcore-all-types.xml" exists that imports all other Type System Descriptors. In Eclipse there is a UIMA plugin, the "Component Descriptor Editor" which offers a button for this at the "Type System" tab. For IntelliJ, I don't know. However, the JCasGen script is just a normal UIMA tool. You could just install UIMA (basically, download it from https://uima.apache.org/downloads.cgi, unpack it and set the UIMA_HOME environment variable to the unpacked directory) and build the types.
However, this issue came up within our group just yesterday. Perhaps we should consider to have a build script call the JCasGen script.
@fmatthies , @hellrich , @buechel What do you think?
Couldn't we simply use the JCasGen Maven plugin? https://uima.apache.org/d/uimaj-2.6.0/tools.html#ugr.tools.jcasgen.maven_plugin
I can imagine not checking in java class may lead to some hard to find issues when getting started with JCoRe. So I would be in favor of checking them in (if there is not some problem with that we haven't talked about yet).
The pom.xml
of jcore-types
features now the JCasGen Maven plugin, that @hellrich mentioned.
@hit56, I tested it with Intellij IDEA and after importing jcore-base, I could rightclick on jcore-types > Maven > Generate Sources and Update Folder
and the Java files were sucessfully created, therefore fixing the error
The IntelliJ IDEA shows the ERROR: Cannot resolve symbol 'Sentence'.
(maybe someone can look into the issue why they aren't created on import and/or checking if this holds true for Eclipse, as well).
@buechel, I would leave it as it is right now and not committing the Java files, since they arent't source code that is improved/changed in any way. All changes take place in the xml files.
Thank you for all your answers.
I've tried to update the pom.xml under "jcore-types" using the JCasGen Maven plugin as @hellrich mentioned. But new ERROR occured:
I thought the respository may be not set properly. So I tried many respositories in http://stackoverflow.com/questions/161819/what-are-main-best-maven-respositories-to-use, and tried different version of "jcasgen-maven-plugin" from 2.4.1 to 2.9.0, the ERROR still exists.
I wish you can paste your pom.xml here.@fmatthies Thank you very much.
@hit56 @fmatthies has already updated the pom.xml in our master branch: https://github.com/JULIELab/jcore-base/blob/master/jcore-types/pom.xml
Great. I see. My problem has been solved! Thank you!
Hi hit56,
You can find the Sentence definition in the descriptor https://github.com/JULIELab/jcore-base/blob/master/jcore-types/src/main/resources/de/julielab/jcore/types/jcore-morpho-syntax-types.xml <https://github.com/JULIELab/jcore-base/blob/master/jcore-types/src/main/resources/de/julielab/jcore/types/jcore-morpho-syntax-types.xml. Its name is de.julielab.jcore.types.Sentence.
If this doesn’t help with your issue, please give us a few more details so we can understand the problem better.
Cheers!
Erik