Re: Filtering resources into a directory other than classes for a webapp?

2007-06-28 Thread Jared Blitzstein
Yeah, looks like 2.0 doesn't work and when I switched it to 2.0.2 it  
worked right away.


On May 7, 2007, at 12:31 PM, stig.lau wrote:



I was looking for the same solution, and the war-plugin seemed right.
But my config files were always put in the war root instead of the  
folder i

specified.
The solution for me was to use the 2.0.2 version of the war-plugin  
instead

of 2.0.


Heinrich Nirschl wrote:


On Fri, 2007-04-27 at 15:17 -0400, Jared Blitzstein wrote:

Thanks, I've read that as well as http://maven.apache.org/guides/
getting-started/index.html#How%20do%20I%20filter%20resource%20files
and it's basically the same thing as the WAR plugin...I believe.
Since I need this on both the WAR and the exploded app for jetty,  
I'm

not sure if the war plugin is what I need to be using. But the files
are actually being filtered, it's just they're not ending up in / 
WEB-

INF/config/ like I want.  They're going to /WEB-INF/classes/WEB-INF/
config/. Here is the snippet from my pom

filters
filtersrc/main/filters/${env}.var/filter
/filters
resources
resource

directorysrc/main/webapp/WEB-INF/config/directory
filteringtrue/filtering
targetPathWEB-INF/config//targetPath
/resource
/resources


Any ideas?



I have not tried this, but according to the documentation a
configuration similar to this for the war plugin should work:

  plugin
groupIdorg.apache.maven.plugins/groupId
artifactIdmaven-war-plugin/artifactId
configuration
  filters
filtersrc/main/filters/${env}.var/filter
  /filters
  webResources
 resource
   !-- the config files you want to filter should be in this
directory --
   directoryconfigurations/directory
   targetPathWEB-INF/config/targetPath
   !-- enable filtering --
   filteringtrue/filtering
 /resource
  /webResources
/configuration
  /plugin

- Henry


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





--
View this message in context: http://www.nabble.com/Filtering- 
resources-into-a-directory-other-than-classes-for-a-webapp-- 
tf3658613s177.html#a10360724

Sent from the Maven - Users mailing list archive at Nabble.com.


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




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



Re: Filtering resources into a directory other than classes for a webapp?

2007-05-07 Thread stig.lau

I was looking for the same solution, and the war-plugin seemed right. 
But my config files were always put in the war root instead of the folder i
specified.
The solution for me was to use the 2.0.2 version of the war-plugin instead
of 2.0.


Heinrich Nirschl wrote:
 
 On Fri, 2007-04-27 at 15:17 -0400, Jared Blitzstein wrote:
 Thanks, I've read that as well as http://maven.apache.org/guides/ 
 getting-started/index.html#How%20do%20I%20filter%20resource%20files  
 and it's basically the same thing as the WAR plugin...I believe.  
 Since I need this on both the WAR and the exploded app for jetty, I'm  
 not sure if the war plugin is what I need to be using. But the files  
 are actually being filtered, it's just they're not ending up in /WEB- 
 INF/config/ like I want.  They're going to /WEB-INF/classes/WEB-INF/ 
 config/. Here is the snippet from my pom
 
  filters
  filtersrc/main/filters/${env}.var/filter
  /filters
  resources
  resource
  
 directorysrc/main/webapp/WEB-INF/config/directory
  filteringtrue/filtering
  targetPathWEB-INF/config//targetPath
  /resource
  /resources
 
 
 Any ideas?
 
 
 I have not tried this, but according to the documentation a
 configuration similar to this for the war plugin should work:
 
   plugin
 groupIdorg.apache.maven.plugins/groupId
 artifactIdmaven-war-plugin/artifactId
 configuration
   filters
 filtersrc/main/filters/${env}.var/filter
   /filters
   webResources
  resource
!-- the config files you want to filter should be in this
 directory --
directoryconfigurations/directory 
targetPathWEB-INF/config/targetPath
!-- enable filtering --
filteringtrue/filtering
  /resource
   /webResources
 /configuration
   /plugin
 
 - Henry
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Filtering-resources-into-a-directory-other-than-classes-for-a-webapp--tf3658613s177.html#a10360724
Sent from the Maven - Users mailing list archive at Nabble.com.


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



Filtering resources into a directory other than classes for a webapp?

