Hello,
This is a short description of my conf and the way i use filtered
resources in maven, the problem i have.
I have two different envirronements :
/src/main/filter/filter.dev.properties
filter.log.file=D:/TMP/myProject.log
/src/main/filter/filter.test.properties
filter.log.file=/opt/tomcat/logs/myProject.log
So i have to describe where to log in thrue the log4j.properties :
/src/main/conf/log4j.properties
log4j.appender.fichier.File=${filter.log.file}
My pom.xml contains this differents profiles :
<profiles><profile><id>Dev</id>
<build><filters><filter>
src/main/filter/filter.dev.properties
</filter></filters></build>
</profile>
<profile><id>test</id><build><filters><filter>
src/main/filter/filter.test.properties
</filter></filters></build>
</profile>
And, shortly, i describe this in the build section :
<resource><directory>src/main/conf</directory>
<filtering>true</filtering>
<targetPath>
../../src/main/webapp/WEB-INF/conf</targetPath>
</resource>
To combine (or filter) and to obtain the "dev"mode in eclipse, i have to
run
mvn process-classes -PDev
And i get in
src/main/webapp/WEB-INF/conf/log4j.properties
log4j.appender.fichier.File=D:/TMP/myProject.log
Wich is the right work value
OK
But the server is configured in org.eclipse.wst.common.component and not
configured to work with src/main/webapp/WEB-INF/conf !
And so, when i try to start the server, will i get an error while reading
the param log4j.appender.fichier.File=${filter.log.file}....
The way to work is to manually modify then server configuration path and
write
<wb-resource deploy-path="/WEB-INF/classes" source-path=
"/src/main/webapp/WEB-INF/conf"/>
instead of
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/conf"/>
I don't know if my explaination were correct ? Maybe is my way of working
wich is incorrect ?
--------------------------------------------------------------------------------------------------------
Igor Fedorenko <[EMAIL PROTECTED]>
22/04/2008 15:32
Veuillez répondre à
[email protected]
A
[email protected]
cc
Objet
Re: [m2eclipse-user] wost wanted features for Maven integration
Can you elaborate what "filtered resourses ... with a default profile"
means?
yofab wrote:
> Hello all,
> i approuve your point. May i suggest to also manage filtered resourses
in
> wtp integration with a default profile ?
>
>
> Kristof Vanbecelaere-3 wrote:
>> Hi,
>>
>> absolutely WTP support! What else could be more important? Before
viewing
>> my dependencies graphically I would like my module to be recognised as
a
>> WTP project.
>>
>> thanks
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>> http://xircles.codehaus.org/manage_email
>>
>>
>
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email