.xmlEven बेहतर: नवीनतम मेवेन का उपयोग करें। आप मेवेन के साथ कुछ साफ सामान कर सकते हैं। Maven के पोम में
key1 = ${src1.dir}
key2 = ${src1.dir}/${filename}
key3 = ${project.basedir}
: इस मामले में आप एक .properties उस में यह लाइनों के साथ फाइल कर सकते हैं।xml फ़ाइल (अपनी परियोजना की जड़ में रखा) आप कुछ इस तरह करना चाहिए:
<resources>
<resource>
<filtering>true</filtering>
<directory>just-path-to-the-properties-file-without-it</directory>
<includes>
<include>file-name-to-be-filtered</include>
</includes>
</resource>
</resources>
...
<properties>
<src1.dir>/home/root</src1.dir>
<filename>some-file-name</filename>
</properties>
इस तरह आप है कुंजी मूल्यों का निर्माण समय में बदल जाएगा, जिसका मतलब है कि आप इस मान अपने गुण के अंदर होगा संकलन के बाद फ़ाइल:
key1 = /home/root
key2 = /home/root/some-file-name
key3 = the-path-to-your-project
इस लाइन के साथ संकलन जब आप pom.xml फ़ाइल के रूप में ही निर्देशिका में हैं: mvn स्वच्छ -DskipTests स्थापित