Bug 573638 - maven build error
Summary: maven build error
Status: RESOLVED FIXED
Alias: None
Product: JGit
Classification: Technology
Component: JGit (show other bugs)
Version: 5.12   Edit
Hardware: PC Linux
: P3 critical with 1 vote (vote)
Target Milestone: 6.0   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-05-19 08:11 EDT by Martin R. CLA
Modified: 2021-09-29 15:24 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin R. CLA 2021-05-19 08:11:24 EDT
I am new to maven, but their docs state that the usual build command is
mvn verify
doing this after checking out the current git repo (https://github.com/eclipse/jgit) results in:


[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  02:00 min (Wall Clock)
[INFO] Finished at: 2021-05-19T13:53:35+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:3.2.0:jar (default) on project org.eclipse.jgit.ssh.jsch: MavenReportException: Error while generating Javadoc: 
[ERROR] Exit code: 1 - error: module org.eclipse.jgit.ssh.jsch reads package org.eclipse.jgit.transport from both org.eclipse.jgit and org.eclipse.jgit.ssh.jsch
[ERROR] error: module org.slf4j reads package org.eclipse.jgit.transport from both org.eclipse.jgit.ssh.jsch and org.eclipse.jgit
[ERROR] error: module org.eclipse.jgit reads package org.eclipse.jgit.transport from both org.eclipse.jgit and org.eclipse.jgit.ssh.jsch
[ERROR] error: the unnamed module reads package org.eclipse.jgit.transport from both org.eclipse.jgit and org.eclipse.jgit.ssh.jsch
[ERROR] 
[ERROR] Command line was: /usr/lib/jvm/java-15-oracle/bin/javadoc -Xdoclint:-missing @options @packages
[ERROR] 
[ERROR] Refer to the generated Javadoc files in '/home/martin/repos/jgit/org.eclipse.jgit.ssh.jsch/target/apidocs' dir.
[ERROR] 
[ERROR] -> [Help 1]
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:3.2.0:jar (default) on project org.eclipse.jgit.gpg.bc: MavenReportException: Error while generating Javadoc: 
[ERROR] Exit code: 1 - /home/martin/repos/jgit/org.eclipse.jgit.gpg.bc/src/org/eclipse/jgit/gpg/bc/internal/keys/KeyGrip.java:18: error: package org.bouncycastle.asn1.cryptlib is not visible
[ERROR] import org.bouncycastle.asn1.cryptlib.CryptlibObjectIdentifiers;
[ERROR]                             ^
[ERROR]   (package org.bouncycastle.asn1.cryptlib is declared in module org.bouncycastle.provider, which does not export it)
[ERROR] 
[ERROR] Command line was: /usr/lib/jvm/java-15-oracle/bin/javadoc -Xdoclint:-missing @options @packages
[ERROR] 
[ERROR] Refer to the generated Javadoc files in '/home/martin/repos/jgit/org.eclipse.jgit.gpg.bc/target/apidocs' dir.
[ERROR] 
[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/MojoExecutionException
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <args> -rf :org.eclipse.jgit.ssh.jsch

running from Apache Maven 3.6.3 (standard ubuntu 20.04 maven apt repo)
Comment 1 Martin R. CLA 2021-05-19 08:19:11 EDT
This happens on the master branch as well as on the stable-5.12 as well as stable-5.10 branches.
Comment 2 Thomas Wolf CLA 2021-05-19 09:32:07 EDT
Build with Java 8.
Comment 3 Matthias Sohn CLA 2021-05-19 09:35:05 EDT
The github repository is not the canonical repository but a mirror [1].
Building JGit and EGit is described in the contributor guide [2].

The JGit build still requires Java 8, updating the minimum Java version to 11
is planned for 6.0 (bug 569917).

[1] https://wiki.eclipse.org/EGit/Contributor_Guide#Obtaining_Sources
[2] https://wiki.eclipse.org/EGit/Contributor_Guide#Builds
Comment 4 Eclipse Genie CLA 2021-09-12 19:10:48 EDT
New Gerrit change created: https://git.eclipse.org/r/c/jgit/jgit/+/185344
Comment 6 Matthias Sohn CLA 2021-09-29 15:24:01 EDT
master now builds with Java 11 or higher