0
我有裝載來自名爲的配置文件的某些屬性小ConfigurationSingleton
類文件,此刻,configuration_singleton.xml
:原型如何使生成一個名爲喜歡的artifactId
private ConfigurationSingleton() throws IOException {
...
configurationIS = ConfigurationSingleton.class.
getResourceAsStream("/configuration_singleton.xml");
...
的文件在目錄:
/
++- src
+-- test
+-- resources
+-- configuration_singleton.xml
現在我想用一個原型生成my-project-1.0.0.jar
神器這是由my-project-1.0.0.xml
文件中配置。像往常一樣,我已經使用Maven的性質${artifactId}
和${version}
這裏:
private ConfigurationSingleton() throws IOException {
...
configurationIS = ConfigurationSingleton.class.
getResourceAsStream("/${artifactId}-${version}.xml");
...
但原型如何使生成一個名爲像${artifactId}-${version}.xml
配置文件?