Hello I want to use swagger-codegen on Ubuntu 14.04 LTS (OS type 64-bit). So I downloaded the source code from https://github.com/swagger-api/swagger-codegen/tree/v2.1.5 , unzipped it and build with maven.
$ sudo mvn -e package The error appears: ... [INFO] Copying 438 resources [INFO] [compiler:compile {execution: default-compile}] [INFO] Changes detected - recompiling the module! [INFO] Compiling 66 source files to /home/user/ProgramFiles/swagger-codegen-2.1.5/modules/swagger-codegen/target/classes [INFO] ------------------------------------------------------------- [ERROR] COMPILATION ERROR : [INFO] ------------------------------------------------------------- [ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK? [INFO] 1 error [INFO] ------------------------------------------------------------- [INFO] ------------------------------------------------------------------------ [ERROR] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Compilation failure No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK? [INFO] ------------------------------------------------------------------------ [INFO] Trace org.apache.maven.BuildFailureException: Compilation failure No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK? at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:715) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138) at org.apache.maven.cli.MavenCli.main(MavenCli.java:362) at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) at org.codehaus.classworlds.Launcher.main(Launcher.java:375) Caused by: org.apache.maven.plugin.compiler.CompilationFailureException: Compilation failure No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK? at org.apache.maven.plugin.compiler.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:745) at org.apache.maven.plugin.compiler.CompilerMojo.execute(CompilerMojo.java:118) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694) ... 17 more ------ "mvn -v" output is: Apache Maven 2.2.1 (rdebian-14) Java version: 1.8.0_71 Java home: /home/user/ProgramFiles/jdk1.8.0_71/jre Default locale: en_US, platform encoding: UTF-8 OS name: "linux" version: "3.19.0-49-generic" arch: "amd64" Family: "unix" Thanks