1
我創建從一個項目中的原型,我運行:MVN原型:創從項目-DoutputDirectory
mvn archetype:create-from-project -DoutputDirectory=../archetype
的Maven並沒有../archetype
生成代碼。有人知道如何解決這個問題嗎?
我創建從一個項目中的原型,我運行:MVN原型:創從項目-DoutputDirectory
mvn archetype:create-from-project -DoutputDirectory=../archetype
的Maven並沒有../archetype
生成代碼。有人知道如何解決這個問題嗎?
目標的outputDirectory
參數create-from-project
的文檔沒有定義用戶屬性。因此,maven-archetype-plugin
只是忽略了您使用-DoutputDirectory
設置的任何值,並保持其默認值,即${project.build.directory}/generated-sources/archetype
。
您應該在their JIRA上創建一個改進請求,也許會提交一個補丁:爲此添加一個用戶屬性應該不難。 Looking the source code,所有應該需要的是將property
屬性添加到@Parameter
註釋。