Kiran, I have not used Castor myself with Maven2, so I will not be of much help. You will probably have to use the maven-antrun-plugin to achieve what you need, maybe someone on the list can give you further tips.
Good luck, Arnaud -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: jeudi 31 mai 2007 13:56 To: Jeansen, Arnaud (CALYON) Subject: RE: Bundling a particular set of files(Environment) inside War project Hey Arnaud, I was able to solve below mentioned problem.. I need one more help regarding castor classes generation using maven2.0.6. In maven1 we used to keep schemas in jar module. Along with these schemas we also used to maintain maven.xml & GenerateCastorClasses.xml. Maven1 used to call maven.xml internally , thus it was able to generate castor classes. These castor classes are needed for compiling java classes. Could u suggest me how Maven 2.0.6 can suffice this requirement?[if u want more details on this , i can pass u both the above mentioned xmls for ur understanding if u pass me ur email id] Thnaks a lot in advance, Kiran Kodlady Arnaud Jeansen-2 wrote: > > Hi, > > Where are your COMMON and DEV folders now ? src/main/resources_${env} > ? > > Where do the files inside these directories end up in the target > structure ? Where do the files from your normal "src/main/resources" > directory end up ? > > Can you make sure you have latest maven ? I work with maven 2.0.6 > > If you're stuck, post the relevent snippets from your pom file. This > works for me so there must be a typo somewhere in it. > > > Arnaud Jeansen > > > > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: mardi 29 mai 2007 15:46 > To: Jeansen, Arnaud (CALYON) > Subject: RE: Bundling a particular set of files(Environment) inside War > project > > > Hey Arnaud, > > Thanks a lot for ur response.. > But there is another problem i am struggling with.. > > Though i am able to bundle files from both COMMON & DEV folders, these > files are not falling under " WEB-INF/classes " > > could u please suggest how can i proceed on this? > > > Arnaud Jeansen-2 wrote: >> >> Hi, >> >> I had the same requirement and used profiles to achieve this. >> Depending on the given parameter, a different extra resource directory >> is added : In the WEB-INF/classes, you get the resources from the >> "resources" directory plus the resources from the "resources_ENV" >> directory. >> >> >> Snippets from my pom, you will have to change a few things to make it >> handle you config/<ENV> structure. I would advise to change it to a >> src/main/resources_<ENV> though : >> >> <!-- >> Adding profiles to handle target environments : LOC, >> DEV, INT and PROD >> --> >> <profiles> >> >> <profile> >> <id>env-loc</id> >> <properties> >> <env>LOC</env> >> </properties> >> </profile> >> >> <profile> >> <id>env-dev</id> >> <properties> >> <env>DEV</env> >> </properties> >> </profile> >> [...] >> </profiles> >> >> [...] >> >> <build> >> <plugins> >> <!-- >> We separate our web resources in two >> directories : >> * One is the standard and contains file >> that are not dependent on the env. >> * The other is dependent on the >> environment, and the right directory is loaded, >> according to the 'env' variable, that is >> manipulated by maven profiles >> >> http://maven.apache.org/plugins/maven-war-plugin/examples/adding-filt >> e >> ri >> ng-webresources.html >> --> >> <plugin> >> >> <groupId>org.apache.maven.plugins</groupId> >> >> <artifactId>maven-war-plugin</artifactId> >> <configuration> >> <webResources> >> <resource> >> <!-- path is >> relative to the pom.xml directory, >> i.e. >> from the parent POM >> Change >> according to your module name >> --> >> <directory> >> >> foowar/src/main/webapp_${env} >> </directory> >> </resource> >> </webResources> >> </configuration> >> </plugin> >> </plugins> >> </build> >> [...] >> >> You can then build a war for your DEV environment with a "mvn install >> -Penv-dev" for exemple. >> >> >> Hope this helps, >> Arnaud Jeansen >> >> >> -----Original Message----- >> From: Maria Odea Ching [mailto:[EMAIL PROTECTED] >> Sent: lundi 28 mai 2007 06:22 >> To: Maven Users List >> Subject: Re: Bundling a particular set of files(Environment) inside >> War project >> >> >> I think what you can do here is put each configuration in a separate >> profile, then you can activate which profile you will use when you >> build >> >> the project. You can configure the war plugin for each profile and >> set the warSourceIncludes and warSourceExcludes parameters to specify >> which of the config files you want included/excluded in that profile. >> >> HTH, >> Deng >> >> Kiran Kodlady wrote: >>> Hey.. >>> >>> I have encountered a problem while bundling a particular >>> configuration >> >>> files inside War project: Let me explain in detail on this : >>> >>> >>>> War project structure is like below : >>>> >>>> xyz_War--->config--> IST-----------------> A bunch of xmls >>>> related to IST phase >>>> >>>> --> UAT----------------->A bunch of xmls >>>> related to UAT phase >>>> >>>> --> PRD----------------->A bunch of >>>> xmls related to PRD phase >>>> >>>> -->src-->main-->java >>>> -->target >>>> -->webapp-->WEB-INF-->web.xml >>>> >>>> Explanation : xyz_War consists of folders like config, >> src,webapp,target. >>>> config folder consists of different sub folders >>>> related to each testing phase of application(IST,UAT,PRD). These >>>> folders contain same set of files with different contents >>>> altogether. >>>> >>>> For a particular build i need to bundle only one set of files among >>>> IST, UAT or PRD. >>>> >>>> Hope u got my question. I need to pass this parameter(IST,UAT or >>>> PRD) >> >>>> during runtime of build creation. >>>> >>> >>> Thanks, >>> >>> Kiran Kodlady >>> >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> Ce message et ses pièces jointes (le "message") est destiné à l'usage >> exclusif de son destinataire. Si vous recevez ce message par erreur, >> merci d'en aviser immédiatement l'expéditeur et de le détruire >> ensuite. Le présent message pouvant être altéré à notre insu, CALYON >> Crédit Agricole CIB ne peut pas être engagé par son contenu. Tous >> droits réservés. >> >> This message and/or any attachments (the "message") is intended for >> the sole use of its addressee. If you are not the addressee, please >> immediately notify the sender and then destroy the message. As this >> message and/or any attachments may have been altered without our >> knowledge, its content is not legally binding on CALYON Crédit >> Agricole CIB. All rights reserved. >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> > Quoted from: > http://www.nabble.com/Bundling-a-particular-set-of-files%28Environment%29-inside-War-project-tf3823795s177.html#a10832673 > > Ce message et ses pièces jointes (le "message") est destiné à l'usage > exclusif de son destinataire. Si vous recevez ce message par erreur, > merci d'en aviser immédiatement l'expéditeur et de le détruire > ensuite. Le présent message pouvant être altéré à notre insu, CALYON > Crédit Agricole CIB ne peut pas être engagé par son contenu. Tous > droits réservés. > > This message and/or any attachments (the "message") is intended for > the sole use of its addressee. If you are not the addressee, please > immediately notify the sender and then destroy the message. As this > message and/or any attachments may have been altered without our > knowledge, its content is not legally binding on CALYON Crédit > Agricole CIB. All rights reserved. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > Quoted from: http://www.nabble.com/Bundling-a-particular-set-of-files%28Environment%29-inside-War-project-tf3823795s177.html#a10856527
Ce message et ses pièces jointes (le "message") est destiné à l'usage exclusif de son destinataire. Si vous recevez ce message par erreur, merci d'en aviser immédiatement l'expéditeur et de le détruire ensuite. Le présent message pouvant être altéré à notre insu, CALYON Crédit Agricole CIB ne peut pas être engagé par son contenu. Tous droits réservés. This message and/or any attachments (the "message") is intended for the sole use of its addressee. If you are not the addressee, please immediately notify the sender and then destroy the message. As this message and/or any attachments may have been altered without our knowledge, its content is not legally binding on CALYON Crédit Agricole CIB. All rights reserved.
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
