You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Philippe Le Marchand <pl...@noctis.be> on 2007/10/05 09:24:24 UTC

access properties filter from jar dependency classpath

Hi all,

I have a multi-module project that requires some resources to be filtered.
I'm centralizing all properties in filter properties file, one for
each target deploy environment.
The one that will be used depends on profiles.

In order to reference those files in several modules, I've created a
jar project with all necessary reslources related to build (those
filter properties files, actually).
This is the recommended way to do it instead of referencing them with
some relative path in the parent POM or something...

How can I declare a <filter> entry in this parent POM to reference
those files in the jar?

I've declared the dependency to this build related resources jar as an
extension in my parent POM :

...
  <build>
    <extensions>
      <extension>
        <groupId>my.group.id</groupId>
        <artifactId>build-tools</artifactId>
        <version>1.0-SNAPSHOT</version>
      </extension>
    </extensions>
...
    <filters>
      <filter>filter-${env}.properties</filter>
    </filters>
...

but the <filter> entry doesn't work, I get :

[INFO] Error loading property file
'/path/to/project/folder/filter-myenv.properties'

I've tried with ${classpath}/filter-${env}.properties,
${maven.compile.classpath}/filter-${env}.properties, without
success...

Does anybody have an idea?

Thanks for your help,

Philipppe

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