Hello;
I have a problem that I know has been solved by maven. I am trying to
determine the best way to solve it.
Problem:
I have two different profiles created:
1) development
3) production
I have a multi-project that looks like:
pom.xml
core/pom.xml
common/pom.xml
web/pom.xml
In both development and production we need to use the beanRefFactory.xml
file. The development one is defined in
core/src/main/resources/beanRefFactory.xml and the production one is defined
in core/target/src/beanRefFactory.xml
This file is placed into our project-core-1.0.jar and controlled in the
core\pom.xml file
The <profiles> definitions are controlled in the parent pom.xml file.
This is my resource definitions in my core/pom.xml and it is configured for
development
<resources>
<resource>
<directory>target/src</directory>
<excludes>
<exclude>**/*.java</exclude>
<exclude>**/beanRefFactory.xml</exclude>
</excludes>
</resource>
<resource>
<directory>src/main/resources</directory>
<includes>
<include>beanRefFactory.xml</include>
</includes>
</resource>
</resources>
This is how I would define it in Production
<resources>
<resource>
<directory>target/src</directory>
<excludes>
<exclude>**/*.java</exclude>
</excludes>
</resource>
</resources>
Questions:
-----------------------
What is the best way to control this?
How do I specify conditional logic in my pom.xml to pull the correct file ?
What pom do I put this control in, where profiles are in parent pom.xml or
core/pom.xml where I need the control?
--
View this message in context:
http://www.nabble.com/Getting-correct-file-based-on-a-profile-tp15069346s177p15069346.html
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]