How about maven-antrun-plugin, using the Ant <copy> task?

About the variable naming, it depends on where the information comes
from - can it be set on the cmdline?  Is it available as an environment
variable?

Profiles are a standard Maven mechanism to get the build to respond
differently to different conditions:

http://maven.apache.org/guides/introduction/introduction-to-profiles.html

Steve

Vaidya, Supriya A (US - Chicago) wrote:
> Hi:
>  
> Here is what needs to be achieved:
>  
> I have 3 different configuration files: application-dev.properties,
> application-int.properties, application-prod.properties. Depending on
> the value taken by a certain variable (where and how do shoudl I define
> this variable??), I need to have one of the above files copied to a
> certain directory, and renamed.
>  
> How do I achieve this with Maven?
>  
> I have tried using the maven-dependency-plugin, but am not sure how to
> define the artifacts...
>  
>   <plugin>
>         <groupId>org.apache.maven.plugins</groupId>
>         <artifactId>maven-dependency-plugin</artifactId>
>         <executions>
>           <execution>
>             <id>copy</id>
>             <phase>package</phase>
>             <goals>
>               <goal>copy</goal>
>             </goals>
>             <configuration>
>                 <artifactItems>
>                   <artifactItem>
>                      <groupId>my-application</groupId>     
>                     <artifactId>application-prod.xml</artifactId>
>                      <type>file</type>
>                      <overWrite>false</overWrite>
>  
> <outputDirectory>${project.build.directory}</outputDirectory>
>                      <destFileName>application.xml</destFileName>
>                    </artifactItem>
>                  </artifactItems>
>             </configuration>
>           </execution>
>         </executions>
>       </plugin> 
> 
> 
> This message (including any attachments) contains confidential information 
> intended for a specific individual and purpose, and is protected by law.  If 
> you are not the intended recipient, you should delete this message. 
> 
> 
> Any disclosure, copying, or distribution of this message, or the taking of 
> any action based on it, is strictly prohibited. [v.E.1]
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to