Maven site yog dab tsi?
Maven site yog dab tsi?

Video: Maven site yog dab tsi?

Video: Maven site yog dab tsi?
Video: Yog Vim Dab Tsi - Maiv Choj (cover) 2024, Hlis ntuj nqeg
Anonim

Apache Maven Site Plugin. Cov Qhov chaw Plugin yog siv los tsim ib qho qhov chaw rau qhov project. Cov generated qhov chaw kuj suav nrog cov phiaj xwm cov ntawv ceeb toom uas tau teeb tsa hauv POM. Qhov no yog qhov qhov chaw rau version 3 ntawm lub mav - qhov chaw -plugin.

Hais txog qhov no, koj ua li cas tsim ib qhov chaw hauv Maven?

Rau tsim ib qhov chaw , khiav mvn qhov chaw : qhov chaw lub mvn qhov chaw . Saib cov generated site ntawm lub tshuab hauv zos, khiav mvn qhov chaw : khiav. Qhov no command yuav deploy lub qhov chaw mus rau Jetty web server ntawm qhov chaw nyob localhost: 8080.

Tsis tas li ntawd, Maven lifecycle yog dab tsi? Maven yog nyob ib ncig ntawm lub hauv paus ntsiab lus ntawm kev tsim lub neej voj voog . Muaj peb lub tsev tsim lub neej voj voog : default, huv si thiab qhov chaw . Lub neej ntawd lub neej voj voog tuav koj qhov project xa tawm, huv si lub neej voj voog tuav qhov project tu, thaum lub site lifecycle tuav cov creation ntawm koj qhov project's qhov chaw cov ntaub ntawv.

Hauv qhov no, dab tsi yog syntax siv los tsim Maven site?

Qhov no tsim qhov yooj yim tshaj plaws ua tau Maven project nrog ib qho Java chav kawm hauv src/main/java thiab POM yooj yim. Koj tuaj yeem tsim lub vev xaib Maven los ntawm tsuas yog khiav mvn site. Txhawm rau tsim lub vev xaib thiab saib ua ntej qhov tshwm sim hauv qhov browser, koj tuaj yeem khiav mvn site: khiav, qhov no yuav tsim lub xaib thiab pib qhov piv txwv ntawm Jetty.

MVN site command ua dab tsi?

Yog tias peb ua qhov " mvn siv " lus txib , peb yuav ua qhov pre- qhov chaw thiab qhov chaw theem. Hauv kev siv ib txwm, koj yuav ua " mvn huv si qhov chaw "los ntxuav ib qhov project thiab tsim cov ntaub ntawv tshiab, thiab koj yuav ua ib qho " mvn huv si qhov chaw -deploy" los ntxuav ib qhov project, tsim a qhov chaw , thiab siv qhov ntawd qhov chaw.

Pom zoo: