Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (101)
JavaBeans (21)
JDBC (121)
JDK (426)
JSP (20)
Logging (108)
Mail (58)
Messaging (8)
Network (84)
PDF (97)
Report (7)
Scripting (84)
Security (32)
Server (121)
Servlet (26)
SOAP (24)
Testing (54)
Web (15)
XML (309)
Collections:
Other Resources:
"mvn package" - Compile Maven Project
How to compile a Maven project?
✍: FYIcenter.com
You can run the "mvn package" command to compile a Maven project:
C:\fyicenter>cd hello C:\fyicenter\hello>\fyicenter\apache-maven-3.5.4\bin\mvn package [INFO] Scanning for projects... [INFO] [INFO] ------------------------ com.fyicenter:hello >------------------------- [INFO] Building hello 1.0 [INFO] --------------------------------[ jar ]--------------------------------- Downloading from central: https://repo.maven.apache.org/maven2 /org/apache/maven/plugins/maven-resources-plugin/3.0.2/maven-resources-plugin-3.0.2.pom Downloading from central: https://repo.maven.apache.org/maven2 /org/apache/maven/plugins/maven-plugins/30/maven-plugins-30.pom (10 kB at 41 kB/s) Downloading from central: https://repo.maven.apache.org/maven2 /org/apache/maven/plugins/maven-compiler-plugin/3.7.0/maven-compiler-plugin-3.7.0.jar Downloading from central: https://repo.maven.apache.org/maven2 /org/apache/maven/plugins/maven-jar-plugin/3.0.2/maven-jar-plugin-3.0.2.jar ... [INFO] [INFO] --- maven-resources-plugin:3.0.2:resources (default-resources) @ hello --- Downloading from central: https://repo.maven.apache.org/maven2 /org/codehaus/plexus/plexus-utils/2.0.4/plexus-utils-2.0.4.pom Downloading from central: https://repo.maven.apache.org/maven2 /org/codehaus/plexus/plexus-utils/3.0.24/plexus-utils-3.0.24.pom Downloading from central: https://repo.maven.apache.org/maven2 /org/codehaus/plexus/plexus/4.0/plexus-4.0.pom ... Downloading from central: https://repo.maven.apache.org/maven2 /org/apache/xbean/xbean-reflect/3.4/xbean-reflect-3.4.jar Downloading from central: https://repo.maven.apache.org/maven2 /com/google/collections/google-collections/1.0/google-collections-1.0.jar Downloading from central: https://repo.maven.apache.org/maven2 /junit/junit/3.8.2/junit-3.8.2.jar [INFO] Changes detected - recompiling the module! [WARNING] File encoding has not been set, using platform encoding Cp1252, i.e. b uild is platform dependent! [INFO] Compiling 1 source file to C:\fyicenter\hello\target\classes [INFO] ------------------------------------------------------------- [ERROR] COMPILATION ERROR : [INFO] ------------------------------------------------------------- [ERROR] Source option 5 is no longer supported. Use 6 or later. [ERROR] Target option 1.5 is no longer supported. Use 1.6 or later. [INFO] 2 errors [INFO] ------------------------------------------------------------- [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 01:45 min [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project hello: Compilation failure: Compilation failure: [ERROR] Source option 5 is no longer supported. Use 6 or later. [ERROR] Target option 1.5 is no longer supported. Use 1.6 or later. [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
After so many unnecessary downloads from Maven repository, the compilation process actually failed with 2 errors:
You can modify the project file pom.xml to the above settings.
⇒ pom.xml - Maven Project File
2020-10-20, 1266🔥, 0💬
Popular Posts:
JDK 11 java.xml.crypto.jmod is the JMOD file for JDK 11 XML (eXtensible Markup Language) Crypto modu...
How to display XML element type information with the jaxp\TypeInfoWriter.java provided in the Apache...
JasperReports, the world's most popular open source business intelligence and reporting engine and J...
JDK 11 jdk.aot.jmod is the JMOD file for JDK 11 Ahead-of-Time (AOT) Compiler module. JDK 11 AOT Comp...
Apache Commons Lang 3 is the 3rd version of Apache Commons Lang, which provides a host of helper uti...