Skip to content
This repository has been archived by the owner on Mar 10, 2022. It is now read-only.

Could not build JAR files via mvn package command #46

Open
faganihajizada opened this issue May 3, 2021 · 0 comments
Open

Could not build JAR files via mvn package command #46

faganihajizada opened this issue May 3, 2021 · 0 comments

Comments

@faganihajizada
Copy link

OS: Ubuntu 20.04.2 LTS
openjdk version "11.0.11" 2021-04-20
OpenJDK Runtime Environment (build 11.0.11+9-Ubuntu-0ubuntu2.20.04)
OpenJDK 64-Bit Server VM (build 11.0.11+9-Ubuntu-0ubuntu2.20.04, mixed mode, sharing)
Apache Maven 3.6.3
Maven home: /usr/share/maven
Java version: 11.0.11, vendor: Ubuntu, runtime: /usr/lib/jvm/java-11-openjdk-amd64

Logs:

[INFO] Compiling 4 source files to /home/ubuntu/graylog-plugin-metrics-reporter/metrics-reporter-core/target/classes
An exception has occurred in the compiler (9-internal). Please file a bug against the Java compiler via the Java bug reporting page (http://bugreport.java.com) after checking the Bug Database (http://bugs.java.com) for duplicates. Include your program and the following diagnostic in your report. Thank you.
java.io.UncheckedIOException: java.nio.file.NotDirectoryException: /usr/lib/jvm/java-11-openjdk-amd64/lib/modules
        at com.sun.tools.javac.file.Locations$BootClassPathLocationHandler.lazy(Locations.java:712)
        at com.sun.tools.javac.file.Locations$BootClassPathLocationHandler.isDefault(Locations.java:546)
        at com.sun.tools.javac.file.Locations.isDefaultBootClassPath(Locations.java:126)
        at com.sun.tools.javac.file.BaseFileManager.isDefaultBootClassPath(BaseFileManager.java:204)
        at com.sun.tools.javac.main.Arguments.validate(Arguments.java:479)
        at com.sun.tools.javac.api.JavacTaskImpl.prepareCompiler(JavacTaskImpl.java:168)
        at com.sun.tools.javac.api.JavacTaskImpl.access$000(JavacTaskImpl.java:69)
        at com.sun.tools.javac.api.JavacTaskImpl$1.call(JavacTaskImpl.java:96)
        at com.sun.tools.javac.api.JavacTaskImpl$1.call(JavacTaskImpl.java:93)
        at com.sun.tools.javac.api.JavacTaskImpl.handleExceptions(JavacTaskImpl.java:128)
        at com.sun.tools.javac.api.JavacTaskImpl.doCall(JavacTaskImpl.java:93)
        at com.sun.tools.javac.api.JavacTaskImpl.call(JavacTaskImpl.java:87)
        at com.google.errorprone.BaseErrorProneJavaCompiler$1.call(BaseErrorProneJavaCompiler.java:99)
        at com.google.errorprone.BaseErrorProneCompiler.run(BaseErrorProneCompiler.java:137)
        at com.google.errorprone.BaseErrorProneCompiler.run(BaseErrorProneCompiler.java:108)
        at com.google.errorprone.ErrorProneCompiler.run(ErrorProneCompiler.java:119)
        at com.google.errorprone.ErrorProneCompiler.compile(ErrorProneCompiler.java:66)
        at org.codehaus.plexus.compiler.javac.errorprone.JavacCompilerWithErrorProne$CompilerInvoker.compile(JavacCompilerWithErrorProne.java:219)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        at org.codehaus.plexus.compiler.javac.errorprone.JavacCompilerWithErrorProne.performCompile(JavacCompilerWithErrorProne.java:91)
        at org.apache.maven.plugin.compiler.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:943)
        at org.apache.maven.plugin.compiler.CompilerMojo.execute(CompilerMojo.java:137)
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:210)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:156)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:148)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
        at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:56)
        at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:305)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:192)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:105)
        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:957)
        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:289)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:193)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:282)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:225)
        at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:406)
        at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:347)
Caused by: java.nio.file.NotDirectoryException: /usr/lib/jvm/java-11-openjdk-amd64/lib/modules
        at java.base/sun.nio.fs.UnixFileSystemProvider.newDirectoryStream(UnixFileSystemProvider.java:431)
        at java.base/java.nio.file.Files.newDirectoryStream(Files.java:472)
        at java.base/java.nio.file.Files.list(Files.java:3699)
        at com.sun.tools.javac.file.Locations$BootClassPathLocationHandler.systemClasses(Locations.java:665)
        at com.sun.tools.javac.file.Locations$BootClassPathLocationHandler.computePath(Locations.java:621)
        at com.sun.tools.javac.file.Locations$BootClassPathLocationHandler.lazy(Locations.java:709)
        ... 46 more
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for Graylog Metrics Reporter Plugin (Parent POM) 3.0.1-SNAPSHOT:
[INFO]
[INFO] Graylog Metrics Reporter Plugin (Parent POM) ....... SUCCESS [ 28.961 s]
[INFO] Graylog Metrics Reporter Core Classes .............. FAILURE [  2.772 s]
[INFO] Graylog Metrics Console Reporter Plugin ............ SKIPPED
[INFO] Graylog Metrics CSV Reporter Plugin ................ SKIPPED
[INFO] Graylog Metrics JMX Reporter Plugin ................ SKIPPED
[INFO] Graylog Metrics SLF4J Reporter Plugin .............. SKIPPED
[INFO] Graylog Metrics Ganglia Reporter Plugin ............ SKIPPED
[INFO] Graylog Metrics Graphite Reporter Plugin ........... SKIPPED
[INFO] Graylog Metrics Cassandra Reporter Plugin .......... SKIPPED
[INFO] Graylog Metrics Datadog Reporter Plugin ............ SKIPPED
[INFO] Graylog Metrics Elasticsearch Reporter Plugin ...... SKIPPED
[INFO] Graylog Metrics GELF Reporter Plugin ............... SKIPPED
[INFO] Graylog Metrics InfluxDB Reporter Plugin ........... SKIPPED
[INFO] Graylog Metrics Librato Reporter Plugin ............ SKIPPED
[INFO] Graylog Metrics MongoDB Reporter Plugin ............ SKIPPED
[INFO] Graylog Metrics OpenTSDB Reporter Plugin ........... SKIPPED
[INFO] Graylog Metrics Prometheus Reporter Plugin ......... SKIPPED
[INFO] Graylog Metrics statsd Reporter Plugin ............. SKIPPED
[INFO] Graylog Metrics CloudWatch Reporter Plugin ......... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  32.289 s
[INFO] Finished at: 2021-05-03T15:42:10Z
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.6.1:compile (default-compile) on project metrics-reporter-core: Compilation failure -> [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
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <args> -rf :metrics-reporter-core

@faganihajizada faganihajizada changed the title mvn package does not build JAR files Could not build JAR files via mvn package command May 3, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant