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, ∼1710🔥, 0💬
Popular Posts:
What Is jaxb-api-2.1.6.jar? Java Architecture for XML Binding (JAXB) is a Java API that allows Java ...
What Is HttpComponents commons-httpclient-3.1.j ar?HttpComponents commons-httpclient-3.1.j aris the ...
maven-settings-builder-3 .8.6.jaris the JAR file for Apache Maven 3.8.6 Settings Builder module. Apa...
How to download and install iText7-Core-7.1.4.zip? iText7-Core-7.1.4.zip is the binary package of iT...
commons-collections4-4.2 -sources.jaris the source JAR file for Apache Commons Collections 4.2, whic...