You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Bala Rajamani <ba...@gmail.com> on 2007/05/12 00:09:39 UTC

Question on applying Filters

I'm running Maven the following example to understand Filtering
http://maven.apache.org/plugins/maven-war-plugin/examples/adding-filtering-webresources.html
------------------------------
<project>
  [...]
 <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-war-plugin</artifactId>
        <version>2.0</version>


       <configuration>
       <filters>
         <filter>properties/config.prop</filter>
       </filters>

          <webResources>
            <resource>
              <!-- this is relative to the pom.xml directory -->
              <directory>resource2</directory>
            </resource>
          </webResources>

         </configuration>
       </plugin>
    </plugins>
  </build>

 [...]
<project>
------------------------------

As mentioned in the example, I have created config.prop,
configuration.cfg at the POM level

|-- configurations
|   |-- config.cfg
|   `-- properties
|       `-- config.prop
|-- pom.xml

but after executing "mvn install" I'm not seeing config.cfg output in
the WAR file.

Thanks in advance,
Bala.

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


Re: Question on applying Filters

Posted by Wayne Fay <wa...@gmail.com>.
Go back and read that page again, start from scratch. You've mixed up
the examples.

If your directory is named configurations, then the pom.xml config
needs to say <resource><directory>configurations</>, etc. In your
example, you've got <directory>resource2</>.

Wayne

On 5/11/07, Bala Rajamani <ba...@gmail.com> wrote:
> I'm running Maven the following example to understand Filtering
> http://maven.apache.org/plugins/maven-war-plugin/examples/adding-filtering-webresources.html
> ------------------------------
> <project>
>   [...]
>  <build>
>     <plugins>
>       <plugin>
>         <groupId>org.apache.maven.plugins</groupId>
>         <artifactId>maven-war-plugin</artifactId>
>         <version>2.0</version>
>
>
>        <configuration>
>        <filters>
>          <filter>properties/config.prop</filter>
>        </filters>
>
>           <webResources>
>             <resource>
>               <!-- this is relative to the pom.xml directory -->
>               <directory>resource2</directory>
>             </resource>
>           </webResources>
>
>          </configuration>
>        </plugin>
>     </plugins>
>   </build>
>
>  [...]
> <project>
> ------------------------------
>
> As mentioned in the example, I have created config.prop,
> configuration.cfg at the POM level
>
> |-- configurations
> |   |-- config.cfg
> |   `-- properties
> |       `-- config.prop
> |-- pom.xml
>
> but after executing "mvn install" I'm not seeing config.cfg output in
> the WAR file.
>
> Thanks in advance,
> Bala.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

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