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 archetype:generate" - Generate Maven Project
How to generate a new Maven project?
✍: FYIcenter.com
You can run the "mvn archetype:generate" command to
generate a standard Maven project:
fyicenter> apache-maven-3.5.4\bin\mvn archetype:generate
-DartifactId=hello -DgroupId=com.fyicenter
-DarchetypeArtifactId=maven-archetype-quickstart
-DinteractiveMode=false
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------ org.apache.maven:standalone-pom >-------------------
[INFO] Building Maven Stub Project (No POM) 1
[INFO] --------------------------------[ pom ]---------------------------------
[INFO]
[INFO] >>> maven-archetype-plugin:3.0.1:generate (default-cli) > generate-sources @ standalone-pom >>>
[INFO]
[INFO] --- maven-archetype-plugin:3.0.1:generate (default-cli) @ standalone-pom---
[INFO] Generating project in Batch mode
[INFO] ----------------------------------------------------------------------------
[INFO] Using following parameters for creating project from Old (1.x) Archetype: maven-archetype-quickstart:1.0
[INFO] ----------------------------------------------------------------------------
[INFO] Parameter: basedir, Value: C:\fyicenter
[INFO] Parameter: package, Value: com.fyicenter
[INFO] Parameter: groupId, Value: com.fyicenter
[INFO] Parameter: artifactId, Value: hello
[INFO] Parameter: packageName, Value: com.fyicenter
[INFO] Parameter: version, Value: 1.0-SNAPSHOT
[INFO] project created from Old (1.x) Archetype in dir: C:\fyicenter\hello
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:05 min
[INFO] ------------------------------------------------------------------------
fyicenter> tree /f hello
C:\FYICENTER\HELLO
| pom.xml
|
|---src
├---main
| |---java
| |---com
| |---fyicenter
| App.java
|
|---test
|---java
|---com
|---fyicenter
AppTest.java
fyicenter> type hello\src\main\java\com\fyicenter\App.java
package com.fyicenter;
/**
* Hello world!
*
*/
public class App
{
public static void main( String[] args )
{
System.out.println( "Hello World!" );
}
}
If you are on a Linux computer, the "mvn" command should look like this:
fyicenter$ ./apache-maven-3.8.7/bin/mvn archetype:generate \ -DartifactId=hello -DgroupId=com.fyicenter \ -DarchetypeArtifactId=maven-archetype-quickstart \ -DinteractiveMode=false ...
Note that if you run the above command for the first time, it will download lots of required Java packages.
⇒ "mvn package" - Compile Maven Project
2020-10-20, ∼1603🔥, 0💬
Popular Posts:
JDK 6 tools.jar is the JAR file for JDK 6 tools. It contains Java classes to support different JDK t...
JDK 11 jdk.jcmd.jmod is the JMOD file for JDK 11 JCmd tool, which can be invoked by the "jcmd" comma...
What Is HttpComponents httpclient-4.2.2.jar? HttpComponents httpclient-4.2.2.jar is the JAR file for...
What Is activation.jar? I heard it's related to JAF (JavaBeans Activation Framework) 1.0.2? The if y...
What Is ojdbc7.jar for Oracle 12c R1? ojdbc7.jar for Oracle 12c R1 is the JAR files of ojdbc.jar, JD...