
上QQ阅读APP看书,第一时间看更新
Creating Maven projects
Use the command list to see the commands available and the man command to get help on a specific command's usage. Forge commands work both interactively and with options. To create a new project, use the project-new command, and provide answers to the interactive questions asked.
[jbdevgWorkspace]$ project-new beosbank-forge-demo
***INFO*** Required inputs not satisfied, entering interactive mode
* Project name: beosbank-forge-demo
? Top level package [org.beosbank.forge.demo]: com.beosbank.forge.demo
? Version [1.0.0-SNAPSHOT] HIT ENTER to pick the default version
? Final name: beosbank-forge-demo
? Project location [/Users/enonowog/jbdevgWorkspace]:
? Use Target Location Root? (If specified, it won't create a subdirectory inside the specified Project location) [y/N]: N
[0] (x) war
[1] ( ) jar
[2] ( ) parent
[3] ( ) forge-addon
[4] ( ) resource-jar
[5] ( ) ear
[6] ( ) from-archetype
[7] ( ) generic
Press <ENTER> to confirm, or <CTRL>+C to cancel.* Project type: [0-7] 1
[0] (x) Maven
Press <ENTER> to confirm, or <CTRL>+C to cancel.* Build system: [0] 0
[0] ( ) JAVA_EE_7
[1] ( ) JAVA_EE_6
[2] ( ) NONE
Press <ENTER> to confirm, or <CTRL>+C to cancel.
? Stack (The technology stack to be used in this project): [0-2] 2
***SUCCESS*** Project named 'beosbank-forge-demo' has been created.
The project is created with the specified input options and is available in the workspace immediately:
By default, the Forge CLI relies on your system's command-line font configuration. After creating a project, the next step may be to add a class; let's see how to create Java class in the project source folder using the Forge console.