के साथ ग्रहण में काम नहीं करते हैं। मैं मेवेन फ़िल्टरिंग का उपयोग कर स्प्रिंग कॉन्फ़िगरेशन फ़ाइल को फ़िल्टर करने का प्रयास कर रहा हूं। मेरे पोम इस तरह कॉन्फ़िगर किया गया है:मैवेन वॉर प्लगइन के साथ फ़िल्टर करने वाले वेब संसाधन एम 2e
...
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.2</version>
<configuration>
<webResources>
<resource>
<filtering>true</filtering>
<targetPath>WEB-INF/context</targetPath>
<directory>src/main/webapp/WEB-INF/context</directory>
<includes>
<include>applicationContext.xml</include>
</includes>
</resource>
</webResources>
</configuration>
</plugin>
...
और
<profiles>
<profile>
<id>desarrollo</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<build>
<filters>
<filter>src/main/properties/dev.properties</filter>
</filters>
</build>
</profile>
<profile>
<id>pruebas</id>
<build>
<filters>
<filter>src/main/properties/test.properties</filter>
</filters>
</build>
</profile>
...
यह बहुत अच्छा काम करता है जब Maven सीधे लागू।
दुर्भाग्यवश, जब एक्लिप्स डब्ल्यूटीपी और एम 2 के साथ टॉमकैट 6 में वेबपैप को गर्म-तैनाती करते हैं तो यह हमेशा applicationContext.xml के unfiltered संस्करण को चुनता है। (फ़ाइल लक्ष्य/m2e-wtp/वेब-संसाधन/वेब-आईएनएफ/संदर्भ में फ़ाइल applicationContext.xml कभी फ़िल्टर नहीं किया जाता है)
मुझे इस विषय पर कोई उपयोगी दस्तावेज नहीं मिल रहा है। मुझे यह भी यकीन नहीं है कि यह एम 2 ई में लागू किया गया है या नहीं।
क्या मेरी कॉन्फ़िगरेशन में कुछ गड़बड़ है या यह एक अनुपूरक सुविधा है?
सबसे आदर्श समाधान में है http://stackoverflow.com/questions/1782352/filtering-maven-files-into-web-inf –