私はMavenのアーキタイプを構築しています。ファイル名の置換は正常に機能しています。たとえば、生成されたときに適切に置き換えられる__
artifactd __
-log4j.xml という名前のファイルがあります。しかし、それを参照するxmlファイルの1つであるSpringコンテキストファイルは、置き換えられていません。
<?xml version="1.0" encoding="UTF-8"?>
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-3.0.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
http://www.springframework.org/schema/data/jpa http://www.springframework.org/schema/data/jpa/spring-jpa.xsd">
<context:annotation-config />
<bean id="log4jConfigurer" class="org.springframework.beans.factory.config.MethodInvokingFactoryBean">
<property name="targetClass" value="org.springframework.util.Log4jConfigurer"></property>
<property name="targetMethod" value="initLogging"></property>
<property name="arguments">
<list>
<value>classpath:${artifactId}-log4j.xml</value>
<value>5000</value>
</list>
</property>
</bean>
何らかの理由で、xml ファイル内のトークン ${artifactId} が置き換えられることはありません。私のarchetype-metadata.xml
<modules>
<module id="${rootArtifactId}-services" dir="__rootArtifactId__-services" name="${rootArtifactId}-services">
<fileSets>
<fileSet filtered="true" packaged="true" encoding="UTF-8">
<directory>src/main/java</directory>
<includes>
<include>**/*.java</include>
</includes>
</fileSet>
<fileSet filtered="true" encoding="UTF-8">
<directory>src/main/webapp</directory>
<includes>
<include>**/*.jsp</include>
<include>**/*.xml</include>
</includes>
</fileSet>
<fileSet filtered="true" encoding="UTF-8">
<directory>src/main/resources</directory>
<includes>
<include>**/*.xml</include>
</includes>
</fileSet>
</fileSets>
</module>
spring-file は src/main/resources の下にあり、fileSet がfiltered に設定されているため、velocity に置き換えられているはずですよね?
何か案は?