2007-04-27 Thread Jared Blitzstein
I'm using the webapp archetype and our apps are configured to have  
the properties files in /WEB-INF/config/ rather than /WEB-INF/ 
classes/ which maven defaults to for resource filtering. I see the  
targetPath tag in the resource tag but that's only for packages,  
not directories outside classes. I tried tricking it with a path  
of ../config/ but that only works when it creates the classes  
directory, not the WAR or exploded app. Any suggestions to get this  
to work without having to run an ant script afterwards to move the  
files?


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



Re: Filtering resources into a directory other than classes for a webapp?

2007-04-27 Thread Heinrich Nirschl

On 4/27/07, Jared Blitzstein [EMAIL PROTECTED] wrote:

I'm using the webapp archetype and our apps are configured to have
the properties files in /WEB-INF/config/ rather than /WEB-INF/
classes/ which maven defaults to for resource filtering. I see the
targetPath tag in the resource tag but that's only for packages,
not directories outside classes. I tried tricking it with a path
of ../config/ but that only works when it creates the classes
directory, not the WAR or exploded app. Any suggestions to get this
to work without having to run an ant script afterwards to move the
files?


The war plugin can do that. Have a look at
http://maven.apache.org/plugins/maven-war-plugin/examples/adding-filtering-webresources.html

- Henry

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



Re: Filtering resources into a directory other than classes for a webapp?

2007-04-27 Thread Jared Blitzstein
Thanks, I've read that as well as http://maven.apache.org/guides/ 
getting-started/index.html#How%20do%20I%20filter%20resource%20files  
and it's basically the same thing as the WAR plugin...I believe.  
Since I need this on both the WAR and the exploded app for jetty, I'm  
not sure if the war plugin is what I need to be using. But the files  
are actually being filtered, it's just they're not ending up in /WEB- 
INF/config/ like I want.  They're going to /WEB-INF/classes/WEB-INF/ 
config/. Here is the snippet from my pom


filters
filtersrc/main/filters/${env}.var/filter
/filters
resources
resource

directorysrc/main/webapp/WEB-INF/config/directory
filteringtrue/filtering
targetPathWEB-INF/config//targetPath
/resource
/resources


Any ideas?


On Apr 27, 2007, at 12:28 PM, Heinrich Nirschl wrote:


On 4/27/07, Jared Blitzstein [EMAIL PROTECTED] wrote:

I'm using the webapp archetype and our apps are configured to have
the properties files in /WEB-INF/config/ rather than /WEB-INF/
classes/ which maven defaults to for resource filtering. I see the
targetPath tag in the resource tag but that's only for packages,
not directories outside classes. I tried tricking it with a path
of ../config/ but that only works when it creates the classes
directory, not the WAR or exploded app. Any suggestions to get this
to work without having to run an ant script afterwards to move the
files?


The war plugin can do that. Have a look at
http://maven.apache.org/plugins/maven-war-plugin/examples/adding- 
filtering-webresources.html


- Henry

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





Re: Filtering resources into a directory other than classes for a webapp?

2007-04-27 Thread Heinrich Nirschl
On Fri, 2007-04-27 at 15:17 -0400, Jared Blitzstein wrote:
 Thanks, I've read that as well as http://maven.apache.org/guides/ 
 getting-started/index.html#How%20do%20I%20filter%20resource%20files  
 and it's basically the same thing as the WAR plugin...I believe.  
 Since I need this on both the WAR and the exploded app for jetty, I'm  
 not sure if the war plugin is what I need to be using. But the files  
 are actually being filtered, it's just they're not ending up in /WEB- 
 INF/config/ like I want.  They're going to /WEB-INF/classes/WEB-INF/ 
 config/. Here is the snippet from my pom
 
   filters
   filtersrc/main/filters/${env}.var/filter
   /filters
   resources
   resource
   
 directorysrc/main/webapp/WEB-INF/config/directory
   filteringtrue/filtering
   targetPathWEB-INF/config//targetPath
   /resource
   /resources
 
 
 Any ideas?
 

I have not tried this, but according to the documentation a
configuration similar to this for the war plugin should work:

  plugin
groupIdorg.apache.maven.plugins/groupId
artifactIdmaven-war-plugin/artifactId
configuration
  filters
filtersrc/main/filters/${env}.var/filter
  /filters
  webResources
 resource
   !-- the config files you want to filter should be in this directory 
--
   directoryconfigurations/directory 
   targetPathWEB-INF/config/targetPath
   !-- enable filtering --
   filteringtrue/filtering
 /resource
  /webResources
/configuration
  /plugin

- Henry


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