You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Borut Bolčina <bo...@gmail.com> on 2008/04/04 09:50:18 UTC
Filter config directory...
Hello,
I would like to
- filter config directory (some property/configuration files),
- don't package the content of the config it in the jar
- and make config directory a classpath entry for the exec:java plugin
I know how to filter src/main/resources.
Any tips?
Cheers,Borut
Re: Filter config directory...
Posted by Borut Bolčina <bo...@gmail.com>.
I must have smoked one without filter too much. :-)
2008/5/12 Stephen Connolly <st...@gmail.com>:
> <targetPath>../config</targetPath>
>
> ?
>
> (Screaming hack of the month)
>
> -Stephen
>
> On Fri, Apr 25, 2008 at 2:56 PM, Borut Bolčina <bo...@gmail.com>
> wrote:
>
> > Thanks, but this is not a solution. I want to filter some files in
> > src/main/config and put them in target/config (and NOT in
> > target/classes/config). All I want to achive is to prepare files for
> > different enviroments with filtering.
> >
> > This doesn't work:
> >
> > <resources>
> > <resource>
> > <directory>src/main/resources</directory>
> > </resource>
> > <resource>
> > <directory>src/main/config</directory>
> > <filtering>true</filtering>
> >
> <targetPath>${project.build.directory}/config</targetPath>
> > </resource>
> > </resources>
> >
> > as the variable is not expanded and targetPath is relative to the
> > target/classes directory.
> >
> >
> > Any hints?
> >
> > Using Maven 2.0.8
> >
> > 2008/4/4 Zemian Deng <ke...@gmail.com>:
> >
> > > Hello Borut,
> > > placing those config files in your src/main/resources will make them
> > > visible
> > > in classpath. filter them out in your jar plugin and you won't see
> them
> > > during packaging. And you said you know how to do this. :)
> > >
> > >
> > > On Fri, Apr 4, 2008 at 3:50 AM, Borut Bolčina <borut.bolcina@gmail.com
> >
> > > wrote:
> > >
> > > > Hello,
> > > >
> > > > I would like to
> > > >
> > > > - filter config directory (some property/configuration files),
> > > > - don't package the content of the config it in the jar
> > > > - and make config directory a classpath entry for the exec:java
> > plugin
> > > >
> > > > I know how to filter src/main/resources.
> > > >
> > > > Any tips?
> > > >
> > > > Cheers,Borut
> > > >
> > >
> > >
> > >
> > > --
> > > Thanks,
> > > Zemian Deng
> > >
> >
>
Re: Filter config directory...
Posted by Stephen Connolly <st...@gmail.com>.
<targetPath>../config</targetPath>
?
(Screaming hack of the month)
-Stephen
On Fri, Apr 25, 2008 at 2:56 PM, Borut Bolčina <bo...@gmail.com>
wrote:
> Thanks, but this is not a solution. I want to filter some files in
> src/main/config and put them in target/config (and NOT in
> target/classes/config). All I want to achive is to prepare files for
> different enviroments with filtering.
>
> This doesn't work:
>
> <resources>
> <resource>
> <directory>src/main/resources</directory>
> </resource>
> <resource>
> <directory>src/main/config</directory>
> <filtering>true</filtering>
> <targetPath>${project.build.directory}/config</targetPath>
> </resource>
> </resources>
>
> as the variable is not expanded and targetPath is relative to the
> target/classes directory.
>
>
> Any hints?
>
> Using Maven 2.0.8
>
> 2008/4/4 Zemian Deng <ke...@gmail.com>:
>
> > Hello Borut,
> > placing those config files in your src/main/resources will make them
> > visible
> > in classpath. filter them out in your jar plugin and you won't see them
> > during packaging. And you said you know how to do this. :)
> >
> >
> > On Fri, Apr 4, 2008 at 3:50 AM, Borut Bolčina <bo...@gmail.com>
> > wrote:
> >
> > > Hello,
> > >
> > > I would like to
> > >
> > > - filter config directory (some property/configuration files),
> > > - don't package the content of the config it in the jar
> > > - and make config directory a classpath entry for the exec:java
> plugin
> > >
> > > I know how to filter src/main/resources.
> > >
> > > Any tips?
> > >
> > > Cheers,Borut
> > >
> >
> >
> >
> > --
> > Thanks,
> > Zemian Deng
> >
>
Re: Filter config directory...
Posted by Borut Bolčina <bo...@gmail.com>.
Hello,
is filtering src/main/config files which are not to be placed in the
target/classes directory and packaged in the jar so unusual that no one is
doing it? Should I file a JIRA feature request?
Cheers,
Borut
2008/4/25 Borut Bolčina <bo...@gmail.com>:
> Thanks, but this is not a solution. I want to filter some files in
> src/main/config and put them in target/config (and NOT in
> target/classes/config). All I want to achive is to prepare files for
> different enviroments with filtering.
>
> This doesn't work:
>
> <resources>
> <resource>
> <directory>src/main/resources</directory>
> </resource>
> <resource>
> <directory>src/main/config</directory>
> <filtering>true</filtering>
> <targetPath>${project.build.directory}/config</targetPath>
> </resource>
> </resources>
>
> as the variable is not expanded and targetPath is relative to the
> target/classes directory.
>
>
> Any hints?
>
> Using Maven 2.0.8
>
> 2008/4/4 Zemian Deng <ke...@gmail.com>:
>
> Hello Borut,
> > placing those config files in your src/main/resources will make them
> > visible
> > in classpath. filter them out in your jar plugin and you won't see them
> > during packaging. And you said you know how to do this. :)
> >
> >
> > On Fri, Apr 4, 2008 at 3:50 AM, Borut Bolčina <bo...@gmail.com>
> > wrote:
> >
> > > Hello,
> > >
> > > I would like to
> > >
> > > - filter config directory (some property/configuration files),
> > > - don't package the content of the config it in the jar
> > > - and make config directory a classpath entry for the exec:java
> > plugin
> > >
> > > I know how to filter src/main/resources.
> > >
> > > Any tips?
> > >
> > > Cheers,Borut
> > >
> >
> >
> >
> > --
> > Thanks,
> > Zemian Deng
> >
>
>
Re: Filter config directory...
Posted by Borut Bolčina <bo...@gmail.com>.
Thanks, but this is not a solution. I want to filter some files in
src/main/config and put them in target/config (and NOT in
target/classes/config). All I want to achive is to prepare files for
different enviroments with filtering.
This doesn't work:
<resources>
<resource>
<directory>src/main/resources</directory>
</resource>
<resource>
<directory>src/main/config</directory>
<filtering>true</filtering>
<targetPath>${project.build.directory}/config</targetPath>
</resource>
</resources>
as the variable is not expanded and targetPath is relative to the
target/classes directory.
Any hints?
Using Maven 2.0.8
2008/4/4 Zemian Deng <ke...@gmail.com>:
> Hello Borut,
> placing those config files in your src/main/resources will make them
> visible
> in classpath. filter them out in your jar plugin and you won't see them
> during packaging. And you said you know how to do this. :)
>
>
> On Fri, Apr 4, 2008 at 3:50 AM, Borut Bolčina <bo...@gmail.com>
> wrote:
>
> > Hello,
> >
> > I would like to
> >
> > - filter config directory (some property/configuration files),
> > - don't package the content of the config it in the jar
> > - and make config directory a classpath entry for the exec:java plugin
> >
> > I know how to filter src/main/resources.
> >
> > Any tips?
> >
> > Cheers,Borut
> >
>
>
>
> --
> Thanks,
> Zemian Deng
>
Re: Filter config directory...
Posted by Zemian Deng <ke...@gmail.com>.
Hello Borut,
placing those config files in your src/main/resources will make them visible
in classpath. filter them out in your jar plugin and you won't see them
during packaging. And you said you know how to do this. :)
On Fri, Apr 4, 2008 at 3:50 AM, Borut Bolčina <bo...@gmail.com>
wrote:
> Hello,
>
> I would like to
>
> - filter config directory (some property/configuration files),
> - don't package the content of the config it in the jar
> - and make config directory a classpath entry for the exec:java plugin
>
> I know how to filter src/main/resources.
>
> Any tips?
>
> Cheers,Borut
>
--
Thanks,
Zemian Deng