You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "Weck, Martin" <Ma...@atosorigin.com> on 2010/05/03 15:00:32 UTC

renaming files in assembly

Hi everyone

For internationalized logging I have parallel to my *.java files in each package a message.properties file. Using
<build>
	<plugins>
		<plugin>
			<artifactId>maven-assembly-plugin</artifactId>
			<version>2.2-beta-5</version>
			<configuration>
				<descriptors>
					<descriptor>src/main/assembly/msg.xml</descriptor>
				</descriptors>
			</configuration>
			<executions>
				<execution>
					<id>make-assembly</id>
					<phase>package</phase>
					<goals>
						<goal>single</goal>
					</goals>
				</execution>
			</executions>
		</plugin>
	</plugins>
</build>

in my pom.xml and the msg.xml assembly file:
<assembly>
  <id>msg</id>
  <formats>
    <format>zip</format>
  </formats>
  <includeBaseDirectory>true</includeBaseDirectory>
  <fileSets>
    <fileSet>
	  <useDefaultExcludes>true</useDefaultExcludes>
      <directory>${basedir}/src/main/java</directory>
      <includes>
      	<include>**//messages.properties</include>
      </includes>
      <filtered>false</filtered>
      <outputDirectory />
    </fileSet>
  </fileSets>
</assembly>

I like to create a maven assembly that holds only these message.properties. These files should be renamed to messages_en.properties. With <file> I can rename a file before adding it to the assembly, but not with <fileSet>, although in my case all files of the <fileSet> have the same name. Is there a way to do the renaming directly using Maven without using maven-antrun-plugin? Thanks for any help!

Martin

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org