Orange-OpenSource / conllueditor

ConllEditor is a tool to edit dependency syntax trees in CoNLL-U format.
BSD 3-Clause "New" or "Revised" License
54 stars 17 forks source link

installing problem #26

Closed hezaoke closed 1 year ago

hezaoke commented 1 year ago

Hi! I am new to conlluEditor. As others have pointed out, the installation is a pain on the back. I spent quite a bit time this afternoon and this evening trying to work this out, but still get the following error after running "mvn install":

[ERROR] Failed to execute goal pl.project13.maven:git-commit-id-plugin:4.9.10:revision (get-the-git-infos) on project ConlluEditor: .git directory is not found! Please specify a valid [dotGitDirectory] in your pom.

It said build failure.

Do you know where might be the problem?

Thanks, Alan

jheinecke commented 1 year ago

Hi, Most likely this is because you got the code via download instead of doing git clone https://github.com/Orange-OpenSource/conllueditor.git. I'll have to change this in the near future, when I got some time. So either you clone the whol thing or you do just

git init .
git add pom.xml
git commit -m "message"

(possibly you have to run mvn install twice. There is another error in this case I have to sort out) Hope that helps Johannes

jheinecke commented 1 year ago

I have just pushed the corrections to compile without .git just re-get the code or run git clone https://github.com/Orange-OpenSource/conllueditor.git or git pull to get the latest version.

hezaoke commented 1 year ago

Thank you Johannes! I tried both options (downloaded directly from github or clone from github) and try "mvn install" again. The following shows errors from each of the options:

  1. if downloading from github, I get the following error

[INFO] --- git-commit-id-plugin:4.9.10:revision (get-the-git-infos) @ ConlluEditor --- [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 7.881 s [INFO] Finished at: 2022-11-04T08:24:36-04:00 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal pl.project13.maven:git-commit-id-plugin:4.9.10:revision (get-the-git-infos) on project ConlluEditor: Could not complete Mojo execution...: Error: Could not get HEAD Ref, are you sure you have some commits in the dotGitDirectory? -> [Help 1]

  1. if cloning from github:

Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/maven-plugin-api/3.0.5/maven-plugin-api-3.0.5.pom Downloading from central: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-compiler-api/2.2/plexus-compiler-api-2.2.pom Downloading from central: https://repo.maven.apache.org/maven2/org/antlr/antlr4/4.9.2/antlr4-4.9.2.pom Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/maven-project/2.2.1/maven-project-2.2.1.pom [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 32.197 s [INFO] Finished at: 2022-11-04T08:28:44-04:00 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.antlr:antlr4-maven-plugin:4.9.2:antlr4 (antlr) on project ConlluEditor: Execution antlr of goal org.antlr:antlr4-maven-plugin:4.9.2:antlr4 failed: Plugin org.antlr:antlr4-maven-plugin:4.9.2 or one of its dependencies could not be resolved: Failed to collect dependencies at org.antlr:antlr4-maven-plugin:jar:4.9.2 -> org.apache.maven:maven-plugin-api:jar:3.0.5: Failed to read artifact descriptor for org.apache.maven:maven-plugin-api:jar:3.0.5: Could not transfer artifact org.apache.maven:maven-plugin-api:pom:3.0.5 from/to central (https://repo.maven.apache.org/maven2): transfer failed for https://repo.maven.apache.org/maven2/org/apache/maven/maven-plugin-api/3.0.5/maven-plugin-api-3.0.5.pom: Unknown host repo.maven.apache.org: nodename nor servname provided, or not known -> [Help 1]

Is this because I do not have a dependency for maven installed?

If I run "mvn --version", I see the following, which seems to be fine: Apache Maven 3.8.6 (84538c9988a25aec085021c365c560670ad80f63) Maven home: /Users/mac/apache-maven-3.8.6 Java version: 19.0.1, vendor: Oracle Corporation, runtime: /Library/Java/JavaVirtualMachines/jdk-19.jdk/Contents/Home Default locale: en_US, platform encoding: UTF-8 OS name: "mac os x", version: "12.6", arch: "x86_64", family: "mac"

Thank you again for your help!

jheinecke commented 1 year ago

Hi are you sure that you doewnloaded the altest version (2.19.1) for your 1;-installation ? It should ignore the absence of .git. It looks like sung git clone ... and mvn install, that meven does not find plugins and dependencies which it should find. Maven installs all missing stuff automagically. I do not know whether this is related to your network/proxy maven mirror or to MacOS or a strange bug in my pom.xml. I'm on Linux without access to MacOS. I just deleted all my maven cache, and it redownloads everything. Can you try to backup your local maven repository and retry ?

jheinecke commented 1 year ago

If everything fails, try a release (I'ill upload the release for V2.19.1 later today, but sightly older versions are available there

hezaoke commented 1 year ago

Now with clone it works! (I did not try direct downloading yet) Thank you!

I was then able to open the server, but I encountered an error as follows, and my server does not read the conllu file:

Git dir untracked +++ edited file 'test.conllu' not tracked by git, writing all changes to 'test.conllu.2' Loading /Users/mac/conllueditor/test.conllu 35 lines (1 sentences) read Number of sentences loaded: 1 Invalid value for option --saveAfter. Must be positive integer Invalid value for option --shortcutTimeout. Must be positive integer *** Error: /path/to/ConlluEditor/gui does not exist Shutting down ConlluEditor ...

Does this signals that some of the files (e.g., saveAfter) should be changed?

The Conllu file seems to be fine. Please let me know if you would like to take a look at it.

jheinecke commented 1 year ago

conlluedit.sh has an -r option which tells the server where the html/js stuff is. On Linux this works straight forward, if I remember well there was a problem on Mac a while ago. Try to use

bin/conlluedit.sh --rootdir  /absolute/path/to/conllueditor/gui ...

and replace /absolute/path/to/ with the path where you put the whole thing

hezaoke commented 1 year ago

I ran what you suggested as follows but got the a similar error as before. Although the "*** Error: /path/to/ConlluEditor/gui does not exist" error disappears. I still could not see the tree:

% bin/conlluedit.sh --rootdir /Users/mac/conllueditor/gui test.conllu 8888

jar: /Users/mac/conllueditor/bin/../target/ConlluEditor-2.19.1-jar-with-dependencies.jar ConlluEditor V 2.19.1 (commit 653812c) Git dir untracked +++ edited file 'test.conllu' not tracked by git, writing all changes to 'test.conllu.2' Loading /Users/mac/conllueditor/test.conllu 35 lines (1 sentences) read Number of sentences loaded: 1 Invalid value for option --saveAfter. Must be positive integer Invalid value for option --shortcutTimeout. Must be positive integer

jheinecke commented 1 year ago

That looks OK (apart from the two option errors). Now open your Chrome/Firefox (don't know about Safari, should work though) on http://localhost:8888/

hezaoke commented 1 year ago

The problem is the server does not show any tree. Clicking "read sentence" does not show the sentence. The file name is also not displayed. I attach the a screenshot for your reference.

Screen Shot 2022-11-04 at 4 00 44 PM
jheinecke commented 1 year ago

You forget to install jqery etc (see "Compilation" section in the README.md) or run bin/installJQ.sh (also mentioned there :-)

hezaoke commented 1 year ago

Awesome. I installed jqery before, but it was lost when I removed the conllueditor folder to reclone the whole folder. Thank you so much for your help. Really appreciate it!

jheinecke commented 1 year ago

Happy to see it works for you!