Categories:
Audio (13)
Biotech (29)
Bytecode (35)
Database (77)
Framework (7)
Game (7)
General (512)
Graphics (53)
I/O (32)
IDE (2)
JAR Tools (86)
JavaBeans (16)
JDBC (89)
JDK (337)
JSP (20)
Logging (103)
Mail (54)
Messaging (8)
Network (71)
PDF (94)
Report (7)
Scripting (83)
Security (32)
Server (119)
Servlet (17)
SOAP (24)
Testing (50)
Web (19)
XML (301)
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
⇠"mvn archetype:generate" - Generate Maven Project
⇑⇑ FAQ for Apache Maven
2020-10-20, 689👍, 0💬
Popular Posts:
What Is Apache XMLBeans-2.6.0.zip file? Apache XMLBeans-2.6.0.zip file is the distribution package Z...
The Jakarta-ORO Java classes are a set of text-processing Java classes that provide Perl5 compatible...
JasperReports, the world's most popular open source business intelligence and reporting engine and J...
What Is commons-fileupload-1.3.3 .jar?commons-fileupload-1.3.3 .jaris the JAR file for Apache Common...
What Is XMLBeans xbean.jar 2.6.0? XMLBeans xbean.jar 2.6.0 is the JAR file for Apache XMLBeans 2.6.0...