You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by adie <do...@gmail.com> on 2012/04/17 21:13:06 UTC
Directory/filename substitution for consecutive property names
Hello,
I am experiencing problems while using substitution feature while
generating archetypes. Generally it works correctly except a case below:
- ABC__param1____param2__/__param3__ second and third param are not
substituted. Instead, Maven complains that property '/' was not provided
Thanks in advance for any hint. According to my investigation there are no
special cases and it should work like this but apparently it doesn't.
I'm using Archetype Plugin 2.2 and Maven 2.2.1
Martin
--
View this message in context: http://maven.40175.n5.nabble.com/Directory-filename-substitution-for-consecutive-property-names-tp5647331p5647331.html
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Directory/filename substitution for consecutive property names
Posted by adie <do...@gmail.com>.
Ok, I've created separate archetype projects for each of modules and did some
refactoring so now __ delimiters are always separated. This brings me to
another question.
*How to override filtering delimiters for fileSet filtering in
archetype-metadata.xml?* Provided that I have following section in
archetype-metadata.xml:
<fileSet filtered="true" encoding="UTF-8">
<directory>impl/adapter</directory>
<includes>
<include>**/*.project</include>
</includes>
</fileSet>
I need to substitute properties in files using __ delimiter not ${*}. For
example, if I have a directory structure:
parent / parent.xsd
parent / __childName__ / child.xsd
parent.xsd file contains:
<xs:include schemaLocation="__childName__/child.xml" />
If I substitute <xs:include schemaLocation="__childName__/child.xml" /> to
<xs:include schemaLocation="${childName}/child.xml" /> it will work for
archetype creation but will make this /template/ not editable in any IDE
because this path will be invalid.
I've tried adding following to archetype pom but it seems to not affect
delimiter configuration:
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<execution>
<id>evaluate-pom-template</id>
<phase>prepare-package</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<useDefaultDelimiters>false</useDefaultDelimiters>
<delimiters>
<delimiter>__</delimiter>
</delimiters>
...
</configuration>
</execution>
</executions>
</plugin>
Thanks for any replies,
Martin
--
View this message in context: http://maven.40175.n5.nabble.com/Directory-filename-substitution-for-consecutive-property-names-tp5647331p5668153.html
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org