2 回答

TA貢獻(xiàn)1824條經(jīng)驗(yàn) 獲得超6個(gè)贊
嘗試添加<mainClass>標(biāo)簽<configuration>,如下所示:
<configuration>
<mainClass>com.category.main.Master</mainClass>
<classpathScope>compile</classpathScope>
</configuration>
然后用命令運(yùn)行mvn exec:java -Dexec.mainClass=src.com.category.main.Master

TA貢獻(xiàn)1812條經(jīng)驗(yàn) 獲得超5個(gè)贊
一切都?xì)w結(jié)為引號(hào)Additional Maven command line parameters:
- TC 將它們作為參數(shù)傳遞,因此-Dexec.mainClass="some.package.Class" became
“some.package.Class” in maven (instead of
some.package.Class`)
當(dāng)我比較本地 na 遠(yuǎn)程運(yùn)行的調(diào)試時(shí),我終于注意到了它:
偏僻的:
[DEBUG] joining on thread Thread["my.package.SummaryGenerator".main(),5,"my.package.SummaryGenerator"]
當(dāng)?shù)氐模?/p>
[DEBUG] joining on thread Thread[my.package.SummaryGenerator.main(),5,y.package.SummaryGenerator]
添加回答
舉報(bào)