Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (102)
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 (322)
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:
fyicenter> cd hello fyicenter\hello> ..\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 change above settings.
⇒ pom.xml - Maven Project File
2020-10-20, ∼1667🔥, 0💬
Popular Posts:
What Is ojdbc5.jar for Oracle 11g R1? ojdbc5.jar for Oracle 11g R1 is the JAR files of ojdbc.jar, JD...
JDK 11 jrt-fs.jar is the JAR file for JDK 11 JRT-FS (Java RunTime - File System) defined in the "jdk...
Apache ZooKeeper is an open-source server which enables highly reliable distributed coordination. Ap...
What Is ojdbc8.jar for Oracle 12c R2? ojdbc8.jar for Oracle 12c R2 is the JAR files of ojdbc.jar, JD...
How to download and install JDK (Java Development Kit) 1.3? If you want to write Java applications, ...