第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問題,去搜搜看,總會有你想問的

Gradle 在運(yùn)行任務(wù)時(shí)設(shè)置了錯(cuò)誤的(意外的?)類路徑

Gradle 在運(yùn)行任務(wù)時(shí)設(shè)置了錯(cuò)誤的(意外的?)類路徑

素胚勾勒不出你 2021-06-10 14:13:08
我的項(xiàng)目結(jié)構(gòu)是這樣的:projectRoot  +-src     +-main     |   +-java     |   |   +-package/java files go here     |   +-resources     |       +-config     |           +-files go here     +-test         +-java         |   +-package/java files go here         +-resources             +-config             |   +-files go here             +-features                 +-files go here構(gòu)建此項(xiàng)目時(shí),它會生成以下輸出結(jié)構(gòu):projectRoot  +-out      +-production      |     +-classes      |     |   +-package/classes in here      |     +-resources      |         +-config      |             +-files in here      +-test            +-classes            |   +-package/classes in here            +-resources                +-config                |   +-files in here                +-features                    +-files in here這一切都在預(yù)料之中。我定義了一個(gè)運(yùn)行黃瓜測試的任務(wù),它看起來像這樣:task runCucumber() {    doLast {        javaexec {            main = "cucumber.api.cli.Main"            args += ['--plugin', 'pretty', '--plugin', 'html:out/reports/cucumber/', '--plugin', 'json:out/reports/cucumber/report.json',                     '--glue', 'com.example.mypackage.cucumber', 'classpath:features'                     , '--tags', 'not @ignore']            systemProperties['http.keepAlive'] = 'false'            systemProperties['http.maxRedirects'] = '20'            systemProperties['env'] = System.getProperty("env")            systemProperties['envType'] = System.getProperty("envType")            classpath = configurations.cucumber + configurations.compile + configurations.testCompile + sourceSets.main.runtimeClasspath + sourceSets.test.runtimeClasspath        }    }}當(dāng)我執(zhí)行此任務(wù)時(shí),找不到我的類,也找不到功能。顯然,這是由于未正確設(shè)置類路徑。如果我使用 運(yùn)行任務(wù)--info,我可以看到類路徑是使用我指示的參數(shù)設(shè)置的,但是out它包含build目錄而不是目錄。
查看完整描述

1 回答

?
暮色呼如

TA貢獻(xiàn)1853條經(jīng)驗(yàn) 獲得超9個(gè)贊

好吧,原來問題不在于 Gradle,而在于 IntelliJ IDEA。IDEA 覆蓋了標(biāo)準(zhǔn)的 gradle 路徑,并將輸出保存在與 gradle 預(yù)期不同的路徑中。然后,當(dāng)下一個(gè) gradle 任務(wù)運(yùn)行時(shí),輸出不在那里。直接使用gradle而不是IDEA編譯解決了這個(gè)問題。


查看完整回答
反對 回復(fù) 2021-06-23
  • 1 回答
  • 0 關(guān)注
  • 158 瀏覽

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號