forTEXT / catma

Computer Assisted Text Markup and Analysis
https://www.catma.de
GNU General Public License v3.0
87 stars 9 forks source link

Compilation error: The following artifacts could not be resolved: org.vaadin:elements:jar:0.2.3-SNAPSHOT #340

Closed fishfree closed 4 months ago

fishfree commented 7 months ago

Java version 11.0.21 Apache Maven 3.6.3 git clone https://github.com/forTEXT/catma cd catma mvn clean compile package

Downloaded from central: https://repo.maven.apache.org/maven2/org/xerial/sqlite-jdbc/3.41.2.2/sqlite-jdbc-3.41.2.2.jar (13 MB at 673 kB/s)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  07:06 min
[INFO] Finished at: 2023-12-12T04:46:59Z
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project catma: Could not resolve dependencies for project de.catma:catma:war:7.0-SNAPSHOT: The following artifacts could not be resolved: org.vaadin:elements:jar:0.2.3-SNAPSHOT, org.gitlab4j:gitlab4j-api:jar:5.0.1-CATMA-v2: Could not find artifact org.vaadin:elements:jar:0.2.3-SNAPSHOT in vaadin-addons (https://maven.vaadin.com/vaadin-addons) -> [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/DependencyResolutionException
maltem-za commented 6 months ago

Hello, please have a look at this issue comment and the surrounding discussion. Also note that CATMA is still on Java 8 currently.

[Edited 12/12/2023 to remove instructions that were instead added to the issue comment linked to above]

fishfree commented 6 months ago

@maltem-za Thank you! However, I'm not familiar with maven compilation. Could you please share steps and commands about how to mvn package build locally (git clone from the comment-out line? https://github.com/forTEXT/catma/issues/125#issuecomment-859504069

maltem-za commented 6 months ago

@fishfree You need to clone the repositories linked to by the respective comments in pom.xml, then check out the referenced commit/tag and finally mvn clean compile package for each. For example:

git clone https://github.com/forTEXT/serverside-elements.git
cd serverside-elements
git checkout 5745bbf32ab9e31a1eb6bb81ce490bcdabc4fcf2 # you can skip this step because that commit is currently the latest on the master branch anyway
mvn clean compile package

and

git clone https://github.com/forTEXT/gitlab4j-api.git
cd gitlab4j-api
git checkout tags/gitlab4j-api-5.0.1-CATMA-v2 # alternatively just check out the catma-dev branch as the tagged commit is currently the latest on that branch
mvn clean compile package

Now you should have JAR files that you can install in your local Maven repository together with the respective pom.xml files, which you'll find at the root of each of the cloned repos.

fishfree commented 6 months ago

@maltem-za Thank you very much for your tip! Now I compiled the 2 jars and incorporated them into my editted pom.xml. However the compilation with Open-jdk-8 failed as below:

...
[WARNING] COMPILATION WARNING : 
[INFO] -------------------------------------------------------------
[WARNING] /home/mememe/www/catma/src/main/java/de/catma/ui/module/tags/AddSubtagDialog.java: Some input files use or override a deprecated API.
[WARNING] /home/mememe/www/catma/src/main/java/de/catma/ui/module/tags/AddSubtagDialog.java: Recompile with -Xlint:deprecation for details.
[WARNING] /home/mememe/www/catma/src/main/java/de/catma/ui/module/analyze/queryresultpanel/QueryResultPanel.java: Some input files use unchecked or unsafe operations.
[WARNING] /home/mememe/www/catma/src/main/java/de/catma/ui/module/analyze/queryresultpanel/QueryResultPanel.java: Recompile with -Xlint:unchecked for details.
[INFO] 4 warnings 
[INFO] -------------------------------------------------------------
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR : 
[INFO] -------------------------------------------------------------
[ERROR] /home/mememe/www/catma/src/main/java/de/catma/ui/module/main/auth/GoogleRecaptchaVerifier.java:[4,64] package org.glassfish.jersey.jackson.internal.jackson.jaxrs.json does not exist
[ERROR] /home/mememe/www/catma/src/main/java/de/catma/repository/git/graph/lazy/LazyGraphProjectIndexer.java:[25,43] package org.glassfish.jersey.internal.guava does not exist
[ERROR] /home/mememe/www/catma/src/main/java/de/catma/ui/module/main/auth/GoogleRecaptchaVerifier.java:[20,68] cannot find symbol
  symbol:   class JacksonJsonProvider
  location: class de.catma.ui.module.main.auth.GoogleRecaptchaVerifier
[ERROR] /home/mememe/www/catma/src/main/java/de/catma/repository/git/graph/lazy/LazyGraphProjectIndexer.java:[218,58] cannot find symbol
  symbol:   variable Sets
  location: class de.catma.repository.git.graph.lazy.LazyGraphProjectIndexer
[ERROR] /home/mememe/www/catma/src/main/java/de/catma/repository/git/graph/lazy/LazyGraphProjectIndexer.java:[280,58] cannot find symbol
  symbol:   variable Sets
  location: class de.catma.repository.git.graph.lazy.LazyGraphProjectIndexer
[INFO] 5 errors 
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  01:54 min
[INFO] Finished at: 2023-12-29T10:32:28Z
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project catma: Compilation failure: Compilation failure: 
[ERROR] /home/mememe/www/catma/src/main/java/de/catma/ui/module/main/auth/GoogleRecaptchaVerifier.java:[4,64] package org.glassfish.jersey.jackson.internal.jackson.jaxrs.json does not exist
[ERROR] /home/mememe/www/catma/src/main/java/de/catma/repository/git/graph/lazy/LazyGraphProjectIndexer.java:[25,43] package org.glassfish.jersey.internal.guava does not exist
[ERROR] /home/mememe/www/catma/src/main/java/de/catma/ui/module/main/auth/GoogleRecaptchaVerifier.java:[20,68] cannot find symbol
[ERROR]   symbol:   class JacksonJsonProvider
[ERROR]   location: class de.catma.ui.module.main.auth.GoogleRecaptchaVerifier
[ERROR] /home/mememe/www/catma/src/main/java/de/catma/repository/git/graph/lazy/LazyGraphProjectIndexer.java:[218,58] cannot find symbol
[ERROR]   symbol:   variable Sets
[ERROR]   location: class de.catma.repository.git.graph.lazy.LazyGraphProjectIndexer
[ERROR] /home/mememe/www/catma/src/main/java/de/catma/repository/git/graph/lazy/LazyGraphProjectIndexer.java:[280,58] cannot find symbol
[ERROR]   symbol:   variable Sets
[ERROR]   location: class de.catma.repository.git.graph.lazy.LazyGraphProjectIndexer
[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
maltem-za commented 5 months ago

@fishfree You shouldn't edit the pom.xml file but rather install the two JAR files that you compiled in your local Maven repository (how to do that is detailed in the linked issue comment). The build errors are related to missing transitive dependencies that come from gitlab4j-api.