Hi Mick,

I personnaly had to define a different filter file regarding the
target environment, in my super POM :

  ...
  <modules>
    <module>../module1</module>
    ...
  </modules>
  ...
  <build>
    <filters>
      
<filter>${parent.relativePath}/src/main/filters/filter-${env}.properties</filter>
    </filters>
    ...
  </build>
  ...

Each module defines the parent in its own POM :

<project>
  <parent>
    <groupId>...</groupId>
    <artifactId>parent</artifactId>
    <version>1.0-SNAPSHOT</version>
    <relativePath>../parent</relativePath><!-- required for filters -->
  </parent>
  ...

I had to use ${parent.relativePath} as Maven seems to resolve the
filter path for each module relative to its basedir.
I guess that ${parent.root} property is undefined in your case...

In my project, the ${env} property is set through the profile
mechanism, in my super
POM also :

  ...
  <profiles>
    <profile>
      <id>local</id>
      <properties>
        <env>local</env>
      </properties>
    </profile>
    ...
  </profiles>
  ...

I use 'mvn -P local' as command line instruction, then...

Philippe

On 9/13/07, Mick Knutson <[EMAIL PROTECTED]> wrote:
> I am trying to make all my sub-modules use the same filter.properties like:
>
>         <filters>
>             <filter>${project.root
> }/src/main/filters/filter.properties</filter>
>         </filters>
>
>
> I keep getting this error:
>
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Error loading property file
> 'C:\viewstore\esp_lynx_dap\esp\dap\utilities\common\common-jar\${
> project.root}\src\main\filters\filter.properties'
>
>
> My settings.xml has it defined though:
>
> <project.root>C:/viewstore/esp_lynx_dap/esp/dap</project.root>
>
>
>
> How can I define a global without having to do:
>
>         <filters>
>             <filter>../../../src/main/filters/filter.properties</filter>
>         </filters>
>
> As I wanted to define this in my master pom.xml and have all my modules
> inherit the same filter?
>
> --
>
> Thanks,
> Mick Knutson
>
> http://www.baselogic.com
> http://www.blincmagazine.com
> http://www.djmick.com
> http://www.myspace.com/mickknutson
> http://www.myspace.com/djmick_dot_com
> http://www.myspace.com/sexybeotches
> http://www.thumpradio.com
> ---
>

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

Reply via email to