Maven which javac




















The compiler id of the compiler to use. Default value is : javac. User property is : maven. Version of the compiler to use, ex. Set to true to include debugging information in the compiled class files.

Default value is : true. Keyword list to be appended to the -g command-line switch. The -encoding argument for the Java compiler. User property is : encoding. Sets the executable of the compiler to use when fork is true. Indicates whether the build will continue even if there are compilation errors. Indicates whether the build will continue even if there are compilation warnings. Default value is : false. Allows running the compiler in a separate process.

Sets the maximum size, in megabytes, of the memory allocation pool, ex. Initial size, in megabytes, of the memory allocation pool, ex. Sets the name of the output file when compiling a set of sources to a single file. Forgot your password?

Get help. Java News. Maven- Set Java Version. By Satish Varma. May 16, Default compiler version With Maven, if you do not specify any compiler version explicitly, Maven uses Java 1. Understanding Compiling java code to specific version. Tags maven. Previous article Maven — skip tests? Next article Maven — How to run Single Test.

Please enter your comment! Please enter your name here. You have entered an incorrect email address! Rui Rui 3, 5 5 gold badges 30 30 silver badges 57 57 bronze badges. Kayaman my understanding is: if I want to compile something, the plexus-compiler-javac should be able to be used in place of local javac — Rui. What part of your undersanding is wrong and based on a wrong assumption based on mis-reading the documentation?

What part of 'contrary to this plugin's name, the Compiler Plugin does not compile the sources of your project by itself' didn't you understand? It is the first line of the documentation you cited. Read the entire documentation for comprehension next time.

Emphasis is mine; Contrary to this plugin's name, the Compiler Plugin does not compile the sources of your project by itself. To compile, the Compiler Plugin uses another class to compile them. The parameter compilerId determines which class will be used.

Currently, the Compiler Plugin is bundled with the javac compiler artifact with artifactId plexus-compiler-javac, which can be seen as one of the dependencies declared inside the Compiler Plugin's POM. Show 1 more comment. Active Oldest Votes. The maven-compiler-plugin documentation states indeed : Since 3. If you want to force the plugin using javac , you must configure the plugin option forceJavacCompilerUse You have to understand that the Maven core plugin will not reinvent the wheel and guess what you need.

Improve this answer. We did compilations with Maven using plain JRE - which doesn't have javac - and the plexus Eclipse compiler plugin - this was back around version 3. For projects which really need long term support this is a viable option.

Maven never included javac. Not sure about now because I switched to Intellij as soon as it came out. JarrodRoberson I am not sure that " non-standard " compiler is the right term. They wrote their own but the byte code format is well defined so it typically does not matter which compiler did the work. Those working in Eclipse use it all the time.

An additional feature is that it allows for compilation of very old code with new releases of Java where javac will not anymore. I am not advocating either; competition is healthy in compilers. Add a comment. Maven is not a java compiler.



0コメント

  • 1000 / 1000