Hi ,
let's start from what you want to achieve:
1. Filter only A.properties
First off, how many files need filtering?
If you need only A.properties (in whole application), the
A.propertiesshould be the only one which contains ${
your.property) tags.
If you have also B.properties that contains ${} and you don't want to filter
it, then when it will be copied in the \target\classes directory that file
will end up with still ${} tags.
2. Do not filter any files under store
you can still specify that under the <resources> xml tag. you will
have(Pseudocode) <resource><dir><filtering>true</filtering></dir><resource>
as well as <resource> dir2 <filtering>false</filtering>
3. Copy store to classes
if store is under src/main/resources, it will be copied automatically to
\classes
4. Do not copy store to war
well, store will end up in the \classes directory of your war file... i see
nothing wrong with that. if your \classes is part of building war...
5. Copy filtered properties to both war and classes
?
why you are mentioning \war and \classes
is your project building a \war? if so, then when the war will be
assembled, \classes directory will be part of it..
could you elaborate more if your project is a .war or .jar or so mething
else?>
i have plenty of projects i m doing that are building wars, using resources
and filtering.......
please provide answer to this question and i could help more
1 - is your project a .war project
2 - if you have resources taht need filtering and some others that don't,
why don't you use ${} in resources taht must be filtered and leave plain
text in resources that don't need to be filtered ?
3 - what do you mean by .war and .classes? are we talking about same
project?
regards
marco
On Nov 30, 2007 11:11 PM, LinaTomy <[EMAIL PROTECTED]> wrote:
>
> Its in my settings.xml. The ones there are the defaults.
>
> I have a profile in profiles.xml which is not active by default. I only
> use
> that with the -P switch when i do an install for generating a war fro my
> deployment.
>
>
> mmistroni wrote:
> >
> > Hi,
> > where are your properties(i mean the 'replacement' properties)
> > 'stored'?
> > in your profile?
> >
> > On Nov 30, 2007 7:48 PM, LinaTomy <[EMAIL PROTECTED]> wrote:
> >
> >>
> >> Hi
> >> I have the following structure
> >>
> >> src
> >> |
> >> ---main
> >> |
> >> ----resources
> >> |
> >> ---
> >> A.properties
> >> store
> >> |
> >> ----
> >> 1.pdf
> >> 2.pdf
> >> data
> >> |
> >> ---
> >> 1.xml
> >> 2.xml
> >>
> >> When i do a maven install I need the following to happen
> >>
> >> 1. Filter only A.properties
> >> 2. Do not filter any files under store
> >> 3. Copy store to classes
> >> 4. Do not copy store to war
> >> 5. Copy filtered properties to both war and classes
> >>
> >> Also when I do a mvn install the properties files which is copied to
> war
> >> is
> >> not able to get the value for ${project.build.outputDirectory}.
> >>
> >> Could someone please help me with this.
> >>
> >> Below is my pom's snippet
> >>
> >> <build>
> >>
> >> <plugins>
> >> <plugin>
> >> <groupId>org.apache.maven.plugins</groupId>
> >> <artifactId>maven-war-plugin</artifactId>
> >> <version>2.0.2</version>
> >> <configuration>
> >> <webResources>
> >> <resource>
> >>
> <directory>src/main/resources</directory>
> >> <targetPath>WEB-INF/classes</targetPath>
> >> <!-- Filter the properties file to
> replace
> >> varibles with appropriate
> >> values -->
> >> <filtering>true</filtering>
> >> <includes>
> >> <include>*.properties</include>
> >> </includes>
> >> </resource>
> >> </webResources>
> >> </configuration>
> >> </plugin>
> >> </plugins>
> >>
> >> <!-- turn filtering on for the project's resources directory -->
> >> <resources>
> >> <resource>
> >> <directory>src/main/resources</directory>
> >> <!-- Filter the properties file to replace varibles with
> >> appropriate
> >> values -->
> >> <filtering>true</filtering>
> >> <includes>
> >> <include>*.properties</include>
> >> </includes>
> >> <excludes>
> >> <exclude>*.pdf</exclude>
> >> <exclude>*.xml</exclude>
> >> </excludes>
> >> </resource>
> >> </resources>
> >>
> >> </build>
> >> --
> >> View this message in context:
> >> http://www.nabble.com/Maven-install-tf4923928s177.html#a14091357
> >> Sent from the Maven - Users mailing list archive at Nabble.com.
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
> >> For additional commands, e-mail: [EMAIL PROTECTED]
> >>
> >>
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Maven-install-tf4923928s177.html#a14097129
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>