Having profiles determining what should be included in the ear (or any other archive for that matter) is not good practice. You should only do one build that creates all that you need. If you have profiles, you will typically run one build for each profile. Not good. A better approach is to have, in your case, three different projects, each building the ear for a specific environment. Or, you could have one project with a primary artifact and two secondary artifacts (with classifiers). I don't like classifiers so I wouldn't do that, but it ios possible.
/Anders On Wed, Feb 17, 2010 at 11:09, sehgal.prithvi <[email protected]>wrote: > > Dear All, > > I am new to Maven and i am encountering the following problem at hand. > > I have made a multi-module project. The project eventually has to build an > EAR artifact from a WAR file. > We have different properties files for different environments i.e. > > - Development > - Test > - Production > > My resource folder architecture is given as below > > resources/development/project.properties > resources/test/project.properties > resources/production/project.properties > > Now, i have implemented the Profiles approach provided in Maven and then > for > copying the resources based on different > environments, i was using maven-resources-plugin. > > The issue is that, i want to exclude the folders production and test > completely when my development profile is activated. > When the war is made in the classes folder three folders are made also > > classes/development/project.properties > classes/production/projection.properties > classes/test/project.properties > > Where as i want something like this > > classes/project.properties > > That is referenced in the application-context.xml. Please help me how can i > achieve this effect. > > Prithvi > -- > View this message in context: > http://old.nabble.com/Copying-different-property-files-based-on-a-Profile-tp27621527p27621527.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] > >